Skip to content

Commit

Permalink
chore: Add documentation to Progress about reduced-motion (#25563)
Browse files Browse the repository at this point in the history
* chore: Add documentation to Progress about reduced-motion

* change file
  • Loading branch information
tomi-msft authored Nov 7, 2022
1 parent 4606358 commit d8dec99
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Add styling and documentation for reduced-motion",
"packageName": "@fluentui/react-progress",
"email": "[email protected]",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions packages/react-components/react-progress/Spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@ The Progress is non-interactive.
## Accessibility

- The `determinate` Progress has the proper `aria` attributes assigned to the element that will allow screen readers to get the `max` and current `value` of the `Progress`.
- When `reduced-motion` is active, the `indeterminate` `Progress` will animate only once. Use `ProgressField` to add a `description` and `hint` message to the `Progress` bar.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ const useBarStyles = makeStyles({
animationName: indeterminateProgress,
animationDuration: '3s',
animationIterationCount: 'infinite',
'@media screen and (prefers-reduced-motion: reduce)': {
animationDuration: '0.01ms',
animationIterationCount: '1',
},
},

rtl: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Display operation description
- Show text above and/or below the bar
- Combine steps of a single operation into one bar
- Use `ProgressField` to add a `description` and `hint` message for the `indeterminate` `Progress` when `reduced-motion` is active

### Don't

Expand Down

0 comments on commit d8dec99

Please sign in to comment.