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

Does combobox require an accessible name? #1046

Closed
WilcoFiers opened this issue Aug 29, 2019 · 6 comments
Closed

Does combobox require an accessible name? #1046

WilcoFiers opened this issue Aug 29, 2019 · 6 comments
Assignees
Labels
has PR PR exists that will close this issue
Milestone

Comments

@WilcoFiers
Copy link
Contributor

In the axe-core 3.3.0 we added a rule to check for the accessible name of non-native form fields, including combobox. Since than I've had a few people point me to this example in the ARIA practices:

https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html

<label id="ex2-label" class="combobox-label">
  Choice 2 Fruit or Vegetable
</label>
<div class="combobox-wrapper">
  <div role="combobox"
       aria-expanded="false"
       aria-owns="ex2-listbox"
       aria-haspopup="listbox"
       id="ex2-combobox">
    <input type="text"
           aria-autocomplete="list"
           aria-controls="ex2-listbox"
           aria-labelledby="ex2-label"
           id="ex2-input">
  </div>
  <ul aria-labelledby="ex2-label"
      role="listbox"
      id="ex2-listbox"
      class="listbox hidden">
  </ul>
</div>

This example has three elements with a role that, according to ARIA 1.1 require an accessible name: combobox, textbox, and listbox. In this example, the textbox and listbox have the same accessible name, and the combobox has no accessible name.

I'm guessing combobox probably doesn't need to have an accessible name, unless role=combobox is used on a native text box. Should this be changed?

@accdc
Copy link

accdc commented Aug 29, 2019

I'm not sure that's right though, having unlabeled comboboxes makes it impossible for screen readers to jump between combobox widgets and intuitively differentiate them for non-sighted users.

@jnurthen
Copy link
Member

I believe in the linked issue at the last F2F we decided that the combo and its child textinput should simply have the same label.

@aleventhal
Copy link
Contributor

@jnurthen or why not have the browser copy one to the other when one of them is nameless. Or, my favorite, I suggest the AT is responsible for doing this. NVDA will look at the parent of an nameless input and for a combobox name and use that.

@accdc
Copy link

accdc commented Aug 29, 2019

The issue with having browsers do it, is that I then need to add this to the AccName spec, which is annoying because it doesn't follow any form of paradigm existing elsewhere in the spec for any other widget type. I would have to make a step just for dealing with the combobox role.

@jnurthen jnurthen added this to the ARIA 1.2 milestone Sep 5, 2019
@mcking65
Copy link
Contributor

mcking65 commented Sep 5, 2019

I am hoping we will resolve this by eliminating the combobox wrapper idea introduced in aria 1.1. Neither Bryan nor I thought this was a good idea. It seems time may have proven us right. This is on the TPAC agenda. Reviewing the presentation I will use at TPAC is on Tuesday's APG agenda.

If that proposal does not fly, then we will need to figure out how to resolve this issue and decide who is responsible for naming the wrapper. It could be author; it could be labeled by the label on the textbox in the same way that a caption labels a table. I don't think we can push it off to AT.

This was referenced Sep 5, 2019
@scottaohara scottaohara added the has PR PR exists that will close this issue label Oct 2, 2019
@zcorpan
Copy link
Member

zcorpan commented Nov 12, 2019

#1051 is merged.

@zcorpan zcorpan closed this as completed Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has PR PR exists that will close this issue
Projects
None yet
Development

No branches or pull requests

7 participants