Accessibility
Build inclusive Angular interfaces from native semantics, predictable keyboard models and explicit focus contracts instead of repairing accessibility after release.
SHARED RESPONSIBILITY
A strong foundation, not a compliance badge
NeuralNg is designed against WCAG 2.2 and WAI-ARIA Authoring Practices, but a component library cannot certify the finished application. Content, custom colors, page structure and end-to-end workflows remain part of the product team's accessibility responsibility.
NeuralNg provides
- Native elements or documented ARIA patterns
- Keyboard interaction and focus lifecycle
- State, error, busy and live-region wiring
- RTL, reduced-motion and high-contrast-friendly hooks
Your application owns
- Meaningful labels, instructions and alternative text
- Contrast after token or class customization
- Heading order, landmarks and logical page flow
- Automated and assistive-technology testing
Prefer native semantics
Button renders a real button; form controls keep native input semantics. Composite widgets add roles only where the platform has no equivalent, such as tablist, tree, listbox and calendar grid patterns.
The icon-only action has an explicit name. The busy action exposes its state and blocks duplicate activation without replacing native semantics.
Names, descriptions and errors
Visible text should be the accessible name whenever possible. Field assigns deterministic IDs and keeps for, aria-describedby, aria-invalid, aria-required and pending state synchronized as conditional hints and errors enter the composition.
ariaLabel or a visible label reference, and decorative icons should remain hidden from assistive technology. Keyboard contracts follow the widget pattern
Complex components do not invent one universal shortcut set. Each follows the interaction model users expect for its role, while logical directions adapt to orientation and RTL.
| Pattern | Primary keys | Focus model |
|---|---|---|
| Button | Enter, Space | Native button activation |
| Tabs | Arrow keys, Home, End | Automatic or manual activation |
| Combobox | Up, Down, Enter, Escape | Active option via aria-activedescendant |
| Tree | Arrow keys, Home, End, typeahead | Roving treeitem focus |
| Dialog and Drawer | Tab, Shift+Tab, Escape | Focus containment and restoration |
| DatePicker | Arrow keys, Home, End, Page Up/Down | Grid navigation across dates |
| Toolbar | Orientation arrows, Home, End | Roving action focus |
Focus belongs to the interaction
Dialog and modal Drawer contain keyboard focus, support an explicit initial focus target and restore focus to the opener after closing. Popover, Select and other non-modal overlays preserve their trigger relationship without trapping the rest of the document.
Never remove focus outlines without supplying an equally visible replacement. Neutral uses :focus-visible so pointer interaction does not create unnecessary rings while keyboard focus remains discoverable.
State must not depend on color alone
Disabled
Native disabled state prevents focus and activation where expected.
Readonly
The value remains discoverable and focusable without becoming editable.
Invalid
ARIA state and associated error text supplement visual severity.
Loading
Busy state, visible text and duplicate-action prevention travel together.
Selected
ARIA selection or checked state complements color and icons.
Live updates
Announcement politeness is chosen by urgency, not decoration.
Motion, contrast and headless ownership
Component motion respects prefers-reduced-motion. Neutral is the recommended accessible baseline, but changing primary/surface scales or using unstyled transfers visual contrast, target size and focus-indicator ownership to the consumer.
RTL and localization are accessibility inputs
Logical start/end positions, directional keyboard behavior, localized control labels and calendar conventions resolve from configured direction and locale. Supply the same initial values on server and browser so users do not experience a direction or language shift during hydration.
Test behavior, not only markup
Automated rules catch missing names, invalid relationships and many contrast failures, but cannot judge content quality or complete keyboard flows. Pair component tests and axe checks with keyboard-only, zoom, forced-colors and screen-reader passes on critical journeys.
Unit
Roles, attributes, keyboard events and focus restoration.
Browser
Real tab order, overlays, zoom, direction and axe rules.
Manual
Screen reader output, content meaning and end-to-end flow.
SSR and hydration keep identity stable
Deterministic IDs preserve label, description, control and overlay relationships across server render and hydration. Avoid environment-dependent labels, locale or direction during the initial render; update them only after the application owns a consistent client state.