Skip to content

Commit cbef3bc

Browse files
committed
fix: address pr feedback
1 parent 85a442b commit cbef3bc

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

packages/progress-bar/README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,21 @@ import { ProgressBar } from '@spectrum-web-components/progress-bar';
2626

2727
### Anatomy
2828

29+
Progress bars have the following parts:
30+
2931
- **Label:** Progress bars should have a label that gives context about the operation being performed. Use an ellipsis at the end of the label text to communicate that the process is in progress.
30-
- **Value label:** Progress bars can have a value label that gives detailed information about the progress. This value label works alongside the label and should not be displayed if the label itself is not displayed. The value label is always placed above the track.
32+
- **Value label:** Progress bars can have a value label that gives detailed information about the progress. This value label works alongside the label and should not be displayed if the label itself is not displayed. The value label is always placed above the track. Use the `progress` attribute to set the value label.
33+
34+
```html
35+
<sp-progress-bar
36+
label="Generating images..."
37+
progress="58"
38+
></sp-progress-bar>
39+
```
3140

32-
Labels are set using the `label` slot and values are set using the `progress` slot.
41+
### Options
3342

34-
## Sizes
43+
#### Sizes
3544

3645
<sp-tabs selected="m" auto label="Size Attribute Options">
3746
<sp-tab value="s">Small</sp-tab>
@@ -100,7 +109,6 @@ Labels are set using the `label` slot and values are set using the `progress` sl
100109
</sp-tab-panel>
101110
</sp-tabs>
102111

103-
### Options
104112

105113
#### Variants
106114

@@ -164,4 +172,10 @@ A progress bar can be delivered with its labeling displayed above its visual ind
164172

165173
### Accessibility
166174

167-
An `sp-progress-bar` element will register itself as a `role="progressbar"` element in the accessibility tree. Any value applied to the `label` attribute will be used both to visibly label the element and to set the `aria-label` attribute on the host. In cases where a visible label is not desired, be sure to include an `aria-label` attribute manually to ensure that the `sp-progress-bar` correctly fulfills its responsibilities to visitors of you site of all abilities.
175+
An `sp-progress-bar` element will register itself as a `role="progressbar"` element in the accessibility tree. Any value applied to the `label` attribute will be used both to visibly label the element and to set the `aria-label` attribute on the host.
176+
177+
#### Include a label
178+
179+
Progress bars should have a label that gives context about the operation being performed. Use an ellipsis at the end of the label text to communicate that the process is in progress.
180+
181+
In rare cases where a visible label is not desired, context is sufficient and an accessibility expert has reviewed the design, be sure to include an `aria-label` attribute or an `aria-labelledby` attribute to manually to ensure that the `sp-progress-bar` correctly fulfills its responsibilities to visitors of your site of all abilities.

0 commit comments

Comments
 (0)