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

Two additional elements that prohibit naming from authors #3410

Open
scottaohara opened this issue Mar 13, 2022 · 4 comments
Open

Two additional elements that prohibit naming from authors #3410

scottaohara opened this issue Mar 13, 2022 · 4 comments
Labels
standards Issues in the ARIA standards objects (lib/standards)
Milestone

Comments

@scottaohara
Copy link
Contributor

scottaohara commented Mar 13, 2022

From my checks, axe-core largely identifies ARIA 1.2's naming prohibited rule., and extends that rule to HTML elements with similar implicit roles. However, there are a few elements which were not flagged for having anaria-label or aria-labelledby attribute per the test case I checked against.

  • body
  • label
  • rp (removed)

The remaining 38 elements checked in the test case were all flagged by axe for not supporting aria-label or aria-labelledby unless a role which allows naming is also specified.

@straker
Copy link
Contributor

straker commented Mar 14, 2022

Thanks for the issue. I can see a few issues with our code that allows those not to get flagged. The rp one in particular is always hidden by default by browsers (window.getComputedStyle().display === 'none'), which our rules typically ignore. Not sure we'll ever really flag that one since it doesn't affect screen readers when hidden.

Do you know of a browser that would show the fallback parenthesis? MDN shows full support in all major browsers for the <ruby> syntax. Even IE11 seems to support it.

@scottaohara
Copy link
Contributor Author

scottaohara commented Mar 14, 2022

There's been a lot of discussion about the ruby elements in HTML lately, and there are some proposals for updated mappings for these elements (they're not close to landing right now), but that was the impetus for me to review these to make sure that authors didn't do things that could potentially muck things up in the future.

But, per your point, seems that ARIA in HTML is actually incorrect in allowing anything on rp right now. It should be like other elements that aren't rendered and note that no roles/aria-* attributes are allowed. If nothing more than to signal to authors that there's no value in what they're doing.

Edit: so webkit actually does render rp if not a child of ruby (which, yeh.... is invalid, but we're also talking about devs doing invalid things already, so :)) It can also be force rendered with css display block, but that's arguably more of an edge case than the element being used outside of its expected ruby parent container.

@straker
Copy link
Contributor

straker commented Mar 15, 2022

Gotcha. Testing it out it looks like we return Needs Review for the rp element when it's visible.

@scottaohara scottaohara changed the title Three additional elements that prohibit naming from authors Two additional elements that prohibit naming from authors Mar 16, 2022
@scottaohara
Copy link
Contributor Author

FYI: @straker I've removed rp from this issue's request. Will likely have another update to the spec in the future to indicate that authors don't apply a role/aria-* attributes to the element at all, per it generally not being rendered, but for the instances where it might.

@straker straker added the standards Issues in the ARIA standards objects (lib/standards) label Mar 22, 2022
@WilcoFiers WilcoFiers added this to the Axe-core 4.9 milestone Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
standards Issues in the ARIA standards objects (lib/standards)
Projects
None yet
Development

No branches or pull requests

3 participants