material-web icon indicating copy to clipboard operation
material-web copied to clipboard

Cannot label progress and other accessibility issues

Open steverep opened this issue 3 years ago • 1 comments

Describe the bug The mwc-linear-progress and mwc-circular-progress components provide no way to give the element with role="progressbar" an accessible name through their APIs. There are also several other ARIA attributes not supported. Furthermore, omitting both the progress and indeterminate properties in the API does not result in something accessible.

I would recommend the following changes:

  1. Provide a property to set aria-label and/or aria-labeledby
  2. Provide a way to set aria-describedby
  3. Get rid of the indeterminate property and just allow the progress property to have type string | number | null. Then:
progress type Render as
number aria-valuenow="number"
string aria-valuetext="string"
null or "" Treat as indeterminate and omit both aria-valuenow and aria-valuetext

To Reproduce n/a

Expected behavior Component API should, at a minimum, support all required ARIA states and properties for the progress bar role, and should render something accessible when API properties are omitted.

Screenshots

Browser Version (please complete the following information): n/a

Additional context ARIA 1.2 Progress bar role

steverep avatar Mar 13 '22 19:03 steverep

Getting ready to patch this downstream because it's taking too long to address, and noticed today that the progress components do support aria-label but it's not documented. 👎

steverep avatar Oct 24 '22 18:10 steverep

Fixed in M3, all components support ARIA accessibility features

asyncliz avatar Apr 25 '23 04:04 asyncliz