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

New rule: restrict use of aria-description and aria-braille* #3955

Closed
straker opened this issue Mar 23, 2023 · 2 comments · Fixed by #4107
Closed

New rule: restrict use of aria-description and aria-braille* #3955

straker opened this issue Mar 23, 2023 · 2 comments · Fixed by #4107
Assignees
Labels
feat New feature or enhancement rules Issue or false result from an axe-core rule
Milestone

Comments

@straker
Copy link
Contributor

straker commented Mar 23, 2023

Axe-core 4.7 will add the aria-description and all aria-brille* attributes as valid ARIA attributes. Once that is done, we'll need to create a new rule (or two) that limits their use to elements that have an ARIA role and an accessible name.

@straker straker added feat New feature or enhancement rules Issue or false result from an axe-core rule labels Mar 23, 2023
@straker straker added this to the Axe-core 4.8 milestone Mar 23, 2023
@WilcoFiers WilcoFiers modified the milestones: Axe-core 4.8, Axe-core 4.9 Jun 29, 2023
@WilcoFiers
Copy link
Contributor

I looked at this more closely. I think the right way to do this would be for ARIA to prohibit these attributes for none / presentation / generic. That covers the "role" scenario. I've opened an issue for it here: w3c/aria#1988

What I think is left is a rule that checks that you can only use aria-braillelabel on elements with a non-empty accessible name, and that you can only use aria-brailleroledescription on elements with a non-empty aria-roledescription.

@padmavemulapati
Copy link

Verified on axe-core develop branch code base,
for the test code snippet

<button id="fail1" aria-braillelabel="hello"></button>
<aside
  id="fail2"
  aria-roledescription=""
  aria-brailleroledescription="table of contents"></aside>

Seeing a new rule aria-braille-equivalent

description: "Ensure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent"
help: "aria-braille attributes must have a non-braille equivalent"
helpUrl: "https://dequeuniversity.com/rules/axe/4.7/aria-braille-equivalent?application=axeAPI"
id: "aria-braille-equivalent"
impact: "serious"
nodes: Array(2)0: {any: Array(0), all: Array(1), none: Array(0), impact: 'serious', html: '<button id="fail1" aria-braillelabel="hello"></button>', …}
1: {any: Array(0), all: Array(1), none: Array(0), impact: 'serious', html: '<aside id="fail2" aria-roledescription="" aria-brailleroledescription="table of contents"></aside>', …}
tags:  ['cat.aria', 'wcag2a', 'wcag412', 'EN-301-549', 'EN-9.4.1.2']

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or enhancement rules Issue or false result from an axe-core rule
Projects
None yet
3 participants