Skip to content

Screen reader Announces Previous Error Instead of Current One #7612

@hagad

Description

@hagad

Description

We are seeing an accessibility issue in a form where the screen reader (VoiceOver or NVDA) announces the previous error message instead of the current one when the validation state of a field—such as a TextBox, NumeralDate (e.g., from “required” to “min length”). (See Steps to reproduce)

Video : https://github.com/user-attachments/assets/f4d18908-1707-4c01-bb4d-8798cf14b653

Components :
https://carbon.sage.com/?path=/docs/numeral-date--docs
https://carbon.sage.com/?path=/docs/textbox--docs

Reproduction

https://stackblitz.com/edit/parsium-carbon-starter-sqbozgbz?file=README.md

Steps to reproduce

Scenario with VoiceOver SAFARI:

  • The TexBox has two validation errors: required and minimum length.
  • When the field is empty, the screen reader correctly announces the required error message. ✅
  • But if a min length error occurs afterward, the screen reader still reads the required message instead of the min length one. ❌
  • And if I trigger the required error again, the screen reader announces the min length message instead. ❌

JIRA ticket numbers (Sage only)

SBS-152071

Suggested solution

No response

Carbon version

157.7.0

React version

v17

Design tokens version

No response

Relevant browsers

Safari, Microsoft Edge

Relevant OSs

MacOS, Windows

Assistive technologies

No response

Additional context

No response

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions