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

Ensure character count message is hidden to assistive technologies when not visible #1442

Merged

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented Jun 10, 2019

When using the threshold feature in the character count component it is possible to access the message when it is visually hidden using a screen reader.

This change makes sure that the visual behaviour is consistent with the screen reader behaviour by hiding the content from the accessibility tree using aria-hidden.

Screen reader testing

Test URL: http://localhost:3000/components/character-count/with-threshold/preview

NVDA 2019 with Firefox 60.7.0esr

When the message first appears it is not announced, but after it is visible any other changes will cause an announcement, for example if another character is entered. I do not think this is a barrier.

JAWS 2018 with Internet Explorer 11

Message is read out as expected

VoiceOver with Safari 12.1.1

Message is read out as expected

Fixes #1406

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1442 June 10, 2019 13:44 Inactive
@NickColley NickColley changed the base branch from master to v3 June 10, 2019 13:44
@NickColley NickColley changed the title Ensure character count message is hidden when not visible Ensure character count message is hidden to assistive technologies when not visible Jun 10, 2019
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1442 June 10, 2019 13:55 Inactive
@NickColley NickColley added this to the v3.0.0 milestone Jun 10, 2019
We use `visibility` to ensure the character count keeps the same size in the page, but this requires additional work to ensure it's not visible to an assistive technology like a screen reader.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants