Skip to content

Rework focus on click behavior #312

Closed
@corymharper

Description

@corymharper

Currently, by default the behavior of the hook is to focus the first item when the menu is opened, regardless of how it was opened. It is not specified by the WAI Aria guidelines that this has to be the case on click, but it should be on keyboard interaction. Therefore we should change the default behavior of the hook to be to focus the first item of the menu when it is opened via keyboard interaction, but not when it is opened via click.

At the same time we will create a new option, focusFirstItemOnClick that will invert that behavior for clicking.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions