Skip to content
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

Fluent : carousel accessibility fixes #12050

Merged
merged 4 commits into from
Mar 12, 2020
Merged

Fluent : carousel accessibility fixes #12050

merged 4 commits into from
Mar 12, 2020

Conversation

kolaps33
Copy link
Contributor

@kolaps33 kolaps33 commented Feb 25, 2020

This PR is created based on the from another repository:
https://github.com/microsoft/fluent-ui-react/pull/2278/files

Related carousel: Carousel with Pagination

In this PR are fixes related to the feedback which we got from Rekha + feedback from testing.

Issue: Index numbers (1 of 4) are read twice as you down arrow through the carousel item.
Fix: add aria-hidden="true" on the text

2.1 Issue: The first and the last item in the carousel are not read when the prev/next button is pressed in browse mode.
2.2 #2224
Fix: moving focusing the next/previous paddle to generic function, which is call always, even when "onclick" is executed...

Issue: Should there be focus on the entire carousel control and the left/right buttons? Seems redundant and adds more keyboard stops
Fix: change the behavior that for carousel without the "tab" navigation there will be tabindex=-1 on itemsContainer

Issue: Carousel itself should have a label property defined. The roledescription is set to “Carousel” so label can be “Portrait collection” for this example
Fix: added prop aria-label to be able label the carousel

Issue: #2225
Fix: was decided that if reader will narrate "carousel" user will know how to use keyboard to rotate through the carousel
For this reason to narrate "carousel" in application mode was added additional props(role, aria-label,aria-roledescription) into "itemsContainer" in "carouselBehavior.ts".
Now there is role "group". After more testing could be change for "region". For me region was not narrating "carousel" in focus mode for NVDA.

Issue: Programmatically Prev/Next buttons are outside carousel container so it will likely confuse the user. Carousel container element should include all elements within carousel.
Fix: apply region only for "Carousel with Pagination", provide there proper label and roledescription. Fix is in "carouselBehavior.ts" for "root" slot.

Microsoft Reviewers: Open in CodeFlow

Copy link
Member

@JasonGore JasonGore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an FYI, packages/fluentui is virtually read-only until the fluent repo is archived and the final import of code is completed. I will block this PR for now until that point just for added safety.

Also, CODEOWNERS was updated to add fluent repo members, but that wasn't in place yet when you created this PR. You can just manually assign reviewers for this specific PR.

@JasonGore
Copy link
Member

This PR looks like it succumbed to github issues that were occurring last night so I will close and reopen to trigger a new build.

@JasonGore JasonGore closed this Feb 26, 2020
@JasonGore JasonGore reopened this Feb 26, 2020
@size-auditor
Copy link

size-auditor bot commented Feb 26, 2020

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: e5c9f2bea83a4b9b0a82d303682c2ea093036c83 (build)

@msft-github-bot
Copy link
Contributor

msft-github-bot commented Feb 26, 2020

Perf Analysis

No significant results to display.

All results

Scenario Master Ticks PR Ticks Status
BaseButton 736 762
BaseButton (experiments) 942 1007
DefaultButton 978 985
DefaultButton (experiments) 1988 1893
DetailsRow 3354 3325
DetailsRow (fast icons) 3326 3309
DetailsRow without styles 3117 3232
DocumentCardTitle with truncation 1525 1517
MenuButton 1337 1306
MenuButton (experiments) 3513 3582
PrimaryButton 1205 1143
PrimaryButton (experiments) 1977 1988
SplitButton 2809 2878
SplitButton (experiments) 6940 7036
Stack 511 461
Stack with Intrinsic children 1167 1121
Stack with Text children 4328 4136
Text 388 352
Toggle 887 884
Toggle (experiments) 2271 2210
button 67 54

Perf Analysis (Fluent)

Perf comparison
Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🔧 Avatar.Fluent 0.56 0.55 1.02:1 2000 1115
🎯 Button.Fluent 0.17 0.23 0.74:1 1000 165
🔧 Checkbox.Fluent 0.97 0.44 2.2:1 1000 967
🔧 Dialog.Fluent 0.41 0.25 1.64:1 5000 2034
🔧 Dropdown.Fluent 3.77 0.56 6.73:1 1000 3769
🔧 Icon.Fluent 0.18 0.06 3:1 5000 888
🦄 Image.Fluent 0.07 0.12 0.58:1 5000 369
🔧 Slider.Fluent 1.59 0.4 3.98:1 1000 1594
🔧 Text.Fluent 0.08 0.02 4:1 5000 416
🦄 Tooltip.Fluent 0.13 16.23 0.01:1 5000 629

🔧 Needs work     🎯 On target     🦄 Amazing

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
Tooltip.Fluent 629 543 1.16:1
TooltipMinimalPerf.default 1026 892 1.15:1
ImageMinimalPerf.default 394 347 1.14:1
FlexMinimalPerf.default 277 256 1.08:1
LayoutMinimalPerf.default 784 723 1.08:1
Text.Fluent 416 384 1.08:1
HeaderMinimalPerf.default 646 601 1.07:1
ListNestedPerf.default 1044 979 1.07:1
ListWith60ListItems.default 192 181 1.06:1
SegmentMinimalPerf.default 1285 1214 1.06:1
ToolbarMinimalPerf.default 1261 1191 1.06:1
AvatarMinimalPerf.default 570 544 1.05:1
MenuMinimalPerf.default 2268 2159 1.05:1
TableMinimalPerf.default 804 766 1.05:1
TreeWith60ListItems.default 277 265 1.05:1
HierarchicalTreeMinimalPerf.default 1171 1127 1.04:1
Checkbox.Fluent 967 932 1.04:1
GridMinimalPerf.default 940 914 1.03:1
HeaderSlotsPerf.default 1836 1778 1.03:1
ListCommonPerf.default 1112 1083 1.03:1
ProviderMergeThemesPerf.default 1367 1331 1.03:1
TreeMinimalPerf.default 1343 1303 1.03:1
ItemLayoutMinimalPerf.default 2245 2198 1.02:1
ReactionMinimalPerf.default 2676 2636 1.02:1
RefMinimalPerf.default 221 216 1.02:1
Button.Fluent 165 161 1.02:1
DialogMinimalPerf.default 1930 1904 1.01:1
InputMinimalPerf.default 1111 1099 1.01:1
SplitButtonMinimalPerf.default 13627 13523 1.01:1
ChatMinimalPerf.default 586 584 1:1
DividerMinimalPerf.default 1051 1050 1:1
FormMinimalPerf.default 1020 1025 1:1
RadioGroupMinimalPerf.default 628 630 1:1
TextAreaMinimalPerf.default 3468 3461 1:1
Dialog.Fluent 2034 2024 1:1
Icon.Fluent 888 886 1:1
AttachmentMinimalPerf.default 919 928 0.99:1
EmbedMinimalPerf.default 6456 6532 0.99:1
IconMinimalPerf.default 416 422 0.99:1
StatusMinimalPerf.default 362 367 0.99:1
CustomToolbarPrototype.default 3978 4030 0.99:1
Avatar.Fluent 1115 1129 0.99:1
Dropdown.Fluent 3769 3789 0.99:1
AccordionMinimalPerf.default 272 278 0.98:1
CheckboxMinimalPerf.default 4182 4260 0.98:1
LoaderMinimalPerf.default 1105 1125 0.98:1
MenuButtonMinimalPerf.default 1971 2016 0.98:1
SliderMinimalPerf.default 1647 1674 0.98:1
VideoMinimalPerf.default 994 1019 0.98:1
AlertMinimalPerf.default 632 651 0.97:1
AttachmentSlotsPerf.default 3519 3636 0.97:1
ButtonMinimalPerf.default 143 148 0.97:1
CarouselMinimalPerf.default 2047 2118 0.97:1
ListMinimalPerf.default 432 446 0.97:1
AnimationMinimalPerf.default 681 706 0.96:1
ButtonSlotsPerf.default 709 742 0.96:1
DropdownMinimalPerf.default 3529 3686 0.96:1
LabelMinimalPerf.default 373 389 0.96:1
Slider.Fluent 1594 1669 0.96:1
TextMinimalPerf.default 385 406 0.95:1
Image.Fluent 369 393 0.94:1
PopupMinimalPerf.default 423 457 0.93:1
ChatWithPopoverPerf.default 589 640 0.92:1
BoxMinimalPerf.default 363 400 0.91:1
ProviderMinimalPerf.default 637 712 0.89:1
ChatDuplicateMessagesPerf.default 443 504 0.88:1
PortalMinimalPerf.default 313 354 0.88:1
DropdownManyItemsPerf.default 326 385 0.85:1

@DustyTheBot
Copy link

DustyTheBot commented Feb 26, 2020

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Generated by 🚫 dangerJS against 681e478

@aneeshack4
Copy link
Contributor

@kolaps33 Any updates on this?

Copy link
Contributor

@silviuaavram silviuaavram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome!

@kolaps33 kolaps33 merged commit 1091dd9 into microsoft:master Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants