Skip to content

Read live region messages without article and group role words - #5921

Merged
Eugene (OEvgeny) merged 7 commits into
mainfrom
OEvgeny/fix-liveregion-generic-wrappers
Oct 21, 2026
Merged

Eugene (OEvgeny) merged 7 commits into
mainfrom
OEvgeny/fix-liveregion-generic-wrappers

Conversation

@OEvgeny

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

Copy link
Copy Markdown
Collaborator

Screen readers say "article" and "group" before every new message and each of its lines.

Changelog Entry

Fixed

  • Fixed screen readers saying "article" and "group" before new messages and each of their lines in the live region, in PR #5921, by @OEvgeny

Description

The live region copy of a message and its attachments were <article>, and each line a <div> or <p> ("group" on Windows), so Narrator read "article, group, Bot WC said:, group, …". Articles are now <div>, and containers and lines inside the message are role="none"; text, aria-atomic, buttons and inputs are unchanged.

Design

  • role="none" on lines rather than <p>/<span> (still "group") or one text node (rewrites every renderer); the aria-atomic element itself must stay in the tree.

Specific Changes

  • LiveRegionActivity.tsx: <article aria-atomic> → <div aria-atomic>, lines role="none"; props typed with InferReactProps
  • LiveRegionAttachments.tsx, LiveRegionSuggestedActions.tsx: wrappers and paragraphs role="none"
  • AdaptiveCardAttachment.js, RichCardAttachment.js, core AttachmentForScreenReader/*Attachment.js: <article> → <div>, lines and containers role="none"
  • ACCESSIBILITY.md: custom screen reader renderers should do the same
  • accessibility/liveRegion/noRoleWords.html: asserts text, aria-atomic, a generic message and only buttons in its accessibility tree; snapshot 1 shows the live region copy with no role words
  • I have added tests and executed them locally
  • I have added .changelog/<PR#>-<slug>.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)

Comment thread __tests__/html2/accessibility/liveRegion/noRoleWords.html
@OEvgeny
Eugene (OEvgeny) force-pushed the OEvgeny/fix-liveregion-generic-wrappers branch from 335aad9 to e6598ae Compare October 20, 2026 01:12
@OEvgeny
Eugene (OEvgeny) marked this pull request as ready for review October 20, 2026 18:08
Copilot AI balanced review requested due to automatic review settings October 20, 2026 18:08

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@OEvgeny
Eugene (OEvgeny) force-pushed the OEvgeny/fix-liveregion-generic-wrappers branch 2 times, most recently from c4d0f0c to 32f9e3e Compare October 20, 2026 20:24
Eugene Olonov added 5 commits October 20, 2026 13:56
Screen readers announced "article" before every new message and attachment
read from the live region. The live region copy of a message and its
attachments are now generic containers; aria-atomic and the text are kept.
Screen readers on Windows read "group" before every line of a new message:
generic <div> and <p> are exposed as UIA Group. Lines and containers in the
live region copy are now role="none"; only the aria-atomic message, its text,
and the interactive copies (buttons, inputs) remain.
@OEvgeny
Eugene (OEvgeny) force-pushed the OEvgeny/fix-liveregion-generic-wrappers branch from 32f9e3e to f751d11 Compare October 20, 2026 20:57
@OEvgeny
Eugene (OEvgeny) merged commit fb9d46f into main Oct 21, 2026
60 of 61 checks passed
@OEvgeny
Eugene (OEvgeny) deleted the OEvgeny/fix-liveregion-generic-wrappers branch October 21, 2026 01:39
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.

3 participants