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: axe-core/cli validator does not report error incorrect use of aria attributes on element with role="row" (ARIA 1.2) #317

Closed
spectranaut opened this issue Aug 5, 2021 · 1 comment

Comments

@spectranaut
Copy link

Product: cli

Motivation:

ARIA 1.2 introduces the following imperative in the role row definition: Authors MUST NOT apply aria-expanded, aria-posinset, aria-setsize, and aria-level to a row that descends from a table or grid.

Replication of error:

If you run the AXE cli (axe-core 4.3.2 in chrome-headless with --tags cat.aria) on an HTML with the following HTML you will see no errors.

  <div role="table">
    <div id="row11" role="row" aria-expanded="false"><div role="cell"></div></div>
    <div id="row12" role="row" aria-posinset="1"><div role="cell"></div></div>
    <div id="row13" role="row" aria-setsize="10"><div role="cell"></div></div>
    <div id="row14" role="row" aria-level="1"><div role="cell"></div></div>
  </div>

  <div role="table">
    <div role="rowgroup">
      <div id="row21" role="row" aria-expanded="true"><div role="cell"></div></div>
      <div id="row22" role="row" aria-posinset="2"><div role="cell"></div></div>
      <div id="row23" role="row" aria-setsize="8"><div role="cell"></div></div>
      <div id="row24" role="row" aria-level="3"><div role="cell"></div></div>
    </div>
  </div>

  <div role="grid">
    <div id="row31" role="row" aria-expanded="false"><div role="gridcell"></div></div>
    <div id="row32" role="row" aria-posinset="1"><div role="gridcell"></div></div>
    <div id="row33" role="row" aria-setsize="10"><div role="gridcell"></div></div>
    <div id="row34" role="row" aria-level="1"><div role="gridcell"></div></div>
  </div>

  <div role="grid">
    <div role="rowgroup">
      <div id="row41" role="row" aria-expanded="true"><div role="gridcell"></div></div>
      <div id="row42" role="row" aria-posinset="2"><div role="gridcell"></div></div>
      <div id="row43" role="row" aria-setsize="8"><div role="gridcell"></div></div>
      <div id="row44" role="row" aria-level="3"><div role="gridcell"></div></div>
    </div>
  </div>

Expectation:

You should see errors for every element with role="row" because each row has an attribute which is not permitted by the ARIA 1.2 spec.

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

2 participants