{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-aria-required-children-f8c991286370","title":"Ensure ARIA Roles Contain Required Child Roles","summary":"Validates that ARIA container roles include the required child roles as defined by WAI-ARIA 1.2. Ensures screen readers can properly interpret and navigate custom ARIA widgets. The deliverable is a list of flagged elements that violate the rule, with specific recommendations for fixing the issue.","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-aria-required-children-f8c991286370","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-aria-required-children-f8c991286370","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-aria-required-children-f8c991286370.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-aria-required-children-f8c991286370\/download","category":{"slug":"content-editorial","name":"Content & Editorial"},"editor_note":"Before applying this rule, ensure that the custom ARIA widgets are built using appropriate roles such as tablist, list, listbox, menu, menubar, tree, treegrid, grid, rowgroup, row, or radiogroup. If wrapper elements are used for layout, assign `role='none'` or `role='presentation'` to avoid invalid nesting. Prefer native HTML elements like `<ul>`, `<li>`, `<select>`, or `<option>` where possible.","instructions":"---\nname: aria-required-children\ndescription: \"Use when applies to custom ARIA widgets using composite roles: tablist, list, listbox, menu, menubar, tree, treegrid, grid, rowgroup, row, radiogroup. Use when reviewing components built with div\/span elements that replace native HTML list, select, or nav elements.\"\nmetadata:\n  category: accessibility\n  priority: high\n  difficulty: intermediate\n  estimatedTime: \"15\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/accessibility\/aria-required-children\n---\n\n# Ensure ARIA roles contain required child roles\n\nScreen readers like NVDA and VoiceOver navigate composite widgets (menus, tabs, trees) by moving between the required child roles. If a `tablist` contains `<div>` elements instead of `role='tab'`, the user hears no tabs at all. JAWS announces 'list of 5 items' only when `role='listitem'` children exist inside `role='list'`. Without correct nesting, the entire widget becomes opaque to keyboard-only and screen reader users.\n\n## Quick Reference\n\n- Container roles mandate specific owned child roles: `tablist` \u2192 `tab`, `list`\/`listbox` \u2192 `listitem`\/`option`, `menu`\/`menubar` \u2192 `menuitem`, `tree` \u2192 `treeitem`, `grid`\/`rowgroup` \u2192 `row`\n- Missing required children break the accessibility tree so screen readers cannot enumerate items or announce counts\n- Use `role='none'` or `role='presentation'` on purely structural wrapper elements inside the container to avoid invalid nesting\n- Applies to WAI-ARIA 1.2 required owned elements for composite widget roles\n\n## Check\n\nIdentify all elements with ARIA container roles (tablist, list, listbox, menu, menubar, tree, treegrid, grid, rowgroup, radiogroup). For each, verify it contains the required owned child roles per the WAI-ARIA spec: tablist must own tab elements; list must own listitem; listbox must own option; menu\/menubar must own menuitem, menuitemcheckbox, or menuitemradio; tree must own treeitem; grid must own row (which owns gridcell); radiogroup must own radio. Flag any container roles missing required children.\n\n## Fix\n\nFor each container role missing its required children: (1) Add the correct role to each child element \u2014 e.g., add `role='tab'` to each tab button inside `role='tablist'`. (2) If wrapper `<div>` elements exist between the container and the required children for layout purposes, add `role='none'` or `role='presentation'` to those wrappers. (3) Prefer native HTML equivalents where possible: `<ul>`\/`<li>` instead of `role='list'`\/`role='listitem'`, `<select>`\/`<option>` instead of `role='listbox'`\/`role='option'`.\n\n## Explain\n\nWAI-ARIA 1.2 defines 'required owned elements' for composite widget roles \u2014 these are the child roles a container must contain for the widget to be valid. Screen readers build their understanding of a widget from this structure. A `tablist` without `tab` children means a screen reader user in Forms Mode will find nothing to navigate between. A `menu` without `menuitem` children will not be announced as a menu at all in some ATs. This is distinct from aria-required-parent, which checks the inverse direction.\n\n## Code Review\n\nReview the rendered markup and interactive states that affect Ensure ARIA roles contain required child roles. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/accessibility\/aria-required-children\n","use_cases":["Checking if a tablist contains tab elements","Verifying a menu has menuitem children","Ensuring a grid contains row elements"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/aria-required-children\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-23","created_at":"2026-11-22T15:13:03.000000Z","updated_at":"2026-11-23T04:54:44.000000Z","seo_title":"Ensure ARIA roles contain required child roles","seo_description":"Validate ARIA container roles include required child roles for accessibility. Ensures screen readers can navigate and interpret custom ARIA widgets correctly.","seo_keywords":["aria required children","aria container roles","wai-aria required owned elements","screen reader accessibility","aria validation"]}}