Open
Description
Based on the custom nature of dropdowns, dropdown selects are pretty useless when it comes to screen readers.
SR needs tags like aria-activedescendant
and role="listbox"
, which are rollable with markup...
{{#ui-dropdown
onChange=(action (mut value))
as |execute mapper|}}
<div class="default text">
--Select--
</div>
<i class="dropdown icon"></i>
<ul id="anId" class="menu" role="listbox" aria-activedescendant="anId__{{value}}">
{{#each itemArray as |item|}}
<li id="anId__{{item}}"
class="item"
role="option"
data-value="{{map-value mapper item}}">
{{item}}
</li>
{{/each}}
</ul>
{{/ui-dropdown}}
But, the listbox is triggered by js, which for aria has to be a popup
. To do this, we would need to bind a aria-haspopup
attr to the triggering button to reference the listbox menu, and in tandem set aria-expanded
to true. Without introducing an ember-specific anti-pattern, this seems impossible to implement.
I'm definitely open to hearing ideas here if someone has figured this out.
Metadata
Metadata
Assignees
Labels
No labels