-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(react-shared-contexts): add AnnounceContext #28654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(react-shared-contexts): add AnnounceContext #28654
Conversation
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| InfoButton | mount | 9 | 15 | 5000 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 633 | 628 | 5000 | |
| Button | mount | 311 | 292 | 5000 | |
| Field | mount | 1072 | 1087 | 5000 | |
| FluentProvider | mount | 652 | 671 | 5000 | |
| FluentProviderWithTheme | mount | 83 | 95 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 82 | 77 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 90 | 88 | 10 | |
| InfoButton | mount | 9 | 15 | 5000 | Possible regression |
| MakeStyles | mount | 841 | 866 | 50000 | |
| Persona | mount | 1683 | 1647 | 5000 | |
| SpinButton | mount | 1327 | 1336 | 5000 |
📊 Bundle size reportUnchanged fixtures
|
🕵 fluentuiv9 No visual regressions between this PR and main |
packages/react-components/react-shared-contexts/src/AnnounceContext/AnnounceContext.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-shared-contexts/src/AnnounceContext/AnnounceContext.ts
Show resolved
Hide resolved
packages/react-components/react-shared-contexts/src/AnnounceContext/AnnounceContext.ts
Show resolved
Hide resolved
…ntext/AnnounceContext.ts Co-authored-by: Sarah Higley <[email protected]>
layershifter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please fill PR description with an explainer of what it does, how will it be used and why it cannot be hosted in FAI?
packages/react-components/react-shared-contexts/src/AnnounceContext/AnnounceContext.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-shared-contexts/src/AnnounceContext/AnnounceContext.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-shared-contexts/src/AnnounceContext/AnnounceContext.ts
Outdated
Show resolved
Hide resolved
…ntext/AnnounceContext.ts Co-authored-by: ling1726 <[email protected]>
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 22bd5c5:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 58c60bce83efdf5811adb73c4f2f9b1950109fbf (build) |
* master: (37 commits) release (microsoft#28696) Fixing re-render issue for all charts when empty (microsoft#28321) feat(FluentProvider): emit errors on duplicate IDs (microsoft#28670) applying package updates fix(react-positioning): autoSize causing position update to reach maximum (microsoft#28689) fix(react-tags-preview): fix InteractionTag hover styles (microsoft#28686) Accordion: export AccordionHeaderProvider (microsoft#28542) feat(react-shared-contexts): add AnnounceContext (microsoft#28654) Added VR tests for Breadcrumb (microsoft#28653) fix(react-menu): use outline for menuItem focus ring (microsoft#28685) [Bug]: Tree, vertical spacing of branches and children is inconsistent (microsoft#28681) feaTt(react-tree): adds openItems and checkedItems to tree callback data (microsoft#28669) applying package updates Add mountNode prop to combos (microsoft#28661) react-tags-preview: add more vr test (microsoft#28582) chore: migrate to nx 16.1.4 (microsoft#28583) applying package updates chore: improves internal headless signature (microsoft#28651) fix: remove margin from icon when ToolbarButton is vertical (microsoft#28658) applying package updates ...
This PR adds AnnounceContext for use in FAI.
This context is a top-level screen reader notification utility that can be consumed by any component and used to fire on-demand screen reader announcements.
With something as complex as chat, and especially with loading messages and uploading files, we need a way to manage and queue custom screen reader notifications. Chat messages especially need the ability to have the screen reader notification text differ from the visual text on screen, since the visual text of a message often contains more information than is necessary in a notification.
We are hosting it in FUI instead of FAI because we eventually want it in FUI, and having the context be imported from there means we won’t have to change the import every place it’s used.