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

fix(ui-progress,ui-side-nav-bar): improve a11y for Progress and SideNavBar examples #1710

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/ui-progress/src/ProgressBar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,3 +353,14 @@ The `shouldAnimate` prop makes the progress bar animate the transition between v

render(<Example />)
```

```js
---
type: embed
---
<Guidelines>
<Figure recommendation="a11y" title="Accessibility">
<Figure.Item>If the progress bar conveys more information than just an approximate progress of a task (for example "5 or 23 items downloaded") then show this information as text too.</Figure.Item>
</Figure>
</Guidelines>
```
11 changes: 11 additions & 0 deletions packages/ui-progress/src/ProgressCircle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,14 @@ type: example
valueNow={33}
/>
```

```js
---
type: embed
---
<Guidelines>
<Figure recommendation="a11y" title="Accessibility">
<Figure.Item>If the progress bar conveys more information than just an approximate progress of a task (for example "5 or 23 items downloaded") then show this information as text too.</Figure.Item>
</Figure>
</Guidelines>
```
10 changes: 9 additions & 1 deletion packages/ui-side-nav-bar/src/SideNavBar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ type: example
href="#"
/>
<SideNavBar.Item
icon={<Badge count={99}><IconInboxLine /></Badge>}
icon={<Badge count={99}
formatOutput={function (formattedCount) {
return (
<AccessibleContent alt={`You have ${formattedCount} unread messages.`}>
{formattedCount}
</AccessibleContent>
)
}}
><IconInboxLine /></Badge>}
label="Inbox"
href="#"
/>
Expand Down
Loading