Skip to content
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

[Bug]: When using a screen-reader, the user is unable to 'tab' into the dismiss button #30682

Closed
2 tasks done
syphe opened this issue Mar 1, 2024 · 4 comments · May be fixed by #30677
Closed
2 tasks done

[Bug]: When using a screen-reader, the user is unable to 'tab' into the dismiss button #30682

syphe opened this issue Mar 1, 2024 · 4 comments · May be fixed by #30677

Comments

@syphe
Copy link
Contributor

syphe commented Mar 1, 2024

Library

React Components / v9 (@fluentui/react-components)

System Info

System:
    OS: Windows 10 10.0.22631
    CPU: (16) x64 AMD EPYC 7763 64-Core Processor
    Memory: 32.60 GB / 63.95 GB
  Browsers:
    Edge: Chromium (121.0.2277.128)
    Internet Explorer: 11.0.22621.1

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

  • 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.
@syphe
Copy link
Contributor Author

syphe commented Mar 1, 2024

Have created a PR to address this issue: #30677

@miroslavstastny
Copy link
Member

I think that to dismiss the content of the search box by keyboard, user is supposed to press Esc key.
cc @smhigley

@syphe
Copy link
Contributor Author

syphe commented Mar 8, 2024

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.

@smhigley
Copy link
Contributor

smhigley commented Apr 1, 2024

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.

@smhigley smhigley closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants