Accessibility Standards

Aegis targets:

Info

The theme provides landmarks, skip links, focus styles, keyboard support for interactive blocks, and reduced-motion hooks. Full WCAG conformance still depends on content created by site editors (alt text, heading hierarchy, link purpose, form labels, contrast of custom colors/media) and on runtime testing with sticky headers, plugins, and real viewports.

Semantic HTML

All Aegis templates and patterns use semantic HTML5 elements:

ElementUsage
<header>Site header and article headers
<nav>Navigation regions with ARIA labels
<main>Primary content area
<article>Individual posts and pages
<section>Thematic groupings of content
<aside>Sidebar and supplementary content
<footer>Site footer and article footers

Keyboard Navigation

All interactive elements are fully keyboard accessible:

Focus Styles

Aegis provides clearly visible focus indicators:

Visible focus styles for keyboard users.

Color and Contrast

The color system ensures sufficient contrast across all contexts:

RequirementStandardAegis Implementation
Normal text4.5:1 minimumDefault body/neutral-600+ (and AA-safe neutral-400) tokens on the default surface
Large text (18px+ bold, 24px+ regular)3:1 minimumDefault heading tokens meet or exceed 3:1
Interactive components3:1 minimumDefault buttons, links, and inputs target 3:1
Focus indicators3:1 minimumFocus outlines use primary tokens for clear contrast

Custom colors, covers, and media still need a contrast check.

Color Independence

Color is never used as the sole indicator of meaning:

ARIA Attributes

Aegis uses ARIA attributes to enhance screen reader experiences:

PatternARIA Implementation
Navigationaria-label identifying the nav purpose; header and footer menus have unique names (“Main menu”, the footer column headings, or “Footer menu N”)
Toggles (content switcher)role="tablist" / tab / tabpanel, aria-selected, aria-controls / aria-labelledby, aria-hidden on inactive views
Accordion Listaria-expanded on details/summary
Search dialog / Aegis Dash Modalrole="dialog", aria-modal, accessible name, focus trapping
Tabsrole="tablist", role="tab", role="tabpanel"
Slidersaria-roledescription, aria-label for controls
Live regionsaria-live for dynamic content updates
LandmarksProper landmark roles for page regions

A skip-to-content link is the first focusable element on every page:

The skip link appears on the first Tab press.

The framework injects the skip link after the header template part is rendered (SkipLink priority 11, TemplatePart priority 10). That order keeps <header role="banner"> as a sibling of the skip link, not nested inside it. Nesting the header inside the skip link hid header content (logo, navigation, dark-mode icons) from sighted visitors on the front end while the editor still looked correct.

The Skip to Content pattern remains available for templates that need an explicit skip link in markup (for example the Blank template, which has no header and therefore no injected skip link).

Headings

Aegis templates and stock patterns aim for a logical heading hierarchy:

Images and Media

Images

Videos

Animations

Forms

Stock Aegis demo forms use accessible names:

Dark Mode Accessibility

Dark mode maintains all accessibility standards:

See Dark Mode for dark mode configuration.

Testing Tools

Aegis uses automated accessibility testing during development:

ToolPurpose
pa11y-ciAutomated WCAG2AA testing in CI (.pa11yci.json, threshold 0) against home, ?p=1, search, ?page_id=2, and a missing post (404)
WPAudit AccessibilityAnalyzerStatic PHP/HTML checks, including skip-link detection in SkipLink.php and skip-to-content.php
Axe DevToolsBrowser-based accessibility auditing
WordPress Accessibility CheckerPlugin-level checks

Running pa11y Tests

Copied!
Shell
npm run test:a11y

Requires a running site at the URLs in .pa11yci.json (CI uses http://localhost:8080/; local wp-env often uses 8888 — override URLs as needed). See Testing.

Content Author Guidelines

To maintain accessibility, content authors should:

  1. Always add alt text to images that convey meaning; keep alt="" only when decorative.
  2. Use headings sequentially — one document <h1>; do not skip levels for visual effect. On Page No Title / Blank, supply the <h1> in content.
  3. Write descriptive link text — avoid “click here” or bare # destinations.
  4. Provide captions for videos and audio content.
  5. Use sufficient color contrast when choosing custom colors (neutral-600+ for small text on light surfaces).
  6. Test with keyboard — Tab from load through skip link → main → footer; open/close search (Escape, focus return).
  7. Respect reduced motion — enable OS “reduce motion” and confirm carousels/marquees do not autoplay.

Conditionals extras

Block and page visibility extras at Aegis → Conditionals → Accessibility hide or visually clip content with CSS. They do not strip HTML on the server.

Color Scheme follows the Aegis visitor toggle (is-style-dark / is-style-light on body), then the theme default (default-mode-dark, default-mode-light, or default-mode-system), then the OS prefers-color-scheme when dark mode is off. That matches the header dark-mode toggle utilities in dark-mode.css.

On posts, those classes are added to the existing core/post-content wrapper. Hook patterns wrap the whole pattern. Turning an extra off skips both the classes and the CSS.

See Aegis Dash Conditional Logic.

Next Steps