mui / mui/base-ui

[menu] Inferred menu item label includes SVG description

Open
#3,256 2 comments 0 reactions 0 assignees View on GitHub
component: menu has workaround
Dominant language
TypeScript
Stars
10.9k
Forks
543
Avg merge
1d 20h
Merged PRs (30d)
101

Description

# Bug report

## Current behavior

Open the reduced test case, open the menu, and try to jump to a menu item using the keyboard (e.g. "b" for "bar"). Observe that it doesn't work.

This seems to be because the inferred menu item label includes the SVG description (`desc`).

## Expected behavior

I know that we can add an explicit label, but it's nice to lean on inference.

Maybe the inferred menu item label should not include the SVG description. Thoughts?

Or, maybe you would recommend removing the SVG description altogether?

## Reproducible example

https://stackblitz.com/edit/qcyq6nxj?file=src%2FApp.tsx

## Base UI version

1.0.0-beta.5 (probably also earlier versions, I haven't tested)

## Which browser are you using?

Chrome

## Which OS are you using?

Mac OS

## Which assistive tech are you using (if applicable)?

N/A

## Additional context

Slightly related: https://github.com/mui/base-ui/issues/1942

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.