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

Refactor / improve duplicate-id-aria #4076

Open
WilcoFiers opened this issue Jun 30, 2023 · 2 comments
Open

Refactor / improve duplicate-id-aria #4076

WilcoFiers opened this issue Jun 30, 2023 · 2 comments
Labels
feat New feature or enhancement rules Issue or false result from an axe-core rule

Comments

@WilcoFiers
Copy link
Contributor

With the duplicate-id and duplicate-id-active rules deprecated in 4.8, it would be useful for us to look at how we can improve duplicate-id-aria. There are two things I'd like to see us figure out:

  1. Can we make this rule faster if instead of starting from IDs we start from IDREF attributes. I don't know if that needs to be a different rule. We'll have to decide if having the same rule report all different nodes is better than having a new rule do it, and turning the current rule off. Up for debate.

  2. Can we further reduce noise, and maybe make this rule more accurately by looking at DOM position, and the accessible name of the elements referenced. In particular the for labelledby / describedby if all nodes with the duplicated ID have the same accessible text, we could pass the rule since the control will (almost certainly) have the correct name.

@MelSumner
Copy link

Since duplicate IDs are technically allowed in SVGs, would it be useful to not check the element if it's an SVG?

@backwardok
Copy link

I like the idea of point 1 so that axe only reports on ids that are being referenced. Also big +1 to point 2 since this has actually come up recently for me where there are duplicate ids for an aria-describedby reference that have identical content (where it isn't an actual issue for a user). Would love to not have it flag when it's not a real issue that a user would come across.

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
Development

No branches or pull requests

3 participants