Skip to content

Character count messages are announced by screen readers even when the count is below a set threshold #2488

@36degrees

Description

@36degrees

Description of the issue

The character count has a 'threshold' feature which allows you to hide the remaining count unless the count reaches a set percentage of the total limit of characters or words.

However, some screen readers announce the count message even when it is hidden.

Steps to reproduce the issue

  1. Go to https://govuk-frontend-review.herokuapp.com/components/character-count/with-threshold/preview
  2. Enter a single character in the box – the count message should only appear after 7 characters.

Actual vs expected behaviour

Expected behaviour: The count message should not be announced, as it is not visible.

Actual behaviour: The count message is announced in:

  • JAWS 2021.2103.174 / Chrome 96
  • JAWS 2021.2103.174 / IE 11
  • NVDA 2021.2 / Chrome 96

It seems to be announced very rarely in VoiceOver / Safari 15.2 (macOS Big Sur).

Firefox behaves as expected with both NVDA and JAWS.

There is also something very odd going on in VoiceOver / Safari (iOS 15.2) where all of the information about the field is announced on every key press. This needs further testing – it might just be an issue with the way I was testing it, or it could be a bug in WebKit that may or may not be related to what we're doing with the character count…

Environment (where applicable)

  • Operating system: As above
  • Browser: As above
  • Browser version: As above
  • GOV.UK Frontend Version: v4.0.0

Metadata

Metadata

Assignees

Labels

accessibilitycharacter count🐛 bugSomething isn't working the way it should (including incorrect wording in documentation)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions