You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When user enters text into the searchbox, and then presses the tab key, the focus is moved out of the search box component
Expected Behavior
When user enters text into the searchbox, and then presses the tab key, the dismiss button should be focused, so that users with screen readers are able to clear the search box.
Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
The provided reproduction is a minimal reproducible example of the bug.
The text was updated successfully, but these errors were encountered:
I think that to dismiss the content of the search box by keyboard, user is supposed to press Esc key. cc @smhigley
I think for accessibility reasons, the user should be able to navigate to the dismiss button using tabs. I'm not sure if pressing escape is obvious to a user with a screen reader.
Specifying screen readers is a bit of a red herring -- this is a keyboard behavior, independent of screen reader usage.
This is also by design, as @miroslavstastny mentioned. The clear button is a pointer-specific affordance (that also works for voice control, touch, and touch screen readers) to clear the text easily. Keyboard users can select-all + backspace to clear text.
We do not expose the clear button in the tab order because it would add an extra tab stop per input for no meaningful benefit. We chose this behavior as a consensus with other a11y SMEs in the company, including screen reader users. This also follows the behavior of the native browser-rendered clear button, which is not inserted into the tab order.
Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
yes
Reproduction
https://codesandbox.io/p/sandbox/fluentui-searchbox-a11y-clear-button-jhgwvz
Bug Description
Actual Behavior
When user enters text into the searchbox, and then presses the tab key, the focus is moved out of the search box component
Expected Behavior
When user enters text into the searchbox, and then presses the tab key, the dismiss button should be focused, so that users with screen readers are able to clear the search box.
Logs
No response
Requested priority
Normal
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
The text was updated successfully, but these errors were encountered: