@spectrum-web-components/progress-bar - npm explorer
`

The above sp-progress-bar also leverages the aria-label attribute in place of the label attribute in ensure that the element is labelled correctly without that label appearing visibly in the UI.


Side label

A progress bar can be delivered with its labeling displayed above its visual indicator or to either side. Use the boolean [side-label] attribute to define where this content should appear.

`html
style="width: 240px; height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: space-around;"
>
side-label
label="Label Beside"
progress="23"
>

`


$3

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.

#### Include a 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.

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.