[A11Y-196] Associate the link text label with its input - #530
Open
alexwarren wants to merge 2 commits into
Open
alexwarren wants to merge 2 commits into
alexwarren wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: f2262bd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for stacks-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
🔵 Needs a closer look
Strengthen the regression test to verify each label targets its intended input.
Pull request overview
This PR fixes the shared link editor’s “Link text” label association, adds regression coverage, and includes a patch changeset.
Changes:
- Corrects the text input ID.
- Adds label association tests.
- Adds a patch release changeset.
File summaries
| File | Summary |
|---|---|
test/rich-text/plugins/link-editor.test.ts |
Adds accessibility coverage, but does not verify each label targets the intended input (moderate, 1 vote). |
src/rich-text/plugins/link-editor.ts |
Fixes the label-to-input association. |
.changeset/a11y-link-text-label.md |
Records the patch release. |
Review details
Suppressed comments (1)
test/rich-text/plugins/link-editor.test.ts:71
- This only verifies that each
forvalue resolves to some<input>, so a regression that swaps the href and text IDs would still pass while the “Link text” label targets the URL field. Assert the first label resolves to.js-link-editor-hrefand the second to.js-link-editor-text(or compare each resolved node with those expected selectors).
labels.forEach((label) => {
expect(label.htmlFor).not.toBe("");
expect(
container.querySelector(`#${label.htmlFor}`)
).toBeInstanceOf(HTMLInputElement);
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
alexwarren
marked this pull request as ready for review
September 16, 2026 15:44
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.
Jira: https://stackoverflow.atlassian.net/browse/A11Y-196
Summary
Ticket checklist
Verification