W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2012

RE: Accessibility Legend tags used in forms

From: Jonathan Avila <jon.avila@ssbbartgroup.com>
Date: Tue, 8 May 2012 08:51:26 -0400
Message-ID: <d9bf030baaa28cc587f260ba70969ac6@mail.gmail.com>
To: W3C WAI-IG <w3c-wai-ig@w3.org>
The ARIA specification indicates that the role of “group” is similar to the
HTML fieldset element.  Similarly the role of “radiogroup” can be used for
radio button groups.     Some quick tests with NVDA and JAWS show that when
form elements are put in a container with a role of group and an aria-label
is provided for the group the groupname is announced.  NVDA announces the
group’s label when a group changes only and JAWS announces it for each form
control in the group.

This actually touches on something I believe there is a lack of consensus
on – what combination of aria-labelledby and aria-describedby is conformant
to WCAG/ARIA and what is not.  I could see that some developers may want to
use aria-describedby instead of aria-labelledby for labeling groups of form
fields although this is likely not appropriate.  The ARIA spec indicates
that it provides additional information that some users may need.  This
indicates to me that it is supplementary information and not required
information that should be referred to by aria-describedby.

There are some clear elements which have embedded labels that
aria-describedby is appropriate for, describing:

·         Buttons

·         Links

·         Images that require a longer description

There are also elements that will likely have ARIA or native labels that
aria-describedby makes sense to described:

·         Dialog

·         Live regions

And then there are form controls

·         Radio buttons

·         Checkboxes

·         Input/Select/Textarea fields

For form controls, the visual field label would logically be referenced by
aria-labelledby and/or the native label element in HTML.  Groupings
including radiogroup should be used in cases where native HTML features are
not available such as when forms appear in tables or in other situations
where fieldsets and legends are not practical.    As I mentioned above,
aria-labelledby is the most appropriate method for this – however, would
use of aria-describedby be a failure of WCAG success criteria 1.3.1 and

For field constraints many developers advocate using aria-describedby to
indicate field formatting and other constraint information.  Clearly there
are some constraints like required field notation that should be indicated
through other methods like aria-required and by placing an indicator in the
label.  One could assume that for other than required notation that
aria-labelledby is not appropriate for constraint information.

A review of the ARIA implementation techniques for User Agents indicates a
particular order for determining an elements named based on using ARIA,
embedded content, etc.  In some cases implicit labels are provided by an
element’s inner content and using aria-labelledy would hide that implied
labeled from something like the inner text of an element only providing
announcement of the ARIA label. Thus, it seems that aria-describedby might
be better  used in these cases where the implied label would be hidden.

It would be great to see more consensus and agreement on what is an
explicit failure of using aria-labelledby and aria-described by


*From:* Steve Faulkner [mailto:faulkner.steve@gmail.com]
*Sent:* Tuesday, May 08, 2012 7:31 AM
*To:* Sami Hoang
*Cc:* W3C WAI-IG
*Subject:* Re: Accessibility Legend tags used in forms

I would also ask the developer what the 'new html' method is for
pragmatically associating group labels with form controls?


On 8 May 2012 12:16, Sami Hoang <samih@thegrandunion.com> wrote:


I have requested a fellow developer to include legend tags in the forms we
have on the web pages we are developing. The developer has refused and
commented with ‘this is old html’. Is this correct considering legend tags
are still useful for accessibility? Would I be able to get any thoughts on



*Sami Hoang
Junior QA Tester*

t: +44 (0)20 7952 0775
f: +44 (0)20 7908 0701
Moray House
23-31 Great Titchfield Street
London, W1W 7PA
[image: untitled]

DISCLAIMER NOTICE: Any views or opinions are solely those of the author and
do not necessarily represent those of Grand Union Limited unless
specifically stated. This email and any files transmitted are confidential
and intended solely for the use of the individual or entity to which they
are addressed. If you have received this email in error, please contact
Grand Union and delete this file from your computer. Although we have taken
steps to ensure that this e-mail and any attachments are free from any
virus, we cannot be held responsible for any viruses transmitted with this
email and any such attachments.

(image/png attachment: image001.png)

Received on Tuesday, 8 May 2012 12:51:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:44 UTC