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

Define allowed ARIA attributes for div when a child of dl element #374

Closed
scottaohara opened this issue Nov 20, 2021 · 3 comments
Closed
Assignees
Labels
Allowed aria-* attributes Allowed roles Pertaining to the allowed roles of HTML elements

Comments

@scottaohara
Copy link
Member

Allowing div as a child of dl has introduced some oddities with AT understanding the contents of a dl element correctly. This seems mostly an issue for AT to resolve, and largely they have as far as I recall, Browsers generally appear to be exposing their accessibility trees appropriately (more testing needed).

However, as I was reminded by whatwg/html#7347, I think we need to make it absolutely clear that if a div is acting as a styling/grouping container for dt and dd elements, it must not be allowed any ARIA roles outside of presentation/none, and no global aria-* attributes. Otherwise, this would break the already awkward mappings/user experience of the dl element.

@scottaohara
Copy link
Member Author

Testing the following:

<dl>
  <div role=navigation>
    <dt>test</dt>
    <dd>...</dd>
  </div>
</dl>

only axe presently flags that this is incorrect. so seems a good idea to get this into the spec to get other checkers to correctly flag this error.

@scottaohara
Copy link
Member Author

likely straight forward adding of a mention to the div allowances column stating that if a direct child of a dl then no allowed roles other than none/presentation.

@scottaohara
Copy link
Member Author

this was closed by merging of #403

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Allowed aria-* attributes Allowed roles Pertaining to the allowed roles of HTML elements
Projects
None yet
Development

No branches or pull requests

2 participants