button
does not have focus, CSS border
property is set to 1px
.button
does have focus, CSS border
property is set to 3px
and padding is reduced by 2px
.menuitem
does not have focus, CSS border
property is set to none
.menuitem
does have focus, CSS border
property is set to 2px
and padding is reduced by 2px
.button
.aria-haspopup="true"
attribute.
aria-controls
attribute references the id
of the element with the menu
role.
aria-expanded="true"
when menu is open, otherwise attribute is not present.
ul
element has the role="menu"
.ul
element has the aria-labelledby="id-mb"
to provide an accessible name for the menu.a
elements have the role="menuitem"
.
li
elements have the role="none"
, since the list item semantics are not needed due to the menuitem
roles being on the a
elements.
Includes keyboard support required by the menu button design pattern: