Skip to content

Check duplicate element IDs in accessibility tests#10362

Merged
aduth merged 7 commits intomainfrom
aduth-duplicate-id-check
Apr 4, 2024
Merged

Check duplicate element IDs in accessibility tests#10362
aduth merged 7 commits intomainfrom
aduth-duplicate-id-check

Conversation

@aduth
Copy link
Contributor

@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)

aduth added 4 commits April 4, 2024 09:23
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
@aduth aduth mentioned this pull request Apr 4, 2024
10 tasks
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.

aduth added 3 commits April 4, 2024 11:04
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
Contributor 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
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants