Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make Tab insertion optional #56

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 3 commits into from
Jul 19, 2022
Merged

Make Tab insertion optional #56

merged 3 commits into from
Jul 19, 2022

Conversation

iansan5653
Copy link
Member

@iansan5653 iansan5653 commented Jul 15, 2022

WAI-ARIA recommendations for listboxes only specifies Enter as the key that should insert selected suggestions. Hijacking the Tab key unexpectedly can have negative impacts on user experience, particularly for users who use tabbing to navigate around the page.

At the same time, users may expect Tab to work based on their prior experience with IDEs.

To resolve this, I've added a settings object as a third parameter. In that settings object, the caller can pass a tabInsertsSuggestions option to control whether tab inserts suggestions or not. By default it does (to avoid breaking changes) but it can be overridden explicitly.

The settings object is fully optional to avoid breaking changes.

See also: second bullet point in this comment primer/react#2157 (comment)

@iansan5653 iansan5653 removed the request for review from theinterned July 18, 2022 15:02
@inkblotty inkblotty requested review from a team, bolonio and khiga8 July 18, 2022 15:37
@accessibility-bot
Copy link

👋 Hello and thanks for pinging us! An accessibility first responder will review this soon.

  • 💻 On PRs for our review: please provide a review environment with steps to validate, screenshots (with alt text), or videos demonstrating functionality we should be checking. This will help speed up our review and feedback cycle.
  • ⚠️ If this is urgent, please visit us in #accessibility on Slack and tag the first responder(s) listed in the channel topic.

@iansan5653 iansan5653 merged commit cd34c46 into main Jul 19, 2022
@iansan5653 iansan5653 deleted the make-tab-optional branch July 19, 2022 13:31
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