-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(react-card): infer a11y id from immediate header element #28266
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
fix(react-card): infer a11y id from immediate header element #28266
Conversation
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| FluentProviderWithTheme | mount | 83 | 81 | 10 | Possible regression |
| InfoButton | mount | 12 | 16 | 5000 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 594 | 599 | 5000 | |
| Button | mount | 316 | 298 | 5000 | |
| Field | mount | 1066 | 1055 | 5000 | |
| FluentProvider | mount | 663 | 636 | 5000 | |
| FluentProviderWithTheme | mount | 83 | 81 | 10 | Possible regression |
| FluentProviderWithTheme | virtual-rerender | 67 | 74 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 72 | 76 | 10 | |
| InfoButton | mount | 12 | 16 | 5000 | Possible regression |
| MakeStyles | mount | 853 | 838 | 50000 | |
| Persona | mount | 1636 | 1631 | 5000 | |
| SpinButton | mount | 1334 | 1312 | 5000 |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: e89fe80d9b45023929d2e072b311eacd4d7f7a30 (build) |
📊 Bundle size report
Unchanged fixtures
|
|
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 89107e2:
|
🕵 fluentuiv9 No visual regressions between this PR and main |
packages/react-components/react-card/src/components/CardHeader/useCardHeader.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-card/src/components/CardHeader/useCardHeader.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-card/src/components/CardHeader/useCardHeader.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-card/src/components/CardHeader/useCardHeader.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Martin Hochel <[email protected]>
* master: (95 commits) docs(react-drawer): improve drawer stories examples (microsoft#28283) bugfix: adds grid-template-columns to DialogBody styles to ensure grid template layout (microsoft#28272) Doc: Tree Infinite Scrolling (microsoft#28197) fix(react-card): infer a11y id from immediate header element (microsoft#28266) Fixed bugs and added more stories to the Breadcrumb (microsoft#28267) refactor: Keep vanillajs code only where needed (microsoft#28278) fix: correcting focus behavior of react-search (microsoft#28241) Tooltip : updated tooltip styles (microsoft#28264) applying package updates feat(react-tags): add styles for size (microsoft#28229) docs(react-dialog): update DialogTriggerOutsideDialog to include focus behavior (microsoft#28176) bugfix: Ensures dialog actions stretches on breakpoints (microsoft#28258) applying package updates fix: TableHeaderCell should not render button when not sortable (microsoft#28097) fix(react-file-type-icons): Map mhtml extension to html icon (microsoft#28112) Fix overlapping axis labels on smaller viewports (microsoft#28239) useArrowNavigationGroup grid-linear axis (microsoft#28253) applying package updates fix: Alert example missing aria-label for icon (microsoft#28234) Overflow divider fix (microsoft#28011) ...
* master: docs(react-drawer): best practices (microsoft#28040) docs(react-drawer): add missing documentation for Drawer stories (microsoft#28284) docs(react-drawer): improve type descriptions and fix TS circular references (microsoft#28282) docs(react-drawer): improve drawer stories examples (microsoft#28283) bugfix: adds grid-template-columns to DialogBody styles to ensure grid template layout (microsoft#28272) Doc: Tree Infinite Scrolling (microsoft#28197) fix(react-card): infer a11y id from immediate header element (microsoft#28266) Fixed bugs and added more stories to the Breadcrumb (microsoft#28267) refactor: Keep vanillajs code only where needed (microsoft#28278) fix: correcting focus behavior of react-search (microsoft#28241) Tooltip : updated tooltip styles (microsoft#28264)
|
🎉 Handy links: |
|
🎉 Handy links: |

Previous Behavior
To enable narration of the correct element when a card is selectable, we would create a dynamic id for the CardHeader element and synchronise it with the internal checkbox aria-describedby attribute.
New Behavior
We now infer the value from the children element from the CardHeader
headerproperty (if any). In case no element is found, it'll fallback to the previous behaviour. This will allow to a more precise target for the element we use to enable narration.