Search Field | Add Screen Reader announcement when the 'clear' button is used#2961
Draft
Search Field | Add Screen Reader announcement when the 'clear' button is used#2961
Conversation
|
Contributor
npm Snapshot: NOT Published🤕 Oh noes!! We couldn't find any changesets in this PR (afaeac4). As a result, we did not publish an npm snapshot for you. |
Contributor
|
Size Change: +56 B (+0.05%) Total Size: 118 kB
ℹ️ View Unchanged
|
Contributor
A new build was pushed to Chromatic! 🚀https://5e1bf4b385e3fb0020b7073c-jdqcvyfjdu.chromatic.com/ Chromatic results:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Screen readers need to be informed that the search field's term has been cleared when the "x" button is used to clear it. This is necessary because there is cognitive separation between the text input and the 'clear' button
This PR adds a call to the Wonderblocks announcer when the search term is cleared via the button and provides a default message that can be overriden (for translations) via props. The announcement will not trigger when the user clears the search term using backspace because that situation follows the expected use case and should be handled natively by screen readers.
Issue: CLASS-13290
Test plan: