Skip to content

Conversation

@spmonahan
Copy link
Contributor

Current Behavior

Current token values fail some accessibility tests.

New Behavior

New token values pass the failing accessibility tests.

Related Issue(s)

Fixes #24014

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 21, 2022

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 62b3a34:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 21, 2022

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-alert
Alert
82.763 kB
20.582 kB
82.771 kB
20.584 kB
8 B
2 B
react-avatar
Avatar
48.172 kB
13.615 kB
48.18 kB
13.616 kB
8 B
1 B
react-avatar
AvatarGroupItem
64.878 kB
18.284 kB
64.886 kB
18.286 kB
8 B
2 B
react-badge
Badge
22.494 kB
7.157 kB
22.503 kB
7.153 kB
9 B
-4 B
react-badge
CounterBadge
23.397 kB
7.449 kB
23.406 kB
7.449 kB
9 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
188.604 kB
51.784 kB
188.673 kB
51.804 kB
69 B
20 B
react-components
react-components: FluentProvider & webLightTheme
32.688 kB
10.736 kB
32.786 kB
10.759 kB
98 B
23 B
react-popover
Popover
102.042 kB
31.308 kB
102.111 kB
31.328 kB
69 B
20 B
react-spinner
Spinner
19.932 kB
6.363 kB
19.81 kB
6.369 kB
-122 B
6 B
react-switch
Switch
32.438 kB
10.218 kB
32.465 kB
10.22 kB
27 B
2 B
react-theme
Teams: all themes
28.995 kB
6.215 kB
29.205 kB
6.249 kB
210 B
34 B
react-theme
Teams: Light theme
16.973 kB
4.86 kB
17.069 kB
4.885 kB
96 B
25 B
react-tooltip
Tooltip
41.307 kB
14.586 kB
41.313 kB
14.59 kB
6 B
4 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-accordion
Accordion (including children components)
79.485 kB
24.082 kB
react-avatar
AvatarGroup
13.43 kB
5.382 kB
react-badge
PresenceBadge
23.947 kB
7.022 kB
react-button
Button
36.396 kB
9.575 kB
react-button
CompoundButton
43.469 kB
10.812 kB
react-button
MenuButton
39.014 kB
10.456 kB
react-button
SplitButton
46.506 kB
11.827 kB
react-button
ToggleButton
51.91 kB
11.003 kB
react-card
Card - All
67.42 kB
19.249 kB
react-card
Card
63.102 kB
18.167 kB
react-card
CardFooter
8.461 kB
3.555 kB
react-card
CardHeader
9.504 kB
3.896 kB
react-card
CardPreview
8.562 kB
3.61 kB
react-combobox
Combobox (including child components)
71.331 kB
23.323 kB
react-combobox
Dropdown (including child components)
70.459 kB
23.182 kB
react-dialog
Dialog (including children components)
85.064 kB
25.293 kB
react-divider
Divider
16.321 kB
5.837 kB
react-image
Image
10.68 kB
4.215 kB
react-input
Input
23.554 kB
7.644 kB
react-label
Label
9.238 kB
3.815 kB
react-link
Link
12.197 kB
4.912 kB
react-menu
Menu (including children components)
114.702 kB
35.037 kB
react-menu
Menu (including selectable components)
117.901 kB
35.533 kB
react-overflow
hooks only
10.839 kB
4.146 kB
react-portal
Portal
10.49 kB
3.845 kB
react-positioning
usePositioning
19.656 kB
7.388 kB
react-provider
FluentProvider
15.565 kB
5.818 kB
react-radio
Radio
36.13 kB
11.947 kB
react-radio
RadioGroup
14.319 kB
5.711 kB
react-select
Select
20.746 kB
7.299 kB
react-slider
Slider
31.988 kB
10.019 kB
react-spinbutton
SpinButton
43.899 kB
12.362 kB
react-text
Text - Default
11.572 kB
4.537 kB
react-text
Text - Wrappers
14.882 kB
4.977 kB
react-textarea
Textarea
23.674 kB
7.83 kB
react-theme
Single theme token import
69 B
89 B
🤖 This report was generated against 5d985fac3569513a2808a9f3b93ad73907325e55

@size-auditor
Copy link

size-auditor bot commented Jul 21, 2022

Asset size changes

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

Baseline commit: 5d985fac3569513a2808a9f3b93ad73907325e55 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Jul 21, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1255 1278 5000
Button mount 972 973 5000
FluentProvider mount 1588 1565 5000
FluentProviderWithTheme mount 631 630 10
FluentProviderWithTheme virtual-rerender 585 589 10
FluentProviderWithTheme virtual-rerender-with-unmount 641 634 10
MakeStyles mount 1900 1938 50000
SpinButton mount 2487 2495 5000

@spmonahan spmonahan force-pushed the fix/token-value-updates branch 2 times, most recently from c5fe111 to 14db56b Compare July 22, 2022 16:20
@spmonahan spmonahan requested a review from redongreen July 26, 2022 20:36
@redongreen
Copy link

redongreen commented Jul 27, 2022

@spmonahan

Screener issues;

[Dark theme] Ghost/subtle badge & [High Contrast] Ghost/subtle badge

See my exploration and proposed solution to this issue.

[Dark theme] Checked switch

  • Thumb color expected: Neutral Foreground Inverted (correct)
  • Please confirm that you are using Compound Brand Background (rest, hover, pressed) in light and dark theme.

image

image

@spmonahan
Copy link
Contributor Author

@redongreen I had the wrong background colors for Switch but they are now updated.

@spmonahan spmonahan marked this pull request as ready for review August 4, 2022 23:33
@redongreen
Copy link

redongreen commented Aug 5, 2022

@spmonahan to address issues with Spinner verify that we are using the following tokens;

image

One known issue is that we do not have an alias token to cover light and dark mode for the inverted track, we are using a global value white @ 20% alpha.

Also, the spinner component is intended to be displayed over an overlay; therefore, the tool might fail to contrast test if no overlay is applied.

@daisygeng for visibility!

Updates the values of some neutral foreground and background
tokens to achieve better color contrast to meet accessibility
requirements.
Updates color tokens for Popover and adds a new Storybook story to make
it easier to see the different Popover appearances.
Changed from `colorBrandBackground*` to `colorCompoundBrandBackground*`.
Updates color tokens for better contrast and accessibility.
Simplifies some of the styling logic.
Adds a background wrapper to ensure inverted Spinners are consistently
visible in all test cases.
@spmonahan spmonahan force-pushed the fix/token-value-updates branch from bcaaccb to d3bc4b1 Compare August 10, 2022 16:37
We want to avoid using foreground tokens for backgrounds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Checkbox fails accessibility requirement & Update to inverted colors

8 participants