Skip to content

Instantly share code, notes, and snippets.

@luismartinezs
Last active September 4, 2022 15:03
Show Gist options
  • Save luismartinezs/0b3badd447cfb1d2d0bf22cc58f1e20d to your computer and use it in GitHub Desktop.
Save luismartinezs/0b3badd447cfb1d2d0bf22cc58f1e20d to your computer and use it in GitHub Desktop.
Progress bar #a11y #html
<!-- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#accessibility_concerns -->
<!-- OPTION A -->
<label
>Uploading Document: <progress value="70" max="100">70 %</progress></label
>
<!-- OPTION B -->
<label for="progress-bar">Uploading Document</label>
<progress id="progress-bar" value="70" max="100">70 %</progress>
<!-- ----- -->
<!-- If the <progress> element is describing the loading progress of a section of a page -->
<div aria-busy="true" aria-describedby="progress-bar">
<!-- content for this region is loading -->
</div>
<!-- ... -->
<progress id="progress-bar" aria-label="Content loading…"></progress>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment