Skip to content

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

@josepharhar

Description

@josepharhar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    selectThese are issues that relate to the select component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions