Accessibility
- A standard drawer is a
navigationlandmark, a modal one adialogwitharia-modal; both are named byariaLabel, or the headline, or "Navigation". Name them when a page has more than one navigation landmark. - Each destination is a button in the tab order — a native
<a>when it has anhref— and the current one carriesaria-current="page"; disabled ones arearia-disabledand out of the tab order. Dividers are separators. - An expandable section's row is a toggle with
aria-expanded; a collapsed section's children are inert, out of the tab order and unreachable by the arrow keys. A section opens by itself to reveal the destination made active,setActive()included. UpandDownmove between destinations and wrap,HomeandEndgo to the ends, andEnterorSpaceactivates — on a section's row it toggles the section.ArrowRightandArrowLeftopen and close sections, following the reading direction.- A modal drawer keeps focus inside and the page behind inert until it closes.