Skip to content

feat(textfield): Add proper ARIA labeling to validation icon #8429

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

Merged

Conversation

razvanborsan
Copy link
Contributor

@razvanborsan razvanborsan commented Jun 20, 2025

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

  1. Run yarn start and view TextField "with valid state" stories
  2. Inspect validation icon - should have aria-label="Valid"
  3. Inspect input - should have aria-describedby pointing to validation icon
  4. Test with screen reader - should announce validation status
  5. Run yarn test - all tests pass

🧢 Your Project:

Personal contribution to improve React Spectrum accessibility


Description: Adds ARIA labeling to TextField validation icons for improved screen reader accessibility.

Changes:

  • Added aria-label="Valid" to checkmark icon
  • Added aria-describedby reference when in valid state
  • Updated tests and added Storybook stories

@razvanborsan razvanborsan force-pushed the textfield-accessible-validation-icons branch from 0838e10 to 517ac65 Compare June 20, 2025 10:21
@razvanborsan razvanborsan force-pushed the textfield-accessible-validation-icons branch from 517ac65 to d814c97 Compare June 22, 2025 20:09
Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR

@@ -0,0 +1,3 @@
{
"valid": "Valid"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to consult accessibility on the best string here. The invalid announced "invalid text" on MacOS VO.

Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@reidbarber reidbarber added this pull request to the merge queue Jun 23, 2025
Merged via the queue into adobe:main with commit 51f46e0 Jun 23, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants