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

[Bug] ARIA 1.1 Combobox markup incorrectly fails #178

Open
mjlehrke opened this issue Jul 2, 2021 · 1 comment
Open

[Bug] ARIA 1.1 Combobox markup incorrectly fails #178

mjlehrke opened this issue Jul 2, 2021 · 1 comment

Comments

@mjlehrke
Copy link

mjlehrke commented Jul 2, 2021

The role-has-required-aria-props rule incorrectly flags ARIA 1.1 comboboxes because aria-controls is on the text input and not the parent container with the combobox role.

In the ARIA 1.1 combobox pattern role=combobox is placed on the parent container instead of the text input like in the ARIA 1.0 pattern. Additionally in an ARIA 1.1 pattern, aria-controls is placed on the text input instead of aria-owns. aria-owns is instead on the parent container.

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

Because of the different pattern between 1.0 and 1.1, the role-has-required-aria-props complains because the parent container with the role=combobox does not have an aria-controls attribute.

For instance, this valid ARIA 1.1 combobox markup fails because the div with role=combobox does not have aria-controls:

<label for="ex1-input"
       id="ex1-label"
       class="combobox-label">
  Choice 1 Fruit or Vegetable
</label>
<div class="combobox-wrapper">
  <div role="combobox"
       aria-expanded="false"
       aria-owns="ex1-listbox"
       aria-haspopup="listbox"
       id="ex1-combobox">
    <input type="text"
           aria-autocomplete="list"
           aria-controls="ex1-listbox"
           id="ex1-input">
  </div>
  <ul aria-labelledby="ex1-label"
      role="listbox"
      id="ex1-listbox"
      class="listbox hidden">
  </ul>
</div>
@mjlehrke
Copy link
Author

mjlehrke commented Jul 2, 2021

Digging deeper, I guess it depends on whether this plugin currently enforces ARIA 1.2 specifications or not, even if they are in Candidate Recommendation stage.

If enforcing ARIA 1.2 specs, then the markup above should rightly fail as combobox markup have changed back to how they were in 1.0. If that's the case, this issue can be closed.

https://www.w3.org/TR/wai-aria-1.2/#combobox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant