openui / openui/open-ui

Which option should be focused when tabbing and shift+tabbing into a listbox select element?

Open
#1,436 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

select
Dominant language
MDX
Stars
4.5k
Forks
226
Avg merge
2d 22h
Merged PRs (30d)
4

Description

Listbox select elements currently have a behavior which I hope is a good thing, which is that pressing tab while focused on an option in a listbox moves focus to the next focusable element after the entire select, rather than the next focusable option - moving focus between options is supposed to be done with the arrow keys.

Given this behavior, which option should become focused when tabbing or shift+tabbing into a base appearance listbox select element?

  1. Focus the first focusable option when tabbing in, and the last focusable option when shift+tabbing in. This is what chromium currently does, and it seems broken. (Thanks for noticing @sb3nder!)
  2. Focus the first focusable option when tabbing in from either direction.
  3. Focus the first selected option when tabbing in from either direction, falling back to the first focusable option.
  4. Implement "memory", where the last option which was focused becomes the newly focused one when tabbing into the select element. If it hasn't been focused before, then we would fall back to option 3 or option 2.

What do yall think? @scottaohara @janewman

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the four focus-placement options in issue #1436 and the linked Chromium report before evaluating the behavior of base appearance listbox select elements. Done means reaching and documenting a decision about which option applies when tabbing or shift+tabbing into the select.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
accessibility
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.