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

Hint text for a character count is included by screen readers as part of the count message #2486

Closed
36degrees opened this issue Dec 22, 2021 · 1 comment · Fixed by #2577
Closed
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

Description of the issue

If a character count also has a hint associated with the textarea, some screen readers also include the hint text whenever the count message is announced.

Steps to reproduce the issue

  1. Go to https://govuk-frontend-review.herokuapp.com/components/character-count/with-hint/preview
  2. Focus the textarea and wait for the accessible name, type and description to be read
  3. Enter characters in the text area

Actual vs expected behaviour

Expected: Only the count message should be announced, for example "You have 9 characters remaining."

Actual: The hint text is also announced in:

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

"You have 5 characters remaining. Don't include personal or financial information, eg your National Insurance Number or credit card details."

This hint text was also announced very occasionally in VoiceOver / Safari 15.2 (macOS Big Sur) with no discernible pattern.

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

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 changes to the accessible description are announced a little like live regions (the character count message is associated with the textarea using aria-describedby).

See also https://www.davidmacd.com/blog/test-aria-describedby-errormessage-aria-live.html

Some overlap with #2485.

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