问题
From the W3C wiki
When authors use collapsible content, for example, to hide navigation menus or lists of content, the triggering link or button should indicate to screen reader users whether the collapsable content below is in the expanded or in the collapsed state. The
aria-expanded
attribute is used for this purpose.
Does this include <select>
elements or is this only for navigation items?
回答1:
The select element can accept any global aria-*
attribute, and any aria attribute applicable to the role listbox.
aria-haspopup is allowed for any role, and aria-expanded is allowed for the listbox role.
Note that, the browser should already define the default implicit semantic so you do not have to care about defining an aria
attribute to define the state of the select
control if you're using the native element.
来源:https://stackoverflow.com/questions/40085027/does-the-aria-expanded-and-aria-haspopup-attributes-apply-to-select-elements