Skip to content

[kumo] Fix InputGroup accessible-name warning - #761

Open
ftzi wants to merge 1 commit into
cloudflare:mainfrom
ftzi:fix/input-group-accessible-name-warning
Open

[kumo] Fix InputGroup accessible-name warning#761
ftzi wants to merge 1 commit into
cloudflare:mainfrom
ftzi:fix/input-group-accessible-name-warning

Conversation

@ftzi

@ftzi ftzi commented Aug 31, 2026

Copy link
Copy Markdown

Issue

The documented <InputGroup label="Search"> composition gives its input an accessible name but still emits [Kumo Input]: Input must have an accessible name in development.

<InputGroup label="Search">
  <InputGroup.Input placeholder="Search..." />
</InputGroup>

InputGroup renders the parent label through Field, while InputGroup.Input delegates to Input. The inner validator sees only naming props passed directly to the input, so it misses the valid label supplied by the group.

Solution

  • Pass the parent label ID through InputGroup context and apply it as aria-labelledby only when the input has no explicit aria-label or aria-labelledby.
  • Preserve explicit naming precedence and the warning for a genuinely unnamed <InputGroup><InputGroup.Input /></InputGroup>.
  • Add focused regression coverage for both cases and a patch changeset for @cloudflare/kumo.

Validation

  • node_modules/.bin/vp run --filter @cloudflare/kumo test: 52 files and 1,277 tests passed, including 95 InputGroup tests.
  • node_modules/.bin/vp run test:ci: 9 tests passed.
  • node_modules/.bin/vp run build:kumo: passed.
  • node_modules/.bin/vp exec tsx ci/scripts/validate-kumo-changeset.ts: passed.

AI disclosure

This change and pull request description were prepared by an AI coding agent at the contributor's direction.


  • Reviews
    • bonk has reviewed the change
    • automated review not possible because: Repository bonk review requires collaborator invocation after the pull request opens
  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant