Skip to content

fix: preventing Talkback erroneously focusing valid icon and adding similar support for MobileCombobox #8435

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
merged 2 commits into from
Jun 24, 2025

Conversation

LFDanLu
Copy link
Member

@LFDanLu LFDanLu commented Jun 23, 2025

From testing

✅ 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:

Test Combobox on mobile and make sure it is announced as "valid" when focused and validationState="valid". Also test that TextField still announces "valid" when focused and is in the valid state

🧢 Your Project:

RSP

@@ -98,7 +98,7 @@ export const TextFieldBase = forwardRef(function TextFieldBase(props: TextFieldB
let validId = useId();
let validationIcon = isInvalid
? <AlertMedium />
: <CheckmarkMedium id={validId} aria-label={stringFormatter.format('valid')} />;
: <CheckmarkMedium id={validId} aria-hidden aria-label={stringFormatter.format('valid')} />;
Copy link
Member Author

Choose a reason for hiding this comment

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

Field will still announce valid due to the aria-describedBy, just preventing Talkback and NVDA from thinking the Checkmark should be focusable

@rspbot
Copy link

rspbot commented Jun 23, 2025

snowystinger
snowystinger previously approved these changes Jun 23, 2025
@rspbot
Copy link

rspbot commented Jun 24, 2025

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, and announcement is still there

@LFDanLu LFDanLu added this pull request to the merge queue Jun 24, 2025
Merged via the queue into main with commit bbf9a13 Jun 24, 2025
31 checks passed
@LFDanLu LFDanLu deleted the valid_textfield_announcment branch June 24, 2025 20:40
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.

6 participants