Trong Neova Chạy ngay từ lần crawl: không cần thiết lập gì.
Quy tắc được rà soát lần cuối ngày 17 tháng 10 năm 2026 · Hướng dẫn cập nhật ngày 7 tháng 7 năm 2026
WCAG 1.3.1 yêu cầu cấu trúc phải được cung cấp. Một số role cần những role con nhất định, như tab trong tablist, nếu không cấu trúc sẽ không đến được trình đọc màn hình.
Bạn có thể làm gì
Thêm các phần tử con có role bắt buộc, hoặc dùng aria-owns để gắn chúng với phần tử cha.
Vì sao Neova đánh dấu
Một số role chỉ hoạt động với phần tử con nhất định, như tab trong tablist hay option trong listbox.
Thiếu chúng, trình đọc màn hình không cho biết có bao nhiêu mục hay mục nào đang được chọn.
WCAG 1.3.1 (cấp độ A) yêu cầu cấu trúc phải có sẵn cho công nghệ hỗ trợ.
This is the parent-side mirror of the containment rule. Certain composite roles are required to hold specific child roles: a list must contain listitems, a listbox must contain options, a tablist must contain tabs, a menu must contain menuitems. When a parent declares one of these roles but its required children are missing — or buried behind a wrapper element — the rule fires. The cost: a screen reader announces “list” and then finds nothing to count, so the user hears an empty or malformed widget and can’t navigate it.
The user experience of this failure is peculiarly frustrating. Imagine tabbing to what looks, on screen, like a normal navigation menu. The reader says “menu” — a promise that arrow keys will step through items and it’ll announce how many there are. Then nothing responds, because the elements inside carry the wrong roles and the menu owns zero valid menuitems. The user is left pressing arrow keys against a menu that isn’t really a menu. A container role is a contract; declaring it commits you to supplying the children that make the contract true.
A Real Failing Snippet, and the Fix
The usual cause is a wrapper <div> sitting between the parent role and its would-be children, which severs the direct relationship.
<!-- FAILS: list's children are wrappers, not listitems -->
<ul role="list">
<div class="row">
<li role="listitem">Overview</li>
</div>
<div class="row">
<li role="listitem">Pricing</li>
</div>
</ul>
The list’s direct children are <div class="row">, not listitems, so the required-owned relationship is broken. Remove the wrapper so the children are direct, or move the layout class onto the listitem itself:
<!-- PASSES: listitems are direct children of the list -->
<ul role="list">
<li role="listitem" class="row">Overview</li>
<li role="listitem" class="row">Pricing</li>
</ul>
When you genuinely can’t flatten the DOM — a grid framework insists on wrapper rows, say — use aria-owns on the parent to list the child ids explicitly. And a reminder: a plain <ul><li> already carries these roles implicitly, so re-declaring them by hand is often what introduced the bug in the first place.
Required Children for Each Container Role
These are the parent roles the check enforces and the child role each one is required to own.
Container Role
Must Contain
Typical Widget
list
listitem
Navigation or content list
listbox
option
Custom select / autocomplete
tablist
tab
Tabbed panel header
menu / menubar
menuitem
Application or nav menu
tree
treeitem
File explorer / nested nav
grid / treegrid
row
Data grid
row
gridcell / cell
Row within a grid
How to Detect It
axe DevTools: the “Certain ARIA roles must contain particular children” violation flags each parent and states the child role it failed to find as a direct descendant.
Lighthouse: run the Accessibility audit; this appears in the ARIA group with the offending container elements listed for you to inspect.
ARIA DevTools / accessibility tree: select the parent in the Accessibility panel and expand it. If its children aren’t the required role, the wrapper is intercepting the relationship.
How to Fix It
Identify the parent role and the child role the violation expects.
Remove any wrapper element sitting directly between the parent and its intended children.
Move layout classes or grid markup onto the child elements themselves rather than an intermediate <div>.
If the wrapper is unavoidable, add aria-owns to the parent referencing the child ids.
Prefer native semantic elements — a real <ul>/<li> or <table> gives you the parent-child roles without any hand-authored ARIA.
Re-scan to confirm the tree now nests correctly.
The recurring villain here, ninety percent of the time, is the layout wrapper. A designer needs each row to be a flex container, so a <div class="row"> slides in between the list and its listitems, and the accessibility tree stops recognizing the items as owned children. The fix is nearly always to push that styling onto the child element itself — the listitem can be the flex container — rather than wrapping it. When the framework genuinely won’t let you flatten the markup, aria-owns is your escape hatch, but reach for it second, not first.
Usually not — a <ul> already has the list role. The one time it’s justified is when a CSS reset (list-style:none) causes some browsers to drop the implicit list semantics; re-declaring the roles restores them. But if you add role="list", you must also keep the listitem children direct.
Can a Container Be Empty and Still Pass?
An intentionally empty listbox or menu is generally tolerated because it may be populated dynamically. The failure is specifically a container whose direct children are the wrong role, not zero children.
What Breaks the Relationship Most Often?
Layout wrappers — flex rows, grid cells, or a styling <div> inserted between the parent and its children. The accessibility tree only recognizes required-owned children as direct descendants unless aria-owns says otherwise.
My List Uses display:flex and Now Fails — Coincidence?
Almost certainly not, and it’s the most common trigger there is. Setting display:flex or display:grid on a <ul> can cause some browsers to drop the implicit list semantics, or it nudges developers into adding wrapper rows that sever the parent-child relationship. If a previously-passing list broke right after a layout change, that’s your lead — check whether the CSS stripped the roles or whether a new wrapper element slid between the container and its items.
Does This Affect SEO Directly?
Not through rankings, but broken widget semantics hurt real usability and pull down your accessibility audit score. For the bigger picture see accessibility and SEO.
Tìm lỗi này trên trang của bạn
Neova chạy mục kiểm tra này và mọi mục khác trong mỗi lần crawl, rồi viết cách sửa thành ticket cho nhóm của bạn.
Ứng dụng máy tính cho Mac, Windows và Linux
Tất cả 696 mục kiểm tra, mỗi mục kèm nguồn
Search Console và Analytics 4, kết nối chỉ đọc
Ticket sang Jira, Linear và Asana
Tải NeovaGói Desktop Free, hoặc dùng thử Solo miễn phí 14 ngày, không cần thẻ.