alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.18k stars 323 forks source link

Textarea hints and error messages are not read out if a value is already present (JAWS/Chrome) #2585

Open querkmachine opened 2 years ago

querkmachine commented 2 years ago

Description of the issue

When using JAWS, moving focus to a textarea that already has a populated value does not read out any elements associated with the textarea by aria-describedby.

Steps to reproduce the issue

  1. Create an instance of the textarea or character count component that: (a) has a default value of any length; (b) has an associated hint, error message, or both; and (c) does not have a threshold, if it's a character count.
  2. With JAWS running, navigate to the page in Chrome.
  3. Apply focus to the textarea using either keyboard or mouse.
  4. Listen to what JAWS reads out.

An existing example can be found in the character count's error state example in the design system. I've also made a bare minimum example as a fiddle.

Actual vs expected behaviour

Actual behaviour: JAWS will read out the input label and that it is a textarea that currently contains text.

Expected behaviour: JAWS will read out the label, that it is a textarea that currently contains text, plus any hints and error messages associated with the input via aria-describedby.

The issue does not appear to occur with <input> elements (be they empty or populated), or with empty <textarea>s.

Environment

Tested in both JAWS 2021.2103.174 and JAWS 2022.2202.38.

I could not reproduce this in Firefox or IE when using JAWS, and not in any browser when using NVDA 2021.2.

querkmachine commented 2 years ago

This would seem to be a known issue in JAWS. https://github.com/FreedomScientific/VFO-standards-support/issues/201