[Athen] Form Labels

Alex Umstead awumstead at gmail.com
Wed Mar 20 15:09:42 PDT 2019

I ran my example (tested in CodePen’s debug mode to eliminate interference from their non-accessible editing controls) through aXe and didn’t get this error. I didn’t have a chance to prototype out the recommendation that Sean provided, but I don’t think it would have any problems, either. Is it possible that the live solution has elements with duplicate IDs? This will cause serious problems with labeling because (with <label for>) all of the labels generally get assigned to a single element with that ID, and then all other fields with that ID become unlabeled. This happens even if the field that gets labeled is totally hidden from all users. The behavior would likely be a little different with aria-labelledby versus <label for>, but duplicate IDs would still be a problem.


Sent from my iPhone

On Mar 20, 2019, at 3:05 PM, Khoa Pham <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.


From: athen-list <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>
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,

athen-list mailing list
athen-list at mailman12.u.washington.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman12.u.washington.edu/pipermail/athen-list/attachments/20190320/41dffae8/attachment.html>

More information about the athen-list mailing list