ARIA progressbar must have an accessible name
修正方法
Correct markup solutions
The aria-progressbar-name
rule has three markup patterns that pass test criteria:
<div role="progressbar" id="alb" aria-labelledby="labeldiv"></div>
<div role="progressbar" id="combo" aria-label="Aria Name">Name</div>
<div role="progressbar" id="title" title="Title"></div>
Ensure that each element with
role="progressbar"
has one of the following characteristics:- Non-empty
aria-label
attribute. aria-labelledby
pointing to element with text which is discernible to screen reader users.
- Non-empty
Incorrect markup solutions
The aria-progressbar-name
rule has four markup patterns that fail testing criteria:
<div role="progressbar" id="empty"></div>
<div role="progressbar" id="alempty" aria-label=""></div>
<div role="progressbar" id="albmissing" aria-labelledby="nonexistent"></div>
<div role="progressbar" id="albempty" aria-labelledby="emptydiv"></div>
<div id="emptydiv"></div>
なぜ重要なのか
Screen reader users are not able to discern the purpose of elements with role="progressbar"
that do not have an accessible name.
ルールの説明
Aria progressbar elements must have discernible text that clearly describes the destination, purpose, function, or action for screen reader users.
仕組みについて (簡単に言うと)
Checks all elements with role="progressbar"
to ensure that they have a discernable, accessible name.