Skip to content

fix(wheel-of-names): tie the participant search label to its input - #12153

Draft
sebdanielsson wants to merge 2 commits into
backstage:mainfrom
sebdanielsson:fix/wheel-of-names-search-label
Draft

sebdanielsson wants to merge 2 commits into
backstage:mainfrom
sebdanielsson:fix/wheel-of-names-search-label

Conversation

@sebdanielsson

Copy link
Copy Markdown
Contributor

Hey, I just made a Pull Request!

The participant search field ("Search users and groups") is a Material UI v4 TextField without an id. TextField only connects its <label> to the <input> (htmlFor on the label, id on the input) when it gets an id. Without one, the label is only drawn on top of the input and has no programmatic link to it. So:

  • screen readers announce an unnamed text field,
  • clicking the label doesn't focus the input,
  • accessibility checkers (axe, Lighthouse) report "Form elements must have labels",
  • tests can't find the field with getByLabelText or getByRole('textbox', { name }).

This gives the field an id. The plugin had no tests for Participants, so this adds two that find the field by its label: one search that returns a match and one that returns nothing. Both fail without the id.

I used an AI coding assistant for this change, and I reviewed and tested it myself.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation (not needed, no config or API change)
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes) (none: nothing changes visually)
  • All your commits have a Signed-off-by line in the message. (more info)

🤖 Generated with Claude Code

https://claude.ai/code/session_01NZ5217N1rFyPVX37ezXNMQ

The MUI v4 TextField only links its label to the input (htmlFor/id)
when it gets an id. Without one, screen readers announce an unnamed
field and clicking the label doesn't focus it. Give the field an id and
add tests that find it by its label.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Sebastian Danielsson <[email protected]>
@backstage-goalie

Copy link
Copy Markdown
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-wheel-of-names workspaces/wheel-of-names/plugins/wheel-of-names patch v0.8.0

The hint also shows briefly before the search starts, so the test could
pass without the search having run. Also uses the current year in the new
file's copyright header.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Sebastian Danielsson <[email protected]>
@sebdanielsson
sebdanielsson marked this pull request as ready for review November 20, 2026 15:20
@sebdanielsson
sebdanielsson requested a review from a team as a code owner November 20, 2026 15:20

@AmbrishRamachandiran AmbrishRamachandiran left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix, and for adding the first tests for Participants! LGTM 🚀

cc @philippeckelintive @johannes-kirchner for a final look.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants