Last active
September 4, 2022 15:03
-
-
Save luismartinezs/0b3badd447cfb1d2d0bf22cc58f1e20d to your computer and use it in GitHub Desktop.
Progress bar #a11y #html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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