Listitem Role

Previous Listbox role

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.

Example
<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>
Next log role