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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check duplicate element IDs in accessibility tests #10362

Merged
merged 7 commits into from
Apr 4, 2024

Conversation

aduth
Copy link
Member

@aduth aduth commented Apr 4, 2024

馃洜 Summary of changes

Enhances existing accessibility checks to verify that no duplicate IDs exist.

Related WCAG Failure: F77: Failure of Success Criterion 4.1.1 due to duplicate values of type ID

Previous discussion: #10289 (comment)

Ideally this would be something our existing Axe-based testing tools could identify (Axe even has an article for a related rule), but I could not cause an issue to be flagged in my testing with either the Ruby-based Axe tool nor the Chrome browser extension.

馃摐 Testing Plan

Verify that build with commit including demonstrated failure fails (12ae6e4), and passes without.

(TBD if there's any existing issues that will need to be fixed)

Section 508 is redundant with WCAG 2 AA:

"The Revised 508 Standards incorporate by reference the WCAG 2.0 Level AA Success Criteria, and apply the WCAG 2.0 Level AA success criteria and conformance requirements to both web and non-web electronic content."

https://www.section508.gov/develop/applicability-conformance/
changelog: Internal, Automated Testing, Check duplicate element IDs in accessibility tests
Copy link
Contributor

@JackRyan1989 JackRyan1989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! catches the dupe id issue on the how to verify page, so you may need to skip that test for now unless you want me to push up a fix prior to merging this.

The intent of the previous code was "latest 2.x", meaning 2.2 currently. In reality, "wcag2aa" means "2.0" specifically.

Ref: https://github.com/dequelabs/axe-core/blob/master/doc/API.md#axe-core-tags
@aduth
Copy link
Member Author

aduth commented Apr 4, 2024

catches the dupe id issue on the how to verify page, so you may need to skip that test for now unless you want me to push up a fix prior to merging this.

I pushed a fix in b6a35a0.

@aduth aduth merged commit 49d913a into main Apr 4, 2024
2 checks passed
@aduth aduth deleted the aduth-duplicate-id-check branch April 4, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants