E-mail List Archives

Re: textbox in table cell

for

From: Moore, Michael
Date: Mar 26, 2008 11:50AM


"I guess my real question is, in the example I provided, when you are in
a table cell, don't screenreaders tell the cell's associated headers and
therefore doesn't that implicitly tell what that textbox is for? Or is
this too vague? Yes, your former approach makes it explicit and very
clear, but I want to know if this is really necessary since I have too
many textboxes to deal with. "

No, that functionality is disabled when the screen reader software has
been placed in the mode needed to type information into form. This
allows the software to distinguish between reading commands e.g. typing
the "h" key to get to the next heading in JAWS, or entering the first
letter of the name "harvey" in a text box. The "forms mode" of the
screen reader allows the user to tell the screen reader, "hey I need to
enter some stuff into a form", as a consequence keystrokes used to
execute keyboard navigation commands such as those needed to determine
row and column headings in a table must be disabled.

For the user to use the row and column headers to determine the inputs
it would be necessary to exit forms mode then query the software about
the headers then enter forms mode to enter the information for each
input on the form.

Failing to add labels or titles would fail to meet either section 508 or
WCAG accessibility requirements.

Mike

-----Original Message-----
From: <EMAIL REMOVED>
[mailto: <EMAIL REMOVED> ] On Behalf Of Lee, Samson
(HRSA) [C]
Sent: Wednesday, March 26, 2008 11:51 AM
To: WebAIM Discussion List
Subject: Re: [WebAIM] textbox in table cell

Your latter approach (using the "title" attribute) seems quick and
easier, but it does seem like a misuse.

I guess my real question is, in the example I provided, when you are in
a table cell, don't screenreaders tell the cell's associated headers and
therefore doesn't that implicitly tell what that textbox is for? Or is
this too vague? Yes, your former approach makes it explicit and very
clear, but I want to know if this is really necessary since I have too
many textboxes to deal with.

-----Original Message-----
From: Jared Smith [mailto: <EMAIL REMOVED> ]
Sent: Wednesday, March 26, 2008 12:17 PM
To: WebAIM Discussion List
Subject: Re: [WebAIM] textbox in table cell

On Wed, Mar 26, 2008 at 8:11 AM, Lee, Samson (HRSA) [C]
< <EMAIL REMOVED> > wrote:
>
> Each textbox has to be tied to two "labels" (one column header, one
> row header), so I don't think I can use the <label> tag...

You are correct. You can't associate a form element with two separate
labels. There are two options that I can think of to address this.

You could put labels within the table cells, but hide those labels
visually in a way that a screen reader would still read them.
Something like...

<td><label for="tbHLevel1" class="hidden">Heart Disease - Level
1</label><input type="text" size="3" id="tbHLevel1" /></td>

The hidden class would apply CSS styles that hide the label visually.
Details on the CSS at
http://webaim.org/techniques/css/invisiblecontent/#hidingfromsighted

The other approach is to put the description in the the title attribute
for the input element. Most major screen readers will read the title
attribute if no label is found. This, however, is not really optimal
because it isn't really the prescribed method for labeling elements and
it may be a misuse of the title attribute to provide such vital
information.

Jared Smith
WebAIM