fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

chore(react-input, react-textarea): Deprecating filled with shadow appearance variants

Open sopranopillow opened this issue 3 years ago • 6 comments
trafficstars

This PR removes the filled with shadow appearance variants. This is due to the shadow appearances not being visible when used on a background that meets our contrast ratio guidelines.

This is how our current docs show the variants: image

To be able to see the shadow, a lighter background is required like this one: image

This contradicts our guidelines on using a background with enough contrast ratio for accessibility requirements.

sopranopillow avatar Sep 21 '22 23:09 sopranopillow

This PR removes the filled with shadow appearance variants due to encouraging the use of a background that doesn't meet an accessible contrast ratio.

Can you expand on the issue a bit more please?

spmonahan avatar Sep 21 '22 23:09 spmonahan

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 b4077e21af85b5026b3b10d5a934532b655079a1:

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

codesandbox-ci[bot] avatar Sep 21 '22 23:09 codesandbox-ci[bot]

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-input
Input
23.757 kB
7.704 kB
23.762 kB
7.706 kB
5 B
2 B
react-textarea
Textarea
25.013 kB
8.133 kB
25.018 kB
8.133 kB
5 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
188.672 kB
52.359 kB
react-components
react-components: FluentProvider & webLightTheme
33.394 kB
11.007 kB
react-portal-compat
PortalCompatProvider
5.851 kB
1.964 kB
react-spinbutton
SpinButton
44.102 kB
12.425 kB
🤖 This report was generated against 483f160617f1037e672fe74b8e52abfee9378517

fabricteam avatar Sep 21 '22 23:09 fabricteam

This PR removes the filled with shadow appearance variants due to encouraging the use of a background that doesn't meet an accessible contrast ratio.

Can you expand on the issue a bit more please?

I just updated it :) I'm mainly preparing this PR to discuss it next week.

sopranopillow avatar Sep 22 '22 00:09 sopranopillow

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1295 1312 5000
Button mount 933 949 5000
FluentProvider mount 1604 1571 5000
FluentProviderWithTheme mount 622 633 10
FluentProviderWithTheme virtual-rerender 591 585 10
FluentProviderWithTheme virtual-rerender-with-unmount 630 625 10
MakeStyles mount 1886 1887 50000
SpinButton mount 2529 2537 5000

fabricteam avatar Sep 22 '22 00:09 fabricteam

Asset size changes

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

Baseline commit: 483f160617f1037e672fe74b8e52abfee9378517 (build)

size-auditor[bot] avatar Sep 22 '22 00:09 size-auditor[bot]