GroupedListV2: update aria-posinset and aria-rowindex#25520
Merged
spmonahan merged 6 commits intomicrosoft:masterfrom Nov 15, 2022
Merged
GroupedListV2: update aria-posinset and aria-rowindex#25520spmonahan merged 6 commits intomicrosoft:masterfrom
spmonahan merged 6 commits intomicrosoft:masterfrom
Conversation
Changes the way aria-posinset is computed when the GroupedList role is set to "treegrid", the default role for GroupedList. In this case aria-posinset is the index within the current set. In all other cases only aria-rowindex is set. This case specifically is used in grouped DetailsList.
Asset size changes
Baseline commit: 4f5eec8081eed87fce6e8c4a071fb48e37629d1c (build) |
|
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 674569a:
|
Collaborator
📊 Bundle size report🤖 This report was generated against 76ebdee7eba4a9decbc1df97f3ff62b7784fdb8f |
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 1198 | 1213 | 5000 | |
| Breadcrumb | mount | 2747 | 2746 | 1000 | |
| Checkbox | mount | 2633 | 2652 | 5000 | |
| CheckboxBase | mount | 2364 | 2359 | 5000 | |
| ChoiceGroup | mount | 4313 | 4276 | 5000 | |
| ComboBox | mount | 1170 | 1167 | 1000 | |
| CommandBar | mount | 9245 | 9237 | 1000 | |
| ContextualMenu | mount | 10236 | 10298 | 1000 | |
| DefaultButton | mount | 1358 | 1361 | 5000 | |
| DetailsRow | mount | 3379 | 3322 | 5000 | |
| DetailsRowFast | mount | 3433 | 3405 | 5000 | |
| DetailsRowNoStyles | mount | 3245 | 3281 | 5000 | |
| Dialog | mount | 2982 | 2948 | 1000 | |
| DocumentCardTitle | mount | 584 | 581 | 1000 | |
| Dropdown | mount | 3160 | 3173 | 5000 | |
| FocusTrapZone | mount | 1937 | 1954 | 5000 | |
| FocusZone | mount | 1918 | 1921 | 5000 | |
| GroupedList | mount | 1827 | 2061 | 2 | |
| GroupedList | virtual-rerender | 1094 | 1088 | 2 | |
| GroupedList | virtual-rerender-with-unmount | 1621 | 1600 | 2 | |
| GroupedListV2 | mount | 558 | 575 | 2 | |
| GroupedListV2 | virtual-rerender | 538 | 546 | 2 | |
| GroupedListV2 | virtual-rerender-with-unmount | 576 | 546 | 2 | |
| IconButton | mount | 1786 | 1773 | 5000 | |
| Label | mount | 748 | 750 | 5000 | |
| Layer | mount | 4217 | 4180 | 5000 | |
| Link | mount | 850 | 857 | 5000 | |
| MenuButton | mount | 1600 | 1612 | 5000 | |
| MessageBar | mount | 2339 | 2345 | 5000 | |
| Nav | mount | 3071 | 3075 | 1000 | |
| OverflowSet | mount | 1391 | 1404 | 5000 | |
| Panel | mount | 2504 | 2534 | 1000 | |
| Persona | mount | 1261 | 1252 | 1000 | |
| Pivot | mount | 1509 | 1528 | 1000 | |
| PrimaryButton | mount | 1482 | 1480 | 5000 | |
| Rating | mount | 6970 | 6960 | 5000 | |
| SearchBox | mount | 1496 | 1491 | 5000 | |
| Shimmer | mount | 2913 | 2914 | 5000 | |
| Slider | mount | 2098 | 2094 | 5000 | |
| SpinButton | mount | 4248 | 4526 | 5000 | |
| Spinner | mount | 834 | 836 | 5000 | |
| SplitButton | mount | 2847 | 2847 | 5000 | |
| Stack | mount | 862 | 873 | 5000 | |
| StackWithIntrinsicChildren | mount | 2370 | 2343 | 5000 | |
| StackWithTextChildren | mount | 5073 | 5041 | 5000 | |
| SwatchColorPicker | mount | 9564 | 9524 | 5000 | |
| TagPicker | mount | 2323 | 2349 | 5000 | |
| TeachingBubble | mount | 75728 | 75567 | 5000 | |
| Text | mount | 819 | 815 | 5000 | |
| TextField | mount | 1563 | 1524 | 5000 | |
| ThemeProvider | mount | 1442 | 1448 | 5000 | |
| ThemeProvider | virtual-rerender | 1138 | 1131 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 1990 | 1998 | 5000 | |
| Toggle | mount | 1148 | 1142 | 5000 | |
| buttonNative | mount | 534 | 545 | 5000 |
smhigley
reviewed
Nov 4, 2022
Contributor
smhigley
left a comment
There was a problem hiding this comment.
couple questions, otherwise the flattened vs. group index calc looks good
Add two DetailsList examples that use GroupedListV2 under the hood. Update the doc site to show these examples.
GroupedListV1 case `onRenderCell` to `any`, allowing an additional `group` prop to be passed to this render callback. This updates `IGroupedListV2Props` to include this as an optional argument to the `onRenderCell` callback. Passing `group` is necessary as it holds the information needed to set `aria-posinset` and `aria-setsize` for non-expandable rows.
sopranopillow
approved these changes
Nov 15, 2022
packages/react/src/components/GroupedList/GroupedListV2.types.ts
Outdated
Show resolved
Hide resolved
packages/react/src/components/GroupedList/GroupedListV2.types.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Esteban Munoz Facusse <esteban.230@hotmail.com>
NotWoods
pushed a commit
to NotWoods/fluentui
that referenced
this pull request
Nov 18, 2022
* groupedlistv2: update aria positioning attributes Changes the way aria-posinset is computed when the GroupedList role is set to "treegrid", the default role for GroupedList. In this case aria-posinset is the index within the current set. In all other cases only aria-rowindex is set. This case specifically is used in grouped DetailsList. * groupedlistv2: add detailslist examples Add two DetailsList examples that use GroupedListV2 under the hood. Update the doc site to show these examples. * dl * groupedlistv2: properly set aria values for non-expandable rows GroupedListV1 case `onRenderCell` to `any`, allowing an additional `group` prop to be passed to this render callback. This updates `IGroupedListV2Props` to include this as an optional argument to the `onRenderCell` callback. Passing `group` is necessary as it holds the information needed to set `aria-posinset` and `aria-setsize` for non-expandable rows. * groupedlistv2: make some props optional * Apply suggestions from code review Co-authored-by: Esteban Munoz Facusse <esteban.230@hotmail.com> Co-authored-by: Esteban Munoz Facusse <esteban.230@hotmail.com>
Hotell
pushed a commit
to Hotell/fluentui
that referenced
this pull request
Feb 9, 2023
* groupedlistv2: update aria positioning attributes Changes the way aria-posinset is computed when the GroupedList role is set to "treegrid", the default role for GroupedList. In this case aria-posinset is the index within the current set. In all other cases only aria-rowindex is set. This case specifically is used in grouped DetailsList. * groupedlistv2: add detailslist examples Add two DetailsList examples that use GroupedListV2 under the hood. Update the doc site to show these examples. * dl * groupedlistv2: properly set aria values for non-expandable rows GroupedListV1 case `onRenderCell` to `any`, allowing an additional `group` prop to be passed to this render callback. This updates `IGroupedListV2Props` to include this as an optional argument to the `onRenderCell` callback. Passing `group` is necessary as it holds the information needed to set `aria-posinset` and `aria-setsize` for non-expandable rows. * groupedlistv2: make some props optional * Apply suggestions from code review Co-authored-by: Esteban Munoz Facusse <esteban.230@hotmail.com> Co-authored-by: Esteban Munoz Facusse <esteban.230@hotmail.com>
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.
Current Behavior
The incorrect value for
aria-posinsetwas set on GroupedListV2. When used inDetailsListaria-rowindexwas not set andaria-levelandaria-posinsetwere incorrectly set.New Behavior
Set the correct
aria-posinsetandaria-rowindexvalues on GroupedListV2 depending onrole.Related Issue(s)
Fixes #24795