fix: associate selector label with input - #205
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 336317db-0945-4820-ae6a-7c2a231f1fc0
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Hiding the visible label currently leaves the input without an accessible name.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Improves selector accessibility by linking its visible label to the native input and separating input and datalist IDs.
Changes:
- Generates sanitized, deterministic element IDs.
- Associates
TextFieldlabels with inputs. - Synchronizes the input’s datalist reference.
| File | Description |
|---|---|
src/RestSelectorControl.tsx |
Adds accessible labeling and distinct input/datalist IDs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 336317db-0945-4820-ae6a-7c2a231f1fc0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
FormItemfor message/error context without using its unassociatedlabeloutputTextFieldwith a stable field-derivedinputIdlistattribute on mount and field-name changesAccessibility relationship
TextFieldrenders<label htmlFor={inputId}>and applies the same safe ID to the native inputlistattribute points only to the separate datalist IDValidation
npm ci --no-audit --no-fundnpx tsc --noEmitnpm run buildnpm run build-devCustomer / Region (Primary)verified:forequals the rendered inputidlistequals the datalistidnpm run cleanremoveddistand generated VSIX artifactsNo test framework exists in the repository, so no new test infrastructure was added.