- From: James Craig <jcraig@apple.com>
- Date: Fri, 29 Oct 2010 10:54:58 -0700
- To: Todd Kloots <kloots@yahoo-inc.com>
- Cc: "wai-xtech@w3.org" <wai-xtech@w3.org>
- Message-Id: <82A275F5-77E8-49D9-BC39-7245357AA5C2@apple.com>
In theory, either should work, but as you've noticed, applying the combobox role directly to the text field works better in most rendering engines. This is partially due to the fact that the rendering engine has to work harder to determine the other pattern, and the author has to work harder to implement it. If you apply the combobox role to the container surrounding the textbox, you need to make the container focusable with tabindex="0" and make the textbox non-focusable with tabindex="-1"; you then have to register for key events and manage updating the value of the textbox instead of letting the browser do that natively, which is near impossible to do well once you consider localization and alternate input methods. Hence the reason the spec recommends the approach of applying the combobox role directly to the element with focus and native text entry behavior. Thank you for bringing the discrepancy. As with anything created by fallible humans, there will be discrepancies or errors, and many of the authoring practices examples were written while the spec was in a state of frequent change. The spec is mostly stable in it's second Last Call state, while the authoring practices is an informative document that will likely see many more rounds of revisions. Getting that example synced back with the spec is likely to be one of those revisions. On Oct 28, 2010, at 9:55 PM, Todd Kloots wrote: > Having just re-read the latest drafts of the ARIA spec and corresponding authoring practices document, I noticed they were out of sync regarding definitions and recommend markup patterns for comboboxes. Was wondering if this was intentional (perhaps to illustrate that there isn't a single way of doing things?), or if the two documents are just presently slightly out of sync. > > The combobox role definition from the ARIA spec defines a combobox as "the combined presentation of a single line textfield with a listbox popup". And the HTML example that immediately follows that definition shows the "combobox" role applied directly to a text field, with an listbox as its sibling. > > Contrast that with the ARIA Authoring Practices document that defines a combobox as "combination of text field, which may be editable, a drop button to choose an item to place in the combo box, and a displayable list of items". So, this definition includes a button and indicates that the "combobox" role should be applied to a parent element that contains all three controls that the compose the combox (the textfield, button and listbox). > > Before the current version of the ARIA spec, I've only seen the pattern as recommended in the Authoring Practices document. However, in practice we've found the combobox pattern in the current version of the ARIA spec (applying the combobox role directly to the textfield) seems to work best across browsers and screen readers. > > I am curious about the differences between the spec and the Authoring Practices document. Will there eventually be a consolidated definition and single recommended pattern? Or is the idea to present a range of patterns, all of which are supposed to be supported equally well for maximum developer flexibility? > > Todd Kloots > Accessibility Engineer > Yahoo!, Inc. > > > >
Received on Friday, 29 October 2010 17:55:31 UTC