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

Character count message is repeated twice by screen readers #2485

Closed
36degrees opened this issue Dec 22, 2021 · 1 comment · Fixed by #2577
Closed

Character count message is repeated twice by screen readers #2485

36degrees opened this issue Dec 22, 2021 · 1 comment · Fixed by #2577
Assignees
Labels
accessibility 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) character count
Milestone

Comments

@36degrees
Copy link
Contributor

36degrees commented Dec 22, 2021

Description of the issue

The character count message is repeated twice when the user stops typing.

Steps to reproduce the issue

Type a single character into the character count.

Actual vs expected behaviour

Expected: Screen reader announces "You have 9 characters remaining."

Actual: The count message is read twice by:

  • JAWS 2021.2103.174 / Chrome 96
  • JAWS 2021.2103.174 / Firefox 95
  • NVDA 2021.2 / Chrome 96
  • NVDA 2021.2 / Firefox 94

"You have 9 characters remaining. You have 9 characters remaining."

VoiceOver / Safari 15.2 (macOS Big Sur) was a little inconsistent, but on one occasion repeated it three times: "You have 9 characters remaining. You have 9 characters remaining. You have 9 characters remaining. You are currently on a text area"

JAWS 2021.2103.174 / IE11 and VoiceOver / Safari (iOS 15.2) behave as expected, announcing the remaining count only once.

Environment (where applicable)

  • Operating system: As above
  • Browser: As above
  • Browser version: As above
  • GOV.UK Frontend Version: v4.0.0
@36degrees 36degrees added 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) accessibility character count labels Dec 22, 2021
@36degrees
Copy link
Contributor Author

I believe this is likely because of the use of aria-live in combination with the count message being associated using aria-describedby.

https://www.davidmacd.com/blog/test-aria-describedby-errormessage-aria-live.html suggests that using both together results in double speak, which is what we're seeing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) character count
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants