Skip to content

Make DropdownMenu's trailing icon not focusable by default #174096

@bleroux

Description

@bleroux

Use case

The current DropdownMenu implementation wrapped the trailing icon in an IconButton. Because both the TextField and the IconButton are focusable by default, this led to several focus issues.
it would be better if the icon was not a button by default.

Quoting @davidhicks980 from #172753 (comment).

"most comboboxes in the wild default to an unfocusable "button" that usually only opens the listbox when clicked"

Some examples:

On MacOS:
https://github.com/user-attachments/assets/7738df66-c144-42aa-b8ee-d4d229915d43

image

From WAI:
"The button has been removed from the tab sequence of the page, but is still important to assistive technologies for mobile devices that use touch events to open the list of options."

Proposal

Make the DropdownMenu trailing icon not focusable by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions