Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARIA practices spec and examples are not aligned on ARIA 1.1 combobox labelling #886

Closed
aleventhal opened this issue Sep 13, 2018 · 7 comments
Labels
Feedback Issue raised by or for collecting input from people outside APG task force question Issue asking a question
Milestone

Comments

@aleventhal
Copy link

aleventhal commented Sep 13, 2018

The ARIA 1.1 spec says, "If the combobox has a visible label, the element with role combobox has aria-labelledby set to a value that refers to the labeling element. Otherwise, the combobox element has a label provided by aria-label."
https://www.w3.org/TR/wai-aria-practices-1.1/#combobox

However, the ARIA practices combobox (https://www.w3.org/TR/wai-aria-practices-1.1/examples/combobox/aria1.1pattern/listbox-combo.html#ex1) with listbox example does not do this:

  • It assigns a label to the textfield and not the combo box.
  • Also, it uses <label for> even though the spec says to use aria-labelledby to label the combobox with visible text.

If the ARIA spec were followed by the example, then NVDA would get it right, but not JAWS or ChromeVox. I'm not near my Mac, so I'm not sure about VoiceOver.

We need to know what's correct, the example or the ARIA practices spec?

@aleventhal
Copy link
Author

Attaching example using aria-labelledby on the role="combobox" object:
combo-labelledby.html.gz

@accdc
Copy link

accdc commented Sep 15, 2018

Support should always follow the spec, because that is the only normative document.

@devarshipant
Copy link

@aleventhal -- Something related; in Example 1: List Autocomplete with Manual Selection, the acc name of combobox is derived from for / id on label and input elements respectively.

This requirement is helpful as it ensures larger click area.

for-id label input

Examples 2 and 3 implement it differently via aria-labelledby on input.

<label id="ex2-label" class="combobox-label"> Choice 2 Fruit or Vegetable </label>
...
<input type="text" aria-autocomplete="list" aria-controls="ex2-listbox" aria-labelledby="ex2-label" id="ex2-input" aria-activedescendant="" class="">

@aleventhal aleventhal changed the title ARIA practices spec and examples are not aligned on combobox labelling ARIA practices spec and examples are not aligned on ARIA 1.1 combobox labelling Sep 21, 2018
@carmacleod
Copy link
Contributor

@accdc said:

Support should always follow the spec, because that is the only normative document.

Agree completely, but the ARIA 1.1 spec for combobox doesn't really say where to put the label, although Example 5 does show it on the combobox element and not on the textbox. Are examples normative?

@aleventhal I think you meant "practices guide" and not "spec" in your opening sentence. :)

@carmacleod
Copy link
Contributor

Related ARIA issue: w3c/aria#893

@aleventhal
Copy link
Author

Related ARIA issue: 1776

@mcking65
Copy link
Contributor

mcking65 commented Dec 9, 2019

This has been resolved with the APG 1.2 pattern and combobox examples. The combobox wrapper is now gone so the label belongs on the input, which is now also the combobox element.

@mcking65 mcking65 closed this as completed Dec 9, 2019
@mcking65 mcking65 added Feedback Issue raised by or for collecting input from people outside APG task force question Issue asking a question labels Dec 9, 2019
@mcking65 mcking65 added this to the 1.2 Release 1 milestone Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Issue raised by or for collecting input from people outside APG task force question Issue asking a question
Projects
None yet
Development

No branches or pull requests

5 participants