Repository navigation
Announce each message with its own bot initials and, on arrow keys, its time - #5898
Draft
Eugene (OEvgeny) wants to merge 3 commits into
Draft
Eugene (OEvgeny) wants to merge 3 commits into
Eugene (OEvgeny) wants to merge 3 commits into
Conversation
added 3 commits
October 18, 2026 01:41
Screen readers announced every bot message with the global botAvatarInitials, e.g. "Bot JO said:" for both a bot and a live agent. The four places which build "Bot $1 said:" (scan mode, arrow-key summary, live region, carousel) now share useActivityGreetingAlt(), which prefers the per-activity channelData.webChat.styleOptions.botAvatarInitials. useActivityStyleOptions() moves from the Fluent theme to the component (and its internal entry), so the greeting and the Fluent theme read per-activity style options the same way.
The accessible name of each message in the transcript (aria-activedescendant) now ends with the same "Sent at ..." text as the screen reader text of its timestamp (ACTIVITY_STATUS_SEND_STATUS_ALT_SENT_AT), once the message is sent.
Collaborator
Author
|
I'll check back tomorrow on this with real SR running |
This branch has not been deployed
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.
Changelog Entry
Fixed
channelData.webChat.styleOptions.botAvatarInitialsoverstyleOptions.botAvatarInitials, fixes #5803, in PR #5898, by @OEvgenyDescription
Screen readers announced every bot message with the global
styleOptions.botAvatarInitials, so a bot and a live agent both read "Bot JO said:". The four places that build this text (scan mode, carousel, arrow-key navigation, live region) now share one hook, which prefers the initials in the per-activity style options. In a separate commit, the name of a message when navigating with arrow keys now ends with the "Sent at …" text that scan mode already reads from its timestamp.Related, not in this PR: since 4.19.0, production builds expose the default avatar's initials to screen readers (the
aria-hiddendefault ofDefaultAvataris not applied); it will be fixed in a separate PR.Design
channelData.webChat.styleOptions, 4.18.0) via the Fluent theme'suseActivityStyleOptions, now moved to the component; the visible default avatar still shows the global initials.ACTIVITY_BOT_SAID_ALTwith the latest agent's name (no$1) and sees no change until it drops the override and sets per-activity initials; should the greeting use the sender name instead (e.g. "John said:" fromfrom.name)?Specific Changes
hooks/internal/useActivityStyleOptions.ts: moved from the Fluent theme and exported from the internal entry, used byCopilotMessageHeader.tsx.hooks/internal/useActivityGreetingAlt.ts: new hook that builds "You said:" or "Bot $1 said:" from the activity's style options.StackedLayout.tsx,CarouselFilmStrip.js,LiveRegionActivity.tsx,useActivityAccessibleName.ts: use the hook instead of their own copies.useActivityAccessibleName.ts: appendsACTIVITY_STATUS_SEND_STATUS_ALT_SENT_ATonce the message is sent.StyleOptions.ts: thebotAvatarInitialsJSDoc mentions the narration and the per-activity override.accessibility/botAvatarInitials.perActivity.html: new test for scan mode, carousel, arrow keys, and live region.accessibility/accessibleName.simple.html,accessibleName.activityStatus.sendFailed.html: expect the time only after the message is sent, not while its echo back is pending or after it failed.CHANGELOG.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed