Skip to content

TextField validationState change to valid should cause an announcement to screen reader #4083

Open
@jnurthen

Description

@jnurthen

🐛 Bug Report

When validationState changes to valid the icon changes from the error to a the checkmark. There should be a corresponding screen reader announcement for this change in order to support 4.1.3- https://www.w3.org/WAI/WCAG21/Understanding/status-messages.html

🤔 Expected Behavior

An announcement should occur (perhaps simply valid - or more likely something custom created by the developer such as "Password rule met" or "passwords match") when the state changes from invalid to valid.

😯 Current Behavior

Nothing happens

💁 Possible Solution

🔦 Context

💻 Code Sample

https://react-spectrum.adobe.com/react-spectrum/TextField.html#validation

Turn on screen reader - navigate to the field. Make the email address invalid then correct it. There is no announcement when corrected.
In this example there is also no announcement when it becomes invalid but if there were an errorMessage defined there would be - and an error message is required for https://www.w3.org/WAI/WCAG21/Understanding/error-identification

🌍 Your Environment

Software Version(s)
react-spectrum 3
Browser all
Operating System all

🧢 Your Company/Team

🕷 Tracking Issue (optional)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      🔬 To Investigate / Verify

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions