Skip to content

Use stricter accessibility checks#8948

Merged
mitchellhenke merged 6 commits intomainfrom
mitchellhenke/update-accessibility-tests
Aug 8, 2023
Merged

Use stricter accessibility checks#8948
mitchellhenke merged 6 commits intomainfrom
mitchellhenke/update-accessibility-tests

Conversation

@mitchellhenke
Copy link
Contributor

🛠 Summary of changes

The be_axe_clean check is included in the have_no_accessibility_violations check. The latter also includes other tests for accessibility, and caught one hanging tag that this PR removes. The have_valid_idrefs check was also updated to handle multiple tags being referenced in the attribute as it was incorrectly failing in some places where we do that.

Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

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

LGTM

@mitchellhenke mitchellhenke force-pushed the mitchellhenke/update-accessibility-tests branch from d789a7c to cd1ec84 Compare August 7, 2023 18:51
Copy link
Contributor

Choose a reason for hiding this comment

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

The logic is a little more complex because this is also within a condition a few lines above !value && !isValuePending which controls whether the "inner" hint is rendered.

Copy link
Contributor

Choose a reason for hiding this comment

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

We could probably make this a simple variable (and colocate with hintId and friends above):

const showInnerHint = !value && !isValuePending && isMobile && !!bannerText;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

had to switch to ! isMobile

@mitchellhenke mitchellhenke force-pushed the mitchellhenke/update-accessibility-tests branch 3 times, most recently from f2388c8 to f320a0c Compare August 7, 2023 20:15
@mitchellhenke mitchellhenke marked this pull request as ready for review August 8, 2023 14:01
Mitchell Henke and others added 6 commits August 8, 2023 10:38
changelog: Internal, Accessibility Testing, Use stricter checks in accessibility testing
Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
….tsx

Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
@mitchellhenke mitchellhenke force-pushed the mitchellhenke/update-accessibility-tests branch from 3950be6 to ffe0c7a Compare August 8, 2023 15:39
@mitchellhenke mitchellhenke merged commit 5321ad8 into main Aug 8, 2023
@mitchellhenke mitchellhenke deleted the mitchellhenke/update-accessibility-tests branch August 8, 2023 16:01
@jmhooper jmhooper mentioned this pull request Aug 10, 2023
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.

2 participants