The root is a plain <div> carrying role="progressbar", aria-valuenow, aria-valuemin={0} and aria-valuemax={100}. The track, the rail and the value text are decoration.
- aria-valuenow is a whole number, so 40.7 is announced as 40.
- With success.percent set, the announced value is the inner run, so a bar drawn at 80 with a success run of 30 announces 30. Give a two-run bar its real state in text.
- There is no aria-valuetext, so a bar labeled “3 of 8 files” still announces 37. Put the unit in the text around it.
- aria-label and aria-labelledby reach the root, and they are the only way to name it. A progress bar with no name is announced as a bare number. Point aria-labelledby at the heading that says what is loading.
- The value text gets a title when it is a string. It only shows on hover and is not a name, so nothing should depend on it.