E-mail List Archives
Re: Roles for nest lists
From: Léonie Watson
Date: Dec 11, 2015 11:41AM
- Next message: Greg Gamble: "Re: Roles for nest lists"
- Previous message: Greg Gamble: "Roles for nest lists"
- Next message in Thread: Greg Gamble: "Re: Roles for nest lists"
- Previous message in Thread: Greg Gamble: "Roles for nest lists"
- View all messages in this Thread
> From: WebAIM-Forum On Behalf Of Greg Gamble
> Sent: 11 December 2015 18:36
>
> I have a nested list ... is it given the same roles as the parent?
It is, but you don't need to use the roles if you're using the HTML ul/li elements.
<ul>
<li>Fruit
<ul>
<li>Apples</li>
<li>Bananas</li>
</ul></li>
<li>Vegetables</li>
</ul>
Or
<div role="list">
<span role="listitem">Fruit>
<div role="list">
<span role="listitem">Apples</span>
<span role="listitem">Bananas</span>
</div></span>
<span role="listitem">Vegetables</span>
</div>
Note: The use of div and span in the second example is arbitrary. You could use all spans or all divs for example.
Léonie.
--
@LeonieWatson tink.uk Carpe diem
- Next message: Greg Gamble: "Re: Roles for nest lists"
- Previous message: Greg Gamble: "Roles for nest lists"
- Next message in Thread: Greg Gamble: "Re: Roles for nest lists"
- Previous message in Thread: Greg Gamble: "Roles for nest lists"
- View all messages in this Thread