Skip to content

Localize the "message" and "attachment" role descriptions - #5916

Merged
Eugene (OEvgeny) merged 5 commits into
mainfrom
OEvgeny/fix-roledescription-l10n
Oct 21, 2026
Merged

Eugene (OEvgeny) merged 5 commits into
mainfrom
OEvgeny/fix-roledescription-l10n

Conversation

@OEvgeny

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

Copy link
Copy Markdown
Collaborator

Screen readers announce messages and attachments as "message" and "attachment" in English, whatever the locale.

Changelog Entry

Fixed

  • Fixed the "message" and "attachment" role descriptions being hard-coded in English, in PR #5916, by @OEvgeny

Description

The aria-roledescription of the message and attachment groups in stacked and carousel layouts was hard-coded in English. They now come from 2 new localized strings, which hosts can also set via overrideLocalizedStrings until translations arrive.

Design

  • New strings ACTIVITY_MESSAGE_ARIA_ROLE_ALT and ACTIVITY_ATTACHMENT_ARIA_ROLE_ALT, named like TRANSCRIPT_ARIA_ROLE_ALT; no existing string fits.
  • Overlaps Announce each message with its own bot initials and, on arrow keys, its time #5898, which removes localize from CarouselFilmStrip and StackedLayoutInner: git merges either order cleanly, so the PR merged second must keep const localize = useLocalizer() in both (ESLint/tsc flag it otherwise).

Specific Changes

  • en-US.json: added the 2 strings with comments

  • StackedLayout.tsx, AttachmentRow.tsx, CarouselFilmStrip.js, CarouselFilmStripAttachment.js: localize aria-roledescription

  • Added accessibility/aria-roledescription.localized.html: asserts "message"/"attachment" in en-US, then "Nachricht"/"Anhang" with German overrides; snapshots 1–2 show the stacked and carousel messages and the live region copy, in English then German

  • 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)

@OEvgeny

Copy link
Copy Markdown
Collaborator Author
Screenshot 2026-10-19 110643

@OEvgeny

Copy link
Copy Markdown
Collaborator Author

TODO: show announced activities by applying styles to live region and taking snapshot

@OEvgeny
Eugene (OEvgeny) marked this pull request as ready for review October 20, 2026 00:19
Copilot AI balanced review requested due to automatic review settings October 20, 2026 00:19

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-roledescription-l10n branch from 83e3777 to 5a98ec0 Compare October 20, 2026 01:12
@OEvgeny
Eugene (OEvgeny) force-pushed the OEvgeny/fix-roledescription-l10n branch 2 times, most recently from a2f7438 to ef11615 Compare October 20, 2026 20:24
Eugene Olonov added 3 commits October 20, 2026 13:56
Add ACTIVITY_MESSAGE_ARIA_ROLE_ALT and ACTIVITY_ATTACHMENT_ARIA_ROLE_ALT
and use them for aria-roledescription of the message and attachment
groups in stacked and carousel layouts, instead of hard-coded English.
@OEvgeny
Eugene (OEvgeny) merged commit e7c0dba into main Oct 21, 2026
33 checks passed
@OEvgeny
Eugene (OEvgeny) deleted the OEvgeny/fix-roledescription-l10n branch October 21, 2026 02:33
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