[Athen] Form Labels

Bossley, Peter A. bossley.5 at osu.edu
Wed Mar 20 19:41:54 PDT 2019


I don’t have an easy development environment handy but I wonder if adding the entered value of the form field could be dynamically added to the programmatic label so that a user reviewing their answers by tabbing through their completed form fields could work. Maybe adding the ID of the input or select to the aria-labeledby could work if you put a placeholder of blank in the edit field…
Other than that someone would have to write some JS to automatically swap out a DOM node as users entered text or made a selection, and one would probably want a little bit of a delay to avoid the API recalculating the accessible name each time someone typed a letter; some screen readers might read that label over and over again in that case.
I don’t think anyone has come up with a great pattern for this; what you’ve done here is close but as you stated it does sound a little funny when read using reading keys, and the post-entry review issue is a potential point of confusion.



From: athen-list <athen-list-bounces at mailman12.u.washington.edu> On Behalf Of Alex Umstead
Sent: Wednesday, March 20, 2019 10:22 PM
To: Access Technology Higher Education Network <athen-list at u.washington.edu>
Subject: Re: [Athen] Form Labels

Peter - you raise a really good point here.

Here is a simple example that uses aria-labelledby and is structured in the way that Sean described. Feel free to send any ideas for improvements. It sounds decent to me in forms/focus mode, but feels a little odd in browse/virtual cursor mode. That said, I’m sighted, so any input from folks who use screen readers full-time would be appreciated.

https://mra11yx.github.io/form-labels/

Alex



On Mar 20, 2019, at 9:47 PM, Bossley, Peter A. <bossley.5 at osu.edu<mailto:bossley.5 at osu.edu>> wrote:
Both Alex and Sean gave you some great advice. I just want to echo the consistency bit; you want these question types to behave consistently throughout the application. Different labelling techniques could present some serious confusion for some users.
One last bit to pay attention to is the visual label for the form or input field needs to be, at minimum, contained in the programmatic label for WCAG 2.1 and this is a best practice to assist voice recognition users. Putting the questions in a span and using aria-labeledby should be widely supported by modern browsers and assistive technology.
I would suggest against a standard aria-label that doesn’t contain the question in it because in situations where a form field is present many screen reader users (myself included) have a tendency to simply tab through the fields to fill them out. So having to exit passthrough (forms) mode to go back and read the question would be annoying when I could simply hear the question as part of the label for the field.
Best,

<image001.png>
Peter Bossley
Director, Digital Accessibility Center
ADA Coordinator's Office - Office of University Compliance and Integrity
Student Life Disability Services
950 Lincoln Tower, 1800 Cannon Dr, Columbus, OH 43210
614-688-3028 Office
bossley.5 at osu.edu<mailto:bossley.5 at osu.edu> accessibility.osu.edu<http://accessibility.osu.edu/>
________________________________



From: athen-list <athen-list-bounces at mailman12.u.washington.edu<mailto:athen-list-bounces at mailman12.u.washington.edu>> On Behalf Of Alex Umstead
Sent: Wednesday, March 20, 2019 6:25 PM
To: Access Technology Higher Education Network <athen-list at u.washington.edu<mailto:athen-list at u.washington.edu>>
Subject: Re: [Athen] Form Labels

Actually - let me see if I can code up versions of Sean’s and my examples in another environment that doesn’t have the editor components that CodePen does. I’ll try and do this later tonight or tomorrow evening.

Alex
Sent from my iPhone

On Mar 20, 2019, at 3:05 PM, Khoa Pham <kpham at swccd.edu<mailto:kpham at swccd.edu>> wrote:
Alex and Sean,

Thank you for getting back to me with these solutions. I’m currently reviewing an app and many of their questions are formatted in this manner and when using a NVDA to compile a lists of form elements these show up as having no labels. AXE would indicate that these elements are missing labels. I just want to make sure there are solutions to making this accessible prior to working with the vendor and them telling me otherwise.

Khoa

From: athen-list <athen-list-bounces at mailman12.u.washington.edu<mailto:athen-list-bounces at mailman12.u.washington.edu>> On Behalf Of Sean Keegan
Sent: Tuesday, March 19, 2019 8:14 PM
To: Access Technology Higher Education Network <athen-list at u.washington.edu<mailto:athen-list at u.washington.edu>>
Subject: Re: [Athen] Form Labels

I encountered this type of question format a lot when dealing with assessment tests. Part of the challenge is that you want to offer the ability to navigate the text content, but at the same time ensure that the input element is also useable, makes sense given the context of the surrounding text, and does not unduly influence the test participant into how to answer the question.

Keeping it simple, one way to handle this would be to use aria-label attributes on the input fields. The aria-label for the <input> field could be, aria-label="Enter response" or "Enter answer". For the second example, the aria-label for the <select> could be aria-label="Select the value".

Another option I have seen would be to use aria-labelledby and concatenate the question as part of the form field's label. In other words, you have the text preceding the form field wrapped in a <span> with an id attribute. You then have the text after the question wrapped in a <span> with a different id attribute. There is then a third <span> (visually hidden) with an third id attribute and the text content set as "blank".

Using aria-labelledby on the input element to concatenate the values, this would be: aria-labelledby="span1 span3 span2". The result would be spoken as, "The blank has a greater average weight."

Separate from changing the UI, I think there are a few ways to make this accessible. What would be important, though, would be to see all the different question types in the system and come up with consistent design patterns so that the experience is consistent as the participant moves from question to question.

Take care,
Sean

_______________________________________________
athen-list mailing list
athen-list at mailman12.u.washington.edu<mailto:athen-list at mailman12.u.washington.edu>
http://mailman12.u.washington.edu/mailman/listinfo/athen-list
_______________________________________________
athen-list mailing list
athen-list at mailman12.u.washington.edu<mailto:athen-list at mailman12.u.washington.edu>
http://mailman12.u.washington.edu/mailman/listinfo/athen-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman12.u.washington.edu/pipermail/athen-list/attachments/20190321/ef202644/attachment.html>


More information about the athen-list mailing list