WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Labels on Checkboxes in data tables

for

From: Elle
Date: Mar 28, 2013 9:52PM


Respectfully, I have to say that I would never recommend form elements to
be coded without visible labels (in all cases except, perhaps, a search
field). While providing offscreen labels for form elements certainly can
provide technical solutions for screen reader users, it really does nothing
to address the needs for low-vision users or users with cognitive
disabilities. Both user groups need to be able to understand what's
required of them when encountering a form element. It may not be a popular
position, but I'd suggest that without a visual indication of its purpose,
a form element is inaccessible. I agree with Roger, but I would say that
this is 3.3.2 that's not being met.

*3.3.2 <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#minimize-error-cues>;
Labels
or Instructions:*
Labels<http://www.w3.org/TR/UNDERSTANDING-WCAG20/minimize-error-cues.html#labeldef>;
or
instructions are provided when content requires user input. (Level A)

Susan, I believe that your challenge really is a flaw in the overall design
of the form itself and also possibly the framework being used (given that
you're talking about putting form elements in a data table). This is the
reason why we always try to get accessibility integrated earlier in a web
project than the code implementation phase when all those decisions have
been made. Some accessibility issues really are design issues, not code
issues. And, a design that doesn't support visually labeled form elements
is likely to be a general usability issue, too, which will cause errors for
lots of people.

Birkir, while I understand the issues raised in the article you posted,
there are solutions to providing "placeholder text" that still maintain
usability and accessibility - you can code the text as part of the label
attribute so that it's always associated with the label for screen reader
users. This also follows a progressive enhancement approach, as the
information would still be available if JavaScript was disabled. Then, you
can use JavaScript to visually position that text over the input field.
When the field gets focus, the text doesn't have to disappear. You can
script it to appear directly above or below the associated field to serve
as a reminder for sighted users. This solution keeps the form uncluttered
but respects proximity needs for low-vision users.


Cheers,
Elle