Give nested list links context from parent items
In a nested list, a link can take its purpose from the parent item it sits under. Specifications, under a parent item reading Model X200, means the X200's specifications, and W3C lists that as sufficient for 2.4.4 Link Purpose in Context. The nesting has to be real. The sub-list has to be a ul or ol that is genuinely a descendant of the parent li, because that containment is the only thing software can trace, and two sibling lists styled to look nested convey nothing. W3C attaches a caveat that reads like a reason not to lean on it. No assistive technology has a command for asking what a parent item said, so a person has to reach the link by moving through the list one item at a time. W3C says outright that this may not suit very long or deeply nested lists.
How we find it in an audit
Nested navigation and product menus get checked by hand against the one structural question, which is whether the sub-list sits inside the parent item or merely indented under it. Then we read the parent and the link text together and ask whether they name a destination. List markup validates either way, so no tool separates real nesting from visual nesting.
How affected users experience it
Inside a properly nested list a screen reader reports the level, so a listener knows they are two deep under Model X200 when Specifications arrives. Where the nesting is only visual the hierarchy flattens, and three products produce Specifications, Specifications, Specifications with nothing but reading order to say whose is whose. Deep menus make it worse, because reaching the link takes long enough that the parent has already fallen out of memory.
Passes vs. fails
Passes
<li>Model X200
<ul>
<li><a href="/x200/specs">Specifications</a></li>
</ul>
</li>Fails
<li>Model X200</li>
<li class="indent"><a href="/x200/specs">Specifications</a></li>How this gets tested
The W3C publishes test rules that define what a checker looks for here.
- Link has non-empty accessible nameA tool can check this
- Link in context is descriptiveA tool can check this
- Links with identical accessible names and same context serve equivalent purposeA tool finds candidates, you decide
Other ways to satisfy this rule
22 guides on this site are filed under 2.4.4 Link Purpose (In Context). W3C lists this one as sufficient for that rule when used for identifying the purpose of a link using link text combined with programmatically determined link context, so the condition is part of the test rather than a footnote to it.
- ARIA7sufficientBuild clear link names from nearby headings
- ARIA8sufficientFix vague link text with aria-label
- C7sufficientAdd hidden text to clarify short links
- G53sufficientLet the sentence around a link explain it
- G91sufficientWrite link text that states its purpose
- G189sufficientOffer a switch to self-describing link text
This guide is our interpretation of W3C technique H81: Identifying the purpose of a link in a nested list using link text combined with the parent list item under which the list is nested. W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.