Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listbox Example with Grouped Options: Apply aria-hidden to option group label #1528

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/listbox/listbox-grouped.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@ <h2 id="ex_label">Example</h2>
<span id="ss_elem" class="listbox-label">Choose your animal sidekick</span>
<div id="ss_elem_list" tabindex="0" role="listbox" aria-labelledby="ss_elem">
<ul role="group" aria-labelledby="cat1">
<li role="presentation" id="cat1">Land</li>
<li aria-hidden="true" id="cat1">Land</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using aria-hidden to manage screen reader verbosity related to elements referenced by aria-labelledby has been contraversial. The task force has not supported doing so. It is a technique that can have severe negative consequences. In this particular case, it might be innocuous, but is addressing a symptom of a larger problem rather than the root cause, doing so with a risky approach.

<li id="ss_elem_1" role="option">Cat</li>
<li id="ss_elem_2" role="option">Dog</li>
<li id="ss_elem_3" role="option">Tiger</li>
<li id="ss_elem_4" role="option">Reindeer</li>
<li id="ss_elem_5" role="option">Raccoon</li>
</ul>
<ul role="group" aria-labelledby="cat2">
<li role="presentation" id="cat2">Water</li>
<li aria-hidden="true" id="cat2">Water</li>
<li id="ss_elem_6" role="option">Dolphin</li>
<li id="ss_elem_7" role="option">Flounder</li>
<li id="ss_elem_8" role="option">Eel</li>
</ul>
<ul role="group" aria-labelledby="cat3">
<li role="presentation" id="cat3">Air</li>
<li aria-hidden="true" id="cat3">Air</li>
<li id="ss_elem_9" role="option">Falcon</li>
<li id="ss_elem_10" role="option">Winged Horse</li>
<li id="ss_elem_11" role="option">Owl</li>
Expand Down