All elements with semantic roles contain all required parent and child elements. (e.g., a "list" must contain "listitem").
WCAG 2 criterion
1.3.1 Info and Relationships (Level A)
Tools and requirements
Test procedure
Use the Siteimprove issue check labeled "Role not inside the required context" and note any findings.
For manual testing, you want to spot check that these common roles have the following properties.
-
List (
<ul>
, <ol>
, or role="list"
)
- Parent Element: Any element – however a nested list must be within an
<li>
or role="listitem"
) element from a parent list.
- Children element(s): List item (
<li>
or role="listitem"
)
-
Listitem (
<li>
or role="listitem"
)
- Parent Element: List (
<ul>
, <ol>
, or role="list"
)
- Child Element(s): Any element (although it should probably be text of some sort)
-
Radio button or Checkbox
- Parent element: Fieldset or Group (
<fieldset>
or role="group"
)
-
Table (
<table>
)
- Parent Element: Any element
- Child Element(s): Table row
<tr>
, <thead>
(optional), <tbody>
(optional), <tfoot>
(optional)
-
Table Row (
<tr>
)
- Parent Element: Table (
<table>
)
- Child Element(s): Table Header (
<th>
), Table Cell (<td>
)
-
Table Cell or Table Header (
<td>
or <th>
)
- Parent Element: Table Row (
<tr>
)
- Child Element(s): Any element (typically just plain text)
AI Prompt