WAI-ARIA: Role=MenuitemRadio
A checkable menuitem in a set of elements with the same role, only one of which can be checked at a time.
Description
A checkable menuitem in a set of elements with the same role, only one of which can be checked at a time.
Authors SHOULD enforce that only one menuitemradio in a group can be checked at the same time. When one item in the group is checked, the previously checked item becomes unchecked (its aria-checked attribute becomes false).
Authors MUST ensure that menu item radios are owned by an element with role group, menu, or menubar in order to identify that they are related widgets. Authors MAY separate menu items into sets by use of a separator or an element with an equivalent role from the native markup language.
If a menu or menubar contains more than one group of menuitemradio elements, or if the menu contains one group and other, unrelated menu items, authors SHOULD nest each set of related menuitemradio elements in an element using the group role, and authors SHOULD delimit the group from other menu items with an element using the separator role.
Role=MenuitemRadio Example
HTML Example
<ul role="menu" rel="font-family" aria-label="Font">
<li role="menuitemradio" aria-checked="true">
Sans-serif
</li>
<li role="menuitemradio" aria-checked="false">
Serif
</li>
<li role="menuitemradio" aria-checked="false">
Monospace
</li>
<li role="menuitemradio" aria-checked="false">
Fantasy
</li>
</ul>
Characteristics
Superclass Role
- menuitemcheckbox (see structure)
- radio
Related Concepts
- menuitem
Required Context Role
- group
- menu
- menubar
Inherited States and Properties
- aria-atomic
- aria-busy (state)
- aria-checked (state) (required)
- aria-controls
- aria-current (state)
- aria-describedby
- aria-details
- aria-disabled (state)
- aria-dropeffect
- aria-errormessage
- aria-flowto
- aria-grabbed (state)
- aria-haspopup
- aria-hidden (state)
- aria-invalid (state)
- aria-keyshortcuts
- aria-label
- aria-labelledby
- aria-live
- aria-owns
- aria-posinset
- aria-readonly
- aria-relevant
- aria-roledescription
- aria-setsize
Name From
- contents
- author
Accessible Name Required
- True
Children Presentational
- True
Implicit Value for Role
- Default for aria-checked is false.
Semantic HTML
No HTML element equivalent.
Reference
- WAI-ARIA 1.2 Specification
Refer to the notes from the WAI-ARIA 1.2 specification for more information on role=menuitemradio.