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

ARIA in HTML allowances changes for br and wbr #3177

Open
1 of 2 tasks
scottaohara opened this issue Oct 1, 2021 · 3 comments
Open
1 of 2 tasks

ARIA in HTML allowances changes for br and wbr #3177

scottaohara opened this issue Oct 1, 2021 · 3 comments
Labels
good first issue For first-time contributors standards Issues in the ARIA standards objects (lib/standards)

Comments

@scottaohara
Copy link
Contributor

scottaohara commented Oct 1, 2021

Product: axe-core

Expectation: wbr and br elements only allow the none and presentation roles. And only allow the aria-hidden attribute.

Actual: br presently allows any global aria- attribute. wbr presently allows for any role and global aria-* attribute, or aria-* attribute applicable to the assigned explicit role.

role test page for wbr

Motivation: ARIA in HTML will be changing the allowances for br and wbr elements. These elements will only allow the none and presentation roles, and the aria-hidden attribute. Other roles and global aria- attributes do not make sense to be used on these elements, particularly due to their inability to be effectively modified by authors.

axe-core version: 4.3.3
chromium 94

Edit: indicating tasks requested in this issue

  • Done: update role allowances for br and wbr
  • TODO: ensure that aria-hidden is the only allowed aria-* attribute for br and wbr elements
@straker
Copy link
Contributor

straker commented Oct 6, 2021

Thanks for letting us know. Should be an easy fix by updating the html-elms file and changing the allowedRoles to be ['none', 'presentation'].

As for the aria-hidden part, we'll have to modify the aria-allowed-attr-evaluate script to prevent aria-hidden specifically on these elements since it's a global attribute. But I'd like @WilcoFiers opinion before we do that first.

@straker straker added good first issue For first-time contributors standards Issues in the ARIA standards objects (lib/standards) labels Oct 6, 2021
@scottaohara
Copy link
Contributor Author

Thank you @straker. I'd be happy to make the PR for the updated html-elms file. Appreciate you pointing me there.

Re: your second line - i think you have a mistype or my comment was misunderstood:

we'll have to modify the aria-allowed-attr-evaluate script to prevent aria-hidden specifically on these elements

we do not want to prevent aria-hidden on these elements, but rather we want to allow aria-hidden and prevent other global attributes since they don't make sense on these elements and since they'd be in opposition to the allowed roles.

@straker
Copy link
Contributor

straker commented Oct 6, 2021

Gotcha. Yes, I misread that. I'll think about how to best handle that case then.

scottaohara added a commit to scottaohara/axe-core that referenced this issue Oct 6, 2021
straker pushed a commit that referenced this issue Oct 8, 2021
straker pushed a commit that referenced this issue Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue For first-time contributors standards Issues in the ARIA standards objects (lib/standards)
Projects
None yet
Development

No branches or pull requests

2 participants