Repository navigation
Convert the screen reader text, live region activity, fixed-width image and send failed retry link to CSS modules - #6052
Open
Eugene (OEvgeny) wants to merge 5 commits into
Open
Eugene (OEvgeny) wants to merge 5 commits into
Eugene (OEvgeny) wants to merge 5 commits into
Conversation
added 5 commits
November 12, 2026 03:14
Snapshots written with the build of main, before the retry link moves to CSS Modules.
…ineMarkdown to CSS modules Moves the local emotion styles of the 4 components to a module next to each, with the webchat__ class names (useStyles with webChatPrefixedClassName). - Same rules; ScreenReaderText (0,1,0 -> 0,2,0) and the retry link (0,2,1 -> 0,3,1) gain the .webchat scope, the others keep their specificity. - The retry link reads --webchat__color--accent instead of styleOptions.accent, so the Fluent theme gives it Fluent's accent color. - ScreenReaderText and InlineMarkdown get webchat__screen-reader-text and webchat__inline-markdown (they had only an emotion class); the webchat__live-region-activity and webchat__fixed-width-image* names stay.
…es-small-components
…es-small-components
Eugene (OEvgeny)
marked this pull request as ready for review
November 14, 2026 01:03
Eugene (OEvgeny)
requested review from
William Wong (compulim),
Chris Whitten (cwhitten) and
Thomas Durnford (tdurnford)
as code owners
November 14, 2026 01:03
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the CSS Modules migration and retry-link accent update.
No open issues 🎉
What changed in this PR
Continues the CSS Modules migration for four small components, preserving default-theme styling while making the retry link use Fluent’s accent color when that theme is active.
Changes:
- Replaces local Emotion styles with CSS Modules and
useStyles(). - Adds
webchat__screen-reader-textandwebchat__inline-markdownclasses while preserving existing component class names. - Adds snapshot coverage for the custom-accent retry link in idle and focused states, plus a changelog entry.
| File | Description |
|---|---|
| packages/component/src/Utils/InlineMarkdown.tsx | Uses CSS Module classes for inline Markdown. |
| packages/component/src/Utils/InlineMarkdown.module.css | Defines retry-link styles using the accent custom property. |
| packages/component/src/Utils/FixedWidthImage.tsx | Applies module classes to the image wrapper and images. |
| packages/component/src/Utils/FixedWidthImage.module.css | Moves image sizing and positioning rules into CSS. |
| packages/component/src/ScreenReaderText.tsx | Applies the screen-reader text module class. |
| packages/component/src/ScreenReaderText.module.css | Preserves visually hidden text styling. |
| packages/component/src/LiveRegion/LiveRegionActivity.tsx | Uses the live-region activity module class. |
| packages/component/src/LiveRegion/LiveRegionActivity.module.css | Preserves visually hidden live-region styling. |
| .changelog/6052-fix-css-modules-small-components.md | Documents the migration and Fluent accent change. |
| tests/html2/activityStatus/sendFailedRetry.accent.html | Adds custom-accent snapshots for idle and focused retry links. |
Review effort: Balanced
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
Changed
webchat__class names; in the Fluent theme, the send failed retry link now uses Fluent's accent color, in PR #6052, by @OEvgenyDescription
The screen reader text, the live region activity, the fixed-width image and the inline Markdown of the "Send failed. Retry." link move from emotion to CSS Modules, with the same pixels in the default theme. With the Fluent theme, the retry link now takes Fluent's accent color instead of
styleOptions.accent, because Fluent sets--webchat__color--accent.Design
--webchat__color--accentinstead of a new custom property, like other accent-colored elements.webchat__screen-reader-textandwebchat__inline-markdown. The other class names stay.Specific Changes
ScreenReaderText.module.css,LiveRegionActivity.module.css,FixedWidthImage.module.css,InlineMarkdown.module.css(new): moved rulesScreenReaderText.tsx,LiveRegionActivity.tsx,FixedWidthImage.tsx,InlineMarkdown.tsx:useStyles()activityStatus/sendFailedRetry.accent.html: snapshots 1–2 show the custom accent on the retry link, idle and focused (same snapshots onmain).changelog/<PR#>-<slug>.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed