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> Skip accessibility checking for an element with an inert attribute and its descendants #2194

Open
shunguoy opened this issue Feb 7, 2025 · 1 comment
Labels
engine Issues in the accessibility-checker-engine component T70

Comments

@shunguoy
Copy link
Contributor

shunguoy commented Feb 7, 2025

The inert attribute is an HTML global attribute that indicates that a browser ignores any user event or interaction for the element and its descendants. An inert element and its descendants get removed from the tab order and accessibility tree.

https://html.spec.whatwg.org/multipage/interaction.html#modal-dialogs-and-inert-subtrees
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inert

Currently, the checker reports accessibility issues for an inert element and its descendants, which is a false positive.

An example from HTML 5 spec:

<section aria-labelledby=s1>
  <h3 id=s1>Population by City</h3>
  <div class=container>
    <div class=loading><p>Loading...</p></div>
    <div inert>
      <form>
        <fieldset>
          <legend>Date range</legend>
          <div>
            <label for=start>Start</label>
            <input type=date id=start>
          </div>
          <div>
            <label for=end>End</label>
            <input type=date id=end>
          </div>
          <div>
            <button>Apply</button>
          </div>
        </fieldset>
      </form>
      <table>
        <caption>From 20-- to 20--</caption>
        <thead>
          <tr>
            <th>City</th>
            <th>State</th>
            <th>20-- Population</th>
            <th>20-- Population</th>
            <th>Percentage change</th>
          </tr>
        </thead>
        <tbody>
          <!-- ... -->
        </tbody>
      </table>
    </div>
  </div>
</section>
@shunguoy shunguoy added the engine Issues in the accessibility-checker-engine component label Feb 7, 2025
@shunguoy shunguoy changed the title <Bug> Skip accessibility checking for an inert element and its descendants <Bug> Skip accessibility checking for an <inert> element and its descendants Feb 17, 2025
@shunguoy shunguoy changed the title <Bug> Skip accessibility checking for an <inert> element and its descendants <Bug> Skip accessibility checking for an inert element and its descendants Feb 17, 2025
@shunguoy shunguoy added the T70 label Feb 17, 2025
@shunguoy
Copy link
Contributor Author

triage: skip the check for the entire section in the engine

@philljenkins philljenkins changed the title <Bug> Skip accessibility checking for an inert element and its descendants <Bug> Skip accessibility checking for an element with an inert attribute and its descendants Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issues in the accessibility-checker-engine component T70
Projects
None yet
Development

No branches or pull requests

1 participant