Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Screen readers announce several search and form fields without a name.
- Command pickers (search lists). cmdk 1.1.1 always renders a hidden
<label for>that holds thelabelprop ofCommandand points the input at it. None of the six pickers passeslabel:chat/ModelEffortPicker.tsx:505,chat/ModelSelector.tsx:215,panels/BranchPicker.tsx:140,panels/FontPicker.tsx:140,panels/NewWorkspaceDialog.tsx:884,shell/layout/workbenchTabs.tsx:353. The empty label also takes priority over the placeholder, so Chromium computes the combobox name as"". The shared wrapperpackages/ui/command.tsx:7-17doesn't require the prop. - MCP server dialogs.
Field(panels/McpServerDialogs.tsx:133-157) renders its label as a plain<span>that isn't linked to its control. As a result:- text inputs are named only by their placeholder;
- the raw-entry
Textareaat:933has no name at all; - the transport, exposure, tier and scope toggle sets (
:316,:380,:732,:741) are read as bare toggle buttons without the field name.
Direction
- Make
labelrequired on@thinkrail/ui/command(onCommandorCommandInput) and pass a locale key at each call site. - Link MCP
Fieldlabels to their controls (<label htmlFor>oraria-labelledbywithuseId). Name the toggle sets as a group, or switch them toSegmentedControl(see the duplicate-primitives issue). - Add unit checks with
getByRole("combobox", { name })so a missing name fails a test.
Found while documenting the component library in #1075.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity