a11y-style-guide icon indicating copy to clipboard operation
a11y-style-guide copied to clipboard

Create accessible progress bar

Open stuartjnelson opened this issue 7 years ago • 6 comments

Issue

Create an accessible progress bar example using <progress> MDN page on progressbar role .

stuartjnelson avatar Jan 15 '18 21:01 stuartjnelson

Is this an issue for creating a native <progress> example, a custom role="progress", or both?

scottaohara avatar Jan 15 '18 21:01 scottaohara

Both. Do you think that would be useful?

On 15 Jan 2018 1:35 pm, "scottaohara" [email protected] wrote:

Is this an issue for creating a native example, a custom role="progress", or both?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cehfisher/a11y-style-guide/issues/195#issuecomment-357794349, or mute the thread https://github.com/notifications/unsubscribe-auth/AFhwNm98RQ2zRhpO7qaYKlM9HowlcPYrks5tK8STgaJpZM4Re8lj .

stuartjnelson avatar Jan 15 '18 23:01 stuartjnelson

Sure, they could be useful.

Native progress bars have really good support, but for some of the more 'designed' progress bars I've seen (multiple progress levels indicated in a single bar), there could be a use case for an ARIA version.

scottaohara avatar Jan 16 '18 12:01 scottaohara

so...many months later.

My findings on styling native progress bars to help guide the decision here...

scottaohara avatar Oct 04 '18 11:10 scottaohara

Worth writing content to note the difference between a progress bar and a meter

scottaohara avatar Oct 26 '18 04:10 scottaohara

https://scottaohara.github.io/a11y_styled_form_controls/src/progress-bar/

Usage note: Though the progress element is largely reporting the correct information to browsers, screen readers have quite a few kinks in how they announce the element to users.

At the time of testing, a styled progress bar won't be fully accessible in all screen reader and browser pairings. Instead it may be more appropriate to simply treat the progress bar as a visual decoration, hide it from screen readers, and provide visually hidden text as a means to consistently convey the information.

Because styling forms is (still) hard to get right; an alternative solution that wouldn't hurt to bring up, while I can not argue is any less of a hack would be to use <progress> but visually hide it using the .sr-only class and style a sibling element or perhaps its pseudo element(s).

The same approach is applicable to <meter>.

Malvoz avatar Jun 28 '19 13:06 Malvoz