Skip to content

Separate link reference markers from the previous word for screen readers - #5923

Draft
Eugene (OEvgeny) wants to merge 3 commits into
mainfrom
OEvgeny/fix-citation-marker-name
Draft

Eugene (OEvgeny) wants to merge 3 commits into
mainfrom
OEvgeny/fix-citation-marker-name

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Screen readers read a link reference marker glued to the previous word in the message summary, such as "Override the proxy settings1." for settings[1].

Changelog Entry

Fixed

  • Fixed screen readers gluing a link reference marker to the previous word in the message summary, such as "settings1" for settings[1], in PR #5923, by @OEvgeny

Description

The text alternative of a Markdown message (message summary on arrow keys and live region on arrival) only joined text nodes, so a link or citation button written right after a word, such as [1], became part of that word. A space is now added before a link or button when the text before it does not end with whitespace, so it reads "settings 1.".

Design

  • Separate with a space instead of naming the marker (for example "reference 1"): there is no localized string for a single marker, and the link itself already carries its full name.

Specific Changes

  • packages/component/src/Utils/activityAltText.ts: add a space before <a> and <button> when glued to the previous text

  • accessibility/accessibleName.linkReference.html: new test, asserts the message accessible name and the live region text read "settings 1."; snapshot 1 shows the live region "Override the proxy settings 1." above the transcript "settings[1]."

  • I have added tests and executed them locally

  • I have updated CHANGELOG.md

  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

);

// THEN: the live region announces the same text on arrival.
await waitFor(() =>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

TODO: visualize the region via CSS override and take snapshot

@OEvgeny
Eugene (OEvgeny) force-pushed the OEvgeny/fix-citation-marker-name branch from 013fd8f to 3058bc3 Compare October 19, 2026 22:43

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant