Debian Codegraph @

node/@patternfly/patternfly/docs/components/Progress/examples/Progress.md

raw
1 ---
2 id: Progress
3 section: components
4 cssPrefix: pf-v6-c-progress
5 ---## Examples
6
7 ### Simple
8
9 ```html
10 <div class="pf-v6-c-progress" id="progress-simple-example">
11 <div
12 class="pf-v6-c-progress__description"
13 id="progress-simple-example-description"
14 >Title</div>
15 <div class="pf-v6-c-progress__status" aria-hidden="true">
16 <span class="pf-v6-c-progress__measure">33%</span>
17 </div>
18 <div
19 class="pf-v6-c-progress__bar"
20 role="progressbar"
21 aria-valuemin="0"
22 aria-valuemax="100"
23 aria-valuenow="33"
24 aria-labelledby="progress-simple-example-description"
25 >
26 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
27 </div>
28 </div>
29
30 ```
31
32 ### Small
33
34 ```html
35 <div class="pf-v6-c-progress pf-m-sm" id="progress-sm-example">
36 <div
37 class="pf-v6-c-progress__description"
38 id="progress-sm-example-description"
39 >Title</div>
40 <div class="pf-v6-c-progress__status" aria-hidden="true">
41 <span class="pf-v6-c-progress__measure">33%</span>
42 </div>
43 <div
44 class="pf-v6-c-progress__bar"
45 role="progressbar"
46 aria-valuemin="0"
47 aria-valuemax="100"
48 aria-valuenow="33"
49 aria-labelledby="progress-sm-example-description"
50 >
51 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
52 </div>
53 </div>
54
55 ```
56
57 ### Large
58
59 ```html
60 <div class="pf-v6-c-progress pf-m-lg" id="progress-lg-example">
61 <div
62 class="pf-v6-c-progress__description"
63 id="progress-lg-example-description"
64 >Title</div>
65 <div class="pf-v6-c-progress__status" aria-hidden="true">
66 <span class="pf-v6-c-progress__measure">33%</span>
67 </div>
68 <div
69 class="pf-v6-c-progress__bar"
70 role="progressbar"
71 aria-valuemin="0"
72 aria-valuemax="100"
73 aria-valuenow="33"
74 aria-labelledby="progress-lg-example-description"
75 >
76 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
77 </div>
78 </div>
79
80 ```
81
82 ### Outside
83
84 ```html
85 <div
86 class="pf-v6-c-progress pf-m-outside pf-m-lg"
87 id="progress-outside-example"
88 >
89 <div
90 class="pf-v6-c-progress__description"
91 id="progress-outside-example-description"
92 >Title</div>
93 <div class="pf-v6-c-progress__status" aria-hidden="true">
94 <span class="pf-v6-c-progress__measure">33%</span>
95 </div>
96 <div
97 class="pf-v6-c-progress__bar"
98 role="progressbar"
99 aria-valuemin="0"
100 aria-valuemax="100"
101 aria-valuenow="33"
102 aria-labelledby="progress-outside-example-description"
103 >
104 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
105 </div>
106 </div>
107
108 ```
109
110 ### Inside
111
112 ```html
113 <div class="pf-v6-c-progress pf-m-lg pf-m-inside" id="progress-inside-example">
114 <div
115 class="pf-v6-c-progress__description"
116 id="progress-inside-example-description"
117 >Title</div>
118 <div class="pf-v6-c-progress__status" aria-hidden="true"></div>
119 <div
120 class="pf-v6-c-progress__bar"
121 role="progressbar"
122 aria-valuemin="0"
123 aria-valuemax="100"
124 aria-valuenow="33"
125 aria-labelledby="progress-inside-example-description"
126 >
127 <div class="pf-v6-c-progress__indicator" style="width:33%;">
128 <span class="pf-v6-c-progress__measure">33%</span>
129 </div>
130 </div>
131 </div>
132
133 ```
134
135 ### Outside static width measure
136
137 ```html
138 <div
139 class="pf-v6-c-progress pf-m-outside pf-m-lg"
140 id="progress-outside-static-width-example"
141 >
142 <div class="pf-v6-c-progress__status" aria-hidden="true">
143 <span class="pf-v6-c-progress__measure pf-m-static-width">1%</span>
144 </div>
145 <div
146 class="pf-v6-c-progress__bar"
147 role="progressbar"
148 aria-valuemin="0"
149 aria-valuemax="100"
150 aria-valuenow="1"
151 aria-label="Progress status"
152 >
153 <div class="pf-v6-c-progress__indicator" style="width:1%;"></div>
154 </div>
155 </div>
156 <br />
157
158 <div
159 class="pf-v6-c-progress pf-m-outside pf-m-lg"
160 id="progress-outside-static-width-2-example"
161 >
162 <div class="pf-v6-c-progress__status" aria-hidden="true">
163 <span class="pf-v6-c-progress__measure pf-m-static-width">50%</span>
164 </div>
165 <div
166 class="pf-v6-c-progress__bar"
167 role="progressbar"
168 aria-valuemin="0"
169 aria-valuemax="100"
170 aria-valuenow="50"
171 aria-label="Progress status"
172 >
173 <div class="pf-v6-c-progress__indicator" style="width:50%;"></div>
174 </div>
175 </div>
176 <br />
177
178 <div
179 class="pf-v6-c-progress pf-m-outside pf-m-lg"
180 id="progress-outside-static-width-3-example"
181 >
182 <div class="pf-v6-c-progress__status" aria-hidden="true">
183 <span class="pf-v6-c-progress__measure pf-m-static-width">100%</span>
184 </div>
185 <div
186 class="pf-v6-c-progress__bar"
187 role="progressbar"
188 aria-valuemin="0"
189 aria-valuemax="100"
190 aria-valuenow="100"
191 aria-label="Progress status"
192 >
193 <div class="pf-v6-c-progress__indicator" style="width:100%;"></div>
194 </div>
195 </div>
196 <br />
197 <br />
198
199 <div
200 class="pf-v6-c-progress pf-m-outside pf-m-lg"
201 id="progress-outside-static-width-4-example"
202 style="--pf-v6-c-progress__measure--m-static-width--MinWidth: 6ch;"
203 >
204 <div class="pf-v6-c-progress__status" aria-hidden="true">
205 <span class="pf-v6-c-progress__measure pf-m-static-width">1,000</span>
206 </div>
207 <div
208 class="pf-v6-c-progress__bar"
209 role="progressbar"
210 aria-valuemin="0"
211 aria-valuemax="100000"
212 aria-valuenow="1000"
213 aria-label="Progress status"
214 >
215 <div class="pf-v6-c-progress__indicator" style="width:1%;"></div>
216 </div>
217 </div>
218 <br />
219
220 <div
221 class="pf-v6-c-progress pf-m-outside pf-m-lg"
222 id="progress-outside-static-width-5-example"
223 style="--pf-v6-c-progress__measure--m-static-width--MinWidth: 6ch;"
224 >
225 <div class="pf-v6-c-progress__status" aria-hidden="true">
226 <span class="pf-v6-c-progress__measure pf-m-static-width">50,000</span>
227 </div>
228 <div
229 class="pf-v6-c-progress__bar"
230 role="progressbar"
231 aria-valuemin="0"
232 aria-valuemax="100000"
233 aria-valuenow="50000"
234 aria-label="Progress status"
235 >
236 <div class="pf-v6-c-progress__indicator" style="width:50%;"></div>
237 </div>
238 </div>
239 <br />
240
241 <div
242 class="pf-v6-c-progress pf-m-outside pf-m-lg"
243 id="progress-outside-static-width-6-example"
244 style="--pf-v6-c-progress__measure--m-static-width--MinWidth: 6ch;"
245 >
246 <div class="pf-v6-c-progress__status" aria-hidden="true">
247 <span class="pf-v6-c-progress__measure pf-m-static-width">100,000</span>
248 </div>
249 <div
250 class="pf-v6-c-progress__bar"
251 role="progressbar"
252 aria-valuemin="0"
253 aria-valuemax="100000"
254 aria-valuenow="100000"
255 aria-label="Progress status"
256 >
257 <div class="pf-v6-c-progress__indicator" style="width:100%;"></div>
258 </div>
259 </div>
260
261 ```
262
263 ### On single line
264
265 ```html
266 <div class="pf-v6-c-progress pf-m-singleline" id="progress-singleline-example">
267 <div class="pf-v6-c-progress__status" aria-hidden="true">
268 <span class="pf-v6-c-progress__measure">33%</span>
269 </div>
270 <div
271 class="pf-v6-c-progress__bar"
272 role="progressbar"
273 aria-valuemin="0"
274 aria-valuemax="100"
275 aria-valuenow="33"
276 aria-label="Progress status"
277 >
278 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
279 </div>
280 </div>
281
282 ```
283
284 ### Without measure
285
286 ```html
287 <div class="pf-v6-c-progress" id="progress-no-measure-example">
288 <div
289 class="pf-v6-c-progress__description"
290 id="progress-no-measure-example-description"
291 >Title</div>
292 <div
293 class="pf-v6-c-progress__bar"
294 role="progressbar"
295 aria-valuemin="0"
296 aria-valuemax="100"
297 aria-valuenow="33"
298 aria-labelledby="progress-no-measure-example-description"
299 >
300 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
301 </div>
302 </div>
303
304 ```
305
306 ### Finite step
307
308 ```html
309 <div class="pf-v6-c-progress" id="progress-finite-step-example">
310 <div
311 class="pf-v6-c-progress__description"
312 id="progress-finite-step-example-description"
313 >Title</div>
314 <div class="pf-v6-c-progress__status" aria-hidden="true">
315 <span class="pf-v6-c-progress__measure">2 of 5 units</span>
316 </div>
317 <div
318 class="pf-v6-c-progress__bar"
319 role="progressbar"
320 aria-valuemin="0"
321 aria-valuemax="5"
322 aria-valuenow="2"
323 aria-valuetext="2 of 5 units"
324 aria-labelledby="progress-finite-step-example-description"
325 >
326 <div class="pf-v6-c-progress__indicator" style="width:40%;"></div>
327 </div>
328 </div>
329
330 ```
331
332 ### Truncate description
333
334 ```html
335 <div class="pf-v6-c-progress" id="progress-truncate-description-example">
336 <div
337 class="pf-v6-c-progress__description pf-m-truncate"
338 id="progress-truncate-description-example-description"
339 tabindex="0"
340 >Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis ultricies lectus, eu lobortis mauris. Morbi pretium arcu id rhoncus mollis. Donec accumsan tincidunt enim nec varius. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Suspendisse potenti.</div>
341 <div class="pf-v6-c-progress__status" aria-hidden="true">
342 <span class="pf-v6-c-progress__measure">33%</span>
343 </div>
344 <div
345 class="pf-v6-c-progress__bar"
346 role="progressbar"
347 aria-valuemin="0"
348 aria-valuemax="100"
349 aria-valuenow="33"
350 aria-labelledby="progress-truncate-description-example-description"
351 >
352 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
353 </div>
354 </div>
355
356 ```
357
358 ### Helper text
359
360 ```html
361 <div class="pf-v6-c-progress" id="progress-helper-text-example">
362 <div
363 class="pf-v6-c-progress__description"
364 id="progress-helper-text-example-description"
365 >Title</div>
366 <div class="pf-v6-c-progress__status" aria-hidden="true">
367 <span class="pf-v6-c-progress__measure">33%</span>
368 </div>
369 <div
370 class="pf-v6-c-progress__bar"
371 role="progressbar"
372 aria-valuemin="0"
373 aria-valuemax="100"
374 aria-valuenow="33"
375 aria-describedby="progress-helper-text-example-help-text"
376 aria-labelledby="progress-helper-text-example-description"
377 >
378 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
379 </div>
380 <div class="pf-v6-c-progress__helper-text">
381 <div
382 class="pf-v6-c-helper-text"
383 id="progress-helper-text-example-help-text"
384 >
385 <div class="pf-v6-c-helper-text__item">
386 <span class="pf-v6-c-helper-text__item-text">Progress helper text</span>
387 </div>
388 </div>
389 </div>
390 </div>
391
392 ```
393
394 ### Non-percentage progress
395
396 If the status that displays with the bar is not a percentage, then the ARIA tag `aria-valuetext` should be used to provide this status to screen reader users. This is the only case when setting the `aria-valuemax` to a value other than "100" is recommended, given how different screen readers handle these attributes.
397
398 ### Progress step instruction
399
400 ```html
401 <div class="pf-v6-c-progress" id="progress-step-instruction-example">
402 <div
403 class="pf-v6-c-progress__description"
404 id="progress-step-instruction-example-description"
405 >Title</div>
406 <div class="pf-v6-c-progress__status" aria-hidden="true">
407 <span class="pf-v6-c-progress__measure">Step 2: Copying files</span>
408 </div>
409 <div
410 class="pf-v6-c-progress__bar"
411 role="progressbar"
412 aria-valuemin="0"
413 aria-valuemax="5"
414 aria-valuenow="2"
415 aria-valuetext="Step 2: Copying files"
416 aria-labelledby="progress-step-instruction-example-description"
417 >
418 <div class="pf-v6-c-progress__indicator" style="width:40%;"></div>
419 </div>
420 </div>
421
422 ```
423
424 ## Status examples
425
426 When conveying status, you should ensure:
427
428 * There is visible helper text that explains the status.
429 * The helper text includes the status icon, as seen in our HTML [helper text component](/components/helper-text).
430 * The helper text is linked to the `.pf-v6-c-progress__bar[role="progressbar"]` element via an `aria-describedby` attribute, as seen in the [progress helper text example](#helper-text).
431
432 ### Success
433
434 ```html
435 <div class="pf-v6-c-progress pf-m-success" id="progress-success-example">
436 <div
437 class="pf-v6-c-progress__description"
438 id="progress-success-example-description"
439 >Title</div>
440 <div class="pf-v6-c-progress__status" aria-hidden="true">
441 <span class="pf-v6-c-progress__measure">100%</span>
442 <span class="pf-v6-c-progress__status-icon">
443 <svg
444 class="pf-v6-svg"
445 fill="currentColor"
446 viewBox="0 0 32 32"
447 aria-hidden="true"
448 role="img"
449 width="1em"
450 height="1em"
451 >
452 <path
453 d="M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm7.795 11.795-8.646 8.646c-.317.317-.733.475-1.149.475s-.832-.158-1.149-.475l-4.646-4.646a1.126 1.126 0 0 1 1.591-1.591l4.205 4.205 8.205-8.205a1.126 1.126 0 0 1 1.591 1.591Z"
454 />
455 </svg>
456 </span>
457 </div>
458 <div
459 class="pf-v6-c-progress__bar"
460 role="progressbar"
461 aria-valuemin="0"
462 aria-valuemax="100"
463 aria-valuenow="100"
464 aria-labelledby="progress-success-example-description"
465 >
466 <div class="pf-v6-c-progress__indicator" style="width:100%;"></div>
467 </div>
468 </div>
469
470 ```
471
472 ### Warning
473
474 ```html
475 <div class="pf-v6-c-progress pf-m-warning" id="progress-warning-example">
476 <div
477 class="pf-v6-c-progress__description"
478 id="progress-warning-example-description"
479 >Title</div>
480 <div class="pf-v6-c-progress__status" aria-hidden="true">
481 <span class="pf-v6-c-progress__measure">100%</span>
482 <span class="pf-v6-c-progress__status-icon">
483 <svg
484 class="pf-v6-svg"
485 fill="currentColor"
486 viewBox="0 0 32 32"
487 aria-hidden="true"
488 role="img"
489 width="1em"
490 height="1em"
491 >
492 <path
493 d="m31.874 28.514-15.011-27a1.001 1.001 0 0 0-1.748 0l-15.011 27A1 1 0 0 0 .978 30H31a1 1 0 0 0 .874-1.486ZM14.5 12a1.5 1.5 0 0 1 3 0v5a1.5 1.5 0 0 1-3 0v-5ZM16 26.001a2 2 0 1 1-.001-3.999A2 2 0 0 1 16 26.001Z"
494 />
495 </svg>
496 </span>
497 </div>
498 <div
499 class="pf-v6-c-progress__bar"
500 role="progressbar"
501 aria-valuemin="0"
502 aria-valuemax="100"
503 aria-valuenow="100"
504 aria-labelledby="progress-warning-example-description"
505 >
506 <div class="pf-v6-c-progress__indicator" style="width:100%;"></div>
507 </div>
508 </div>
509
510 ```
511
512 ### Failure
513
514 ```html
515 <div class="pf-v6-c-progress pf-m-danger" id="progress-failure-example">
516 <div
517 class="pf-v6-c-progress__description"
518 id="progress-failure-example-description"
519 >Title</div>
520 <div class="pf-v6-c-progress__status" aria-hidden="true">
521 <span class="pf-v6-c-progress__measure">33%</span>
522 <span class="pf-v6-c-progress__status-icon">
523 <svg
524 class="pf-v6-svg"
525 fill="currentColor"
526 viewBox="0 0 32 32"
527 aria-hidden="true"
528 role="img"
529 width="1em"
530 height="1em"
531 >
532 <path
533 d="M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm-1.5 8a1.5 1.5 0 1 1 3 0v7a1.5 1.5 0 1 1-3 0V9ZM16 25.001a2 2 0 1 1-.001-3.999A2 2 0 0 1 16 25.001Z"
534 />
535 </svg>
536 </span>
537 </div>
538 <div
539 class="pf-v6-c-progress__bar"
540 role="progressbar"
541 aria-valuemin="0"
542 aria-valuemax="100"
543 aria-valuenow="33"
544 aria-labelledby="progress-failure-example-description"
545 >
546 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
547 </div>
548 </div>
549
550 ```
551
552 ### Inside success
553
554 ```html
555 <div
556 class="pf-v6-c-progress pf-m-lg pf-m-inside pf-m-success"
557 id="progress-inside-success-example"
558 >
559 <div
560 class="pf-v6-c-progress__description"
561 id="progress-inside-success-example-description"
562 >Title</div>
563 <div class="pf-v6-c-progress__status" aria-hidden="true">
564 <span class="pf-v6-c-progress__status-icon">
565 <svg
566 class="pf-v6-svg"
567 fill="currentColor"
568 viewBox="0 0 32 32"
569 aria-hidden="true"
570 role="img"
571 width="1em"
572 height="1em"
573 >
574 <path
575 d="M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm7.795 11.795-8.646 8.646c-.317.317-.733.475-1.149.475s-.832-.158-1.149-.475l-4.646-4.646a1.126 1.126 0 0 1 1.591-1.591l4.205 4.205 8.205-8.205a1.126 1.126 0 0 1 1.591 1.591Z"
576 />
577 </svg>
578 </span>
579 </div>
580 <div
581 class="pf-v6-c-progress__bar"
582 role="progressbar"
583 aria-valuemin="0"
584 aria-valuemax="100"
585 aria-valuenow="100"
586 aria-labelledby="progress-inside-success-example-description"
587 >
588 <div class="pf-v6-c-progress__indicator" style="width:100%;">
589 <span class="pf-v6-c-progress__measure">100%</span>
590 </div>
591 </div>
592 </div>
593
594 ```
595
596 ### Inside warning
597
598 ```html
599 <div
600 class="pf-v6-c-progress pf-m-lg pf-m-inside pf-m-warning"
601 id="progress-inside-warning-example"
602 >
603 <div
604 class="pf-v6-c-progress__description"
605 id="progress-inside-warning-example-description"
606 >Title</div>
607 <div class="pf-v6-c-progress__status" aria-hidden="true">
608 <span class="pf-v6-c-progress__status-icon">
609 <svg
610 class="pf-v6-svg"
611 fill="currentColor"
612 viewBox="0 0 32 32"
613 aria-hidden="true"
614 role="img"
615 width="1em"
616 height="1em"
617 >
618 <path
619 d="m31.874 28.514-15.011-27a1.001 1.001 0 0 0-1.748 0l-15.011 27A1 1 0 0 0 .978 30H31a1 1 0 0 0 .874-1.486ZM14.5 12a1.5 1.5 0 0 1 3 0v5a1.5 1.5 0 0 1-3 0v-5ZM16 26.001a2 2 0 1 1-.001-3.999A2 2 0 0 1 16 26.001Z"
620 />
621 </svg>
622 </span>
623 </div>
624 <div
625 class="pf-v6-c-progress__bar"
626 role="progressbar"
627 aria-valuemin="0"
628 aria-valuemax="100"
629 aria-valuenow="100"
630 aria-labelledby="progress-inside-warning-example-description"
631 >
632 <div class="pf-v6-c-progress__indicator" style="width:100%;">
633 <span class="pf-v6-c-progress__measure">100%</span>
634 </div>
635 </div>
636 </div>
637
638 ```
639
640 ### Outside failure
641
642 ```html
643 <div
644 class="pf-v6-c-progress pf-m-outside pf-m-lg pf-m-danger"
645 id="progress-outside-failure-example"
646 >
647 <div
648 class="pf-v6-c-progress__description"
649 id="progress-outside-failure-example-description"
650 >Title</div>
651 <div class="pf-v6-c-progress__status" aria-hidden="true">
652 <span class="pf-v6-c-progress__measure">33%</span>
653 <span class="pf-v6-c-progress__status-icon">
654 <svg
655 class="pf-v6-svg"
656 fill="currentColor"
657 viewBox="0 0 32 32"
658 aria-hidden="true"
659 role="img"
660 width="1em"
661 height="1em"
662 >
663 <path
664 d="M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm-1.5 8a1.5 1.5 0 1 1 3 0v7a1.5 1.5 0 1 1-3 0V9ZM16 25.001a2 2 0 1 1-.001-3.999A2 2 0 0 1 16 25.001Z"
665 />
666 </svg>
667 </span>
668 </div>
669 <div
670 class="pf-v6-c-progress__bar"
671 role="progressbar"
672 aria-valuemin="0"
673 aria-valuemax="100"
674 aria-valuenow="33"
675 aria-labelledby="progress-outside-failure-example-description"
676 >
677 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
678 </div>
679 </div>
680
681 ```
682
683 ### Failure without measure
684
685 ```html
686 <div
687 class="pf-v6-c-progress pf-m-danger"
688 id="progress-no-measure-failure-example"
689 >
690 <div
691 class="pf-v6-c-progress__description"
692 id="progress-no-measure-failure-example-description"
693 >Title</div>
694 <div class="pf-v6-c-progress__status" aria-hidden="true">
695 <span class="pf-v6-c-progress__status-icon">
696 <svg
697 class="pf-v6-svg"
698 fill="currentColor"
699 viewBox="0 0 32 32"
700 aria-hidden="true"
701 role="img"
702 width="1em"
703 height="1em"
704 >
705 <path
706 d="M16 1C7.729 1 1 7.729 1 16s6.729 15 15 15 15-6.729 15-15S24.271 1 16 1Zm-1.5 8a1.5 1.5 0 1 1 3 0v7a1.5 1.5 0 1 1-3 0V9ZM16 25.001a2 2 0 1 1-.001-3.999A2 2 0 0 1 16 25.001Z"
707 />
708 </svg>
709 </span>
710 </div>
711 <div
712 class="pf-v6-c-progress__bar"
713 role="progressbar"
714 aria-valuemin="0"
715 aria-valuemax="100"
716 aria-valuenow="33"
717 aria-labelledby="progress-no-measure-failure-example-description"
718 >
719 <div class="pf-v6-c-progress__indicator" style="width:33%;"></div>
720 </div>
721 </div>
722
723 ```
724
725 ## Documentation
726
727 ### Overview
728
729 ### Accessibility
730
731 If this component is describing the loading progress of a particular region of a page, the author should use `aria-describedby` to point to the status, and set the `aria-busy` attribute to `true` on the region until it is finished loading.
732
733 | Attribute | Applied to | Outcome |
734 | -- | -- | -- |
735 | `role="progressbar"` | `.pf-v6-c-progress__bar` | This role is used for an element that displays the progress status for a task that takes a long time or consists of several steps. |
736 | `aria-valuenow=""` | `.pf-v6-c-progress__bar` | This value needs to be updated as progress continues. |
737 | `aria-valuemin="0"` | `.pf-v6-c-progress__bar` | The minimum value for the progress bar. |
738 | `aria-valuemax="100"` | `.pf-v6-c-progress__bar` | The maximum value for the progress bar. If the progress is only defined using `aria-valuenow` (e.g a percentage), the value should be set to "100". If the progress is defined using `aria-valuetext`, then this value can be a number other than 100. For example, if `aria-valuetext` is "2 of 5 units", then `aria-valuemax` can be "5" and `aria-valuenow` can be "2". |
739 | `aria-label="[id of .pf-v6-c-progress__description]"` | `.pf-v6-c-progress__bar` | Provides an accessible name for the progress component. |
740 | `aria-labelledby="[id element that labels the progress]"` | `.pf-v6-c-progress__bar` | Provides an accessible name for the progress component. |
741 | `aria-describedby="[id of element that describes the progress]"` | `.pf-v6-c-progress__bar` | Provides an accessible description for the progress component. |
742 | `aria-valuetext="[loading state]"` | `.pf-v6-c-progress__bar` | Provide a text string that communicates current status. Only use if the important information about status is included in the text string. Do not use if percentage is the most important value to communicate. Some screen readers will ignore the percentage value determined from `aria-valuenow` when `aria-valuetext` is used. |
743 | `aria-hidden="true"` | `.pf-v6-c-progress__status` | Hides the visible progress bar status from screen readers. This information is communicated by the aria attributes defined on the `.pf-v6-c-progress__bar` element. |
744
745 ### Usage
746
747 | Class | Applied to | Outcome |
748 | -- | -- | -- |
749 | `.pf-v6-c-progress` | `<div>` | Initiates a progress component. |
750 | `.pf-v6-c-progress__description` | `<div>` | The description for a progress bar. |
751 | `.pf-v6-c-progress__status` | `<div>` | Displays the % of progress and status icons. |
752 | `.pf-v6-c-progress__measure` | `<span>` | Displays the % complete. |
753 | `.pf-v6-c-progress__status-icon` | `<span>` | Displays the status icon. (optional) |
754 | `.pf-v6-c-progress__bar` | `<div>` | Displays across the entire width and represents the completed state. |
755 | `.pf-v6-c-progress__indicator` | `<div>` | Displays with the `.pf-v6-c-progress__bar` to indicate the progress so far. |
756 | `.pf-v6-c-progress__helper-text` | `<div>` | Displays additional text below the progress bar. (optional) |
757 | `.pf-m-lg` | `.pf-v6-c-progress` | Modifies the progress bar to be larger. |
758 | `.pf-m-sm` | `.pf-v6-c-progress` | Modifies the progress bar to be smaller. |
759 | `.pf-m-inside` | `.pf-v6-c-progress` | Shows the measure within the progress indicator. NOTE: This option requires `.pf-m-lg`.|
760 | `.pf-m-outside` | `.pf-v6-c-progress` | Shows the measure and status icon to the right of the progress bar. |
761 | `.pf-m-singleline` | `.pf-v6-c-progress` | Modifies the progress component to exist on one row. If a measure is needed, use with `.pf-m-inside` or `.pf-m-outside`|
762 | `.pf-m-success` | `.pf-v6-c-progress` | Changes the appearance of the progess component to indicate a success state. |
763 | `.pf-m-warning` | `.pf-v6-c-progress` | Changes the appearance of the progess component to indicate a warning state. |
764 | `.pf-m-danger` | `.pf-v6-c-progress` | Changes the appearance of the progess component to indicate a danger (failure) state. |
765 | `.pf-m-truncate` | `.pf-v6-c-progress__description` | Modifies the description to display a single line and truncate any overflow text with ellipses. |
766 | `.pf-m-static-width` | `.pf-v6-c-progress.pf-m-outside .pf-v6-c-progress__measure` | Modifies the measure element to have a static `min-width` that will hold 0-100%. Overridable by setting `--pf-v6-c-progress__measure--m-static-width--MinWidth`. |