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

fix(ally): Ensure buttons have discernible text #430

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

larowlan
Copy link
Contributor

We're using the nsw-design system in a storybook setup.
In that setup we have storybook's test runner using playwright to do axe testing of a11y.
The search input when there's an icon is failing with a critical error 'Ensure buttons have discernible text'. This is because the icon is the only markup inside the button, and this is set to aria-hidden=false.
This change creates a minor visual difference in it's current form.

@laurenhitchon
Copy link
Contributor

Hi @larowlan,

Thanks again for your contribution.

Adding a visually hidden with the sr-only class to provide discernible text for screen readers is a great solution to address the critical error 'Ensure buttons have discernible text' flagged by the axe tests. While we understand that this change might introduce a minor visual difference, the improvement in accessibility is highly valuable.

We'll verify and test that this update does not impact the button's functionality or introduce any unintended visual discrepancies across different themes and then merge this PR early next week if there are no issues.

@laurenhitchon laurenhitchon merged commit 9392c4e into digitalnsw:master Jul 16, 2024
4 of 5 checks passed
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