Skip to content

[A11Y-196] Associate the link text label with its input - #530

Open
alexwarren wants to merge 2 commits into
mainfrom
codex/a11y-196-link-text-label
Open

alexwarren wants to merge 2 commits into
mainfrom
codex/a11y-196-link-text-label

Conversation

@alexwarren

Copy link
Copy Markdown
Collaborator

Jira: https://stackoverflow.atlassian.net/browse/A11Y-196

Summary

  • Correct the shared editor link dialog's Link text label association.
  • Add regression coverage for both visible labels.
  • Add a patch changeset for release.

Ticket checklist

  • Link text has a programmatic label matching its visible label.
  • Shared implementation covers question and article editors once the patch release is consumed.

Verification

  • npm run test:unit -- --runInBand (1,093 passing)
  • npm run lint (passes; two existing warning-only tests)
  • npm run build (passes with existing bundle-size warnings)
  • git diff --check

@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f2262bd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stackoverflow/stacks-editor Patch

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

@netlify

netlify Bot commented Sep 16, 2026

Copy link
Copy Markdown

Deploy Preview for stacks-editor ready!

Name Link
🔨 Latest commit f2262bd
🔍 Latest deploy log https://app.netlify.com/projects/stacks-editor/deploys/6aaab6d3eec029000862e7f2
😎 Deploy Preview https://deploy-preview-530--stacks-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 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 for value 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-href and 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The accessibility fix, regression coverage, and patch changeset are complete with no unresolved blocking issues.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@alexwarren
alexwarren marked this pull request as ready for review September 16, 2026 15:44
@alexwarren
alexwarren requested a review from a team as a code owner September 16, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants