Repository navigation
Announce each message with its own bot initials and, on arrow keys, its time - #5898
Open
Eugene (OEvgeny) wants to merge 8 commits into
Open
Eugene (OEvgeny) wants to merge 8 commits into
Eugene (OEvgeny) wants to merge 8 commits into
Conversation
Collaborator
Author
|
I'll check back tomorrow on this with real SR running |
Eugene (OEvgeny)
force-pushed
the
OEvgeny/fix-5803-sender-initials
branch
3 times, most recently
from
October 19, 2026 05:51
f254634 to
fdfb304
Compare
added 4 commits
October 19, 2026 02:19
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.
useActivityAccessibleName() and useActivityGreetingAlt() return a frozen readonly [string]; comment the live region fade delay in botAvatarInitials.perActivity.html.
Eugene (OEvgeny)
force-pushed
the
OEvgeny/fix-5803-sender-initials
branch
from
October 19, 2026 09:19
4146000 to
625fbe5
Compare
2 of 11 tasks
Eugene (OEvgeny)
marked this pull request as ready for review
October 19, 2026 19:29
Eugene (OEvgeny)
requested review from
William Wong (compulim),
Chris Whitten (cwhitten) and
TJ Durnford (tdurnford)
as code owners
October 19, 2026 19:29
Collaborator
Author
| * Bot initials set in the per-activity `channelData.webChat.styleOptions.botAvatarInitials` take precedence over | ||
| * `styleOptions.botAvatarInitials`, so each sender is narrated with their own initials, e.g. a bot and a live agent. | ||
| */ | ||
| export default function useActivityGreetingAlt(activity: WebChatActivity, fromUser: boolean): readonly [string] { |
Collaborator
There was a problem hiding this comment.
Consider this signature instead.
useLocalizeActivityGreetingAlt(): (activity: WebChatActivity) => readonly [string];I think we can derive fromUser from the activity.
Collaborator
Author
There was a problem hiding this comment.
Done in 5617ee0: useLocalizeActivityGreetingAlt(): (activity) => readonly [string] derives the sender from the activity (also user transcripts in voice conversations, as StackedLayout does).
Comment on lines
+18
to
+21
| { | ||
| ...styleOptions, | ||
| ...activity?.channelData?.webChat?.styleOptions | ||
| } |
Collaborator
There was a problem hiding this comment.
Suggested change
| { | |
| ...styleOptions, | |
| ...activity?.channelData?.webChat?.styleOptions | |
| } | |
| Object.freeze({ | |
| ...styleOptions, | |
| ...activity?.channelData?.webChat?.styleOptions | |
| }) |
William Wong (compulim)
requested changes
Oct 19, 2026
Eugene (OEvgeny)
force-pushed
the
OEvgeny/fix-5803-sender-initials
branch
from
October 19, 2026 23:19
6c2851c to
fcc6a15
Compare
Eugene (OEvgeny)
force-pushed
the
OEvgeny/fix-5803-sender-initials
branch
from
October 19, 2026 23:20
fcc6a15 to
f2b0b95
Compare
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:", and arrow-key navigation did not read the time of a message. The greeting is now built by one localizer hook that prefers the per-activitychannelData.webChat.styleOptions.botAvatarInitials, and the name of a sent message ends with the "Sent at" text of its timestamp (second commit).Design
useLocalizeActivityGreetingAlt()returns a function of the activity and derives "from user" from it, including user transcripts in voice conversations (as the visible layout does); the visible avatar is unchanged.Specific Changes
useActivityStyleOptions: moved from the Fluent theme, exported from the internal entry, merged options frozenuseLocalizeActivityGreetingAlt: new hook, "You said:" or "Bot $1 said:" with the activity's initials overstyleOptionsStackedLayout,CarouselFilmStrip,LiveRegionActivity,useActivityAccessibleName: use the hookuseActivityAccessibleName: appendsACTIVITY_STATUS_SEND_STATUS_ALT_SENT_ATonce the message is sentStyleOptions:botAvatarInitialsJSDoc mentions the narrationbotAvatarInitials.perActivity.html: per-activity initials in scan mode, carousel, arrow keys, and live regionaccessibleName.simple.html,accessibleName.activityStatus.sendFailed.html: the time is narrated only after the message is sentI have added tests and executed them locally
I have updated
CHANGELOG.mdI have updated documentation
Review Checklist
z-index)package.jsonandpackage-lock.jsonreviewed