WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: textbox in table cell

for

From: James Nurthen
Date: Mar 26, 2008 6:50PM


Indeed the title solution for such cases is documented in the current
draft of the techniques document for WCAG2.0
http://www.w3.org/TR/WCAG20-TECHS/H65.html

Regards,
James

On Wed, Mar 26, 2008 at 1:16 PM, Moore, Michael
< <EMAIL REMOVED> > wrote:
> Personally I prefer to use the title solution, I have not come across a
> screen reader in a long time that does not announce the title by default
> when there is no label defined. I think that the objections to the
> solution are mainly from standardistas who view the use as inappropriate
> from a web standards view. The use of the title as defined by the W3C
> "This attribute offers advisory information about the element for which
> it is set." source:
> http://www.w3.org/TR/html401/struct/global.html#adef-title I think that
> providing a description of what to put in the input would qualify as
> advisory information.
>
>
> m
>
> -----Original Message-----
> From: <EMAIL REMOVED>
> [mailto: <EMAIL REMOVED> ] On Behalf Of Lee, Samson
> (HRSA) [C]
>
>
> Sent: Wednesday, March 26, 2008 2:30 PM
> To: WebAIM Discussion List
> Subject: Re: [WebAIM] textbox in table cell
>
> Okay, that's good to know. What do you think about using the title
> attribute as a solution? Although it probably isn't the best solution
> from the accessibility point of view, do you think that's still
> acceptable?
>
> -----Original Message-----
> From: Moore, Michael [mailto: <EMAIL REMOVED> ]
> Sent: Wednesday, March 26, 2008 1:45 PM
> To: WebAIM Discussion List
> Subject: Re: [WebAIM] textbox in table cell
>
> "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
>