listitem
Characteristics
Superclass Role:
- section
Subclass Roles:
- treeitem
Base Concept:
- HTML li
Related Concepts:
- XForms item
Required Context Role:
- group
- list
Supported States and Properties:
- aria-level
- aria-posinset
- aria-setsize
Inherited States and Properties:
- aria-atomic
- aria-busy (state)
- aria-controls
- aria-describedby
- aria-disabled (state)
- aria-dropeffect
- aria-expanded (state)
- aria-flowto
- aria-grabbed (state)
- aria-haspopup
- aria-hidden (state)
- aria-invalid (state)
- aria-label
- aria-labelledby
- aria-live
- aria-owns
- aria-relevant
Name From:
- contents
- author
Accessible Name Required:
- True
A single item in a list or directory.
When list (role) is used for providing the list, content authors should use listitem (role) for the items in the list (li). Even lists within the lists also can be used with aria. To inform the level of list item, use aria-level attribute. A first level list item can use aria-level=”1”, second level list items (lists within the lists) use aria-level=”2” etc.
Authors must ensure that elements with role listitem are contained in, or owned by, an element with the role list or group.
Syntax
<div role="list"> <span role="listitem" aria-level="1">Option 1</span> <span role="listitem" aria-level="1">Option 2 <span role="listitem" aria-level="2">Option 2 a </span> <span role="listitem" aria-level="2">Option 2b</span> <span role="listitem" aria-level="2">Option 2c</span> </span> <span role="listitem" aria-level="1">Option 3</span> </div>
Microsoft Active Accessibility accRole Property:
- ROLE_SYSTEM_LISTITEM
UI Automation ControlType Property:
- ListItem
UI Automation AriaRole Property:
- listitem