INV-ARC-020: Accessibility Requirements and Template Contract
| Reference Number | Version | Effective Date | Supersedes | Authority Level |
|---|---|---|---|---|
| INV-ARC-020 | 1.2 | 2026-10-14 | 1.1 | Constitutional |
Important
Review correction (2026-10-14, v1.2): a later edit reintroduced docs/TRACKING/V2_REBUILD_VALIDATION_REPORT.md
as a Dependency — the same citation v1.1 had already dropped for the same reason. That file no longer exists
at that path; it was moved to docs/archive/v2-tracking-2026/V2_REBUILD_VALIDATION_REPORT.md (archived) during the v2
tracking archival, and its content (a general migration-validation log) never discussed this document’s
subject matter (it contains no mention of INV-ARC-020, WCAG, axe, or accessibility conformance). Per
SOP-DOC-000 §V, a live document must not cite archived material in a Dependencies section, and the stated
remedy is to remove the entry when no live replacement exists. The entry is removed below; the SPEC-DES-001
addition from the same edit is retained, since that target exists at the cited path.
I. Purpose
This document defines the canonical accessibility requirements for user-facing templates, shared UI shells, template-driven JavaScript interactions, and template-supporting CSS in the v2 codebase.
It exists to ensure that template work is governed by explicit accessibility contracts rather than visual preference or one-off cleanup.
II. Scope
This document applies to:
- Jinja templates under
templates/ - shared layout templates
- template-driven components and partials
- CSS that affects rendered UI semantics, contrast, focus visibility, or interaction
- JavaScript that controls accordions, modals, tabs, menus, disclosures, toasts, and other interactive UI states
- documentation claims that state or imply accessibility conformance
III. Authority Level
Constitutional. This document derives directly from INV-CORE-000 Section III.7, No Unnecessary Barriers to Supported Use, and is governed within the INV hierarchy described by INV-CORE-001. It defines repository-wide accessibility requirements for template and UI work and is subordinate to those foundational invariants. It may be tightened by a stricter domain, spec, SOP, or gate document, but it must not be weakened by route-local convention.
IV. Dependencies
docs/INVARIANT/CORE/INV-CORE-000_CORE_INVARIANTS.mddocs/INVARIANT/CORE/INV-CORE-001_CAPABILITY_BASED_ARCHITECTURE_AND_AUTHORITY_MODEL.mddocs/INVARIANT/ARCHITECTURE/INV-ARC-017_GENERAL_TESTING_INVARIANTS.mddocs/STANDARD_OPERATING_PROCEDURES/TESTING/SOP-TEST-003_Test_Creation.mddocs/STANDARD_OPERATING_PROCEDURES/SOP-DOC-000_DOCUMENTATION_STANDARD.mddocs/SPEC/SPEC-DES-001_DESIGN_SYSTEM_AND_VISUAL_IDENTITY.md
V. Accessibility Principles
- Accessibility is a runtime contract, not a cosmetic enhancement.
- Every interactive element must expose a meaningful accessible name.
- Visual hierarchy must map to semantic hierarchy.
- Keyboard operation must be first-class, not incidental.
- Template work must preserve or improve accessibility; regressions are not acceptable tradeoffs for layout changes.
- Shared components and shells must be treated as high-blast-radius accessibility surfaces.
VI. Required Baseline for Template Changes
Every template or template-supporting UI change must preserve the following:
- Exactly one meaningful page
h1. - Logical heading order with no unjustified level skips.
- Labels or ARIA naming for all form controls.
- Accessible names for links, buttons, disclosure toggles, icon-only controls, and modal dismiss buttons.
- Unique IDs across the rendered page.
- Sufficient color contrast for text, badges, buttons, tabs, alerts, nav items, and helper text.
- Visible focus indication for keyboard users.
- Valid ARIA usage only where the element role supports it.
- State-bearing controls that correctly expose
aria-expanded,aria-controls,aria-selected, or similar attributes when applicable. - No UI pattern that depends solely on color to communicate meaning.
VII. Template and UI-Shell Requirements
The following rules are mandatory for any PR that touches templates or shared UI structure.
A. Semantic Structure
- Use native headings where possible.
- Do not substitute visual size classes for document structure without preserving semantic heading levels.
- Do not create duplicate
idvalues across repeated accordions, tabs, or cards.
B. Interactive Controls
- Icon-only controls must have
aria-labelor equivalent naming. - Collapse, tab, menu, and modal triggers must use supported ARIA attributes only.
- Interactive elements must not nest incompatible interactive descendants.
C. Forms
- Inputs, selects, and textareas must have explicit labels or equivalent ARIA references.
- Placeholder text is not a substitute for labeling.
D. Color and Contrast
- Text and icons that communicate meaning must meet WCAG 2.1 AA contrast requirements in their actual rendered state.
- Bootstrap utility classes may not be assumed to satisfy contrast once combined with project tokens or custom backgrounds.
- Muted, secondary, badge, and alert styling must be treated as high-risk accessibility surfaces.
E. Keyboard and Focus
- Focusable controls must remain reachable and visibly focused.
- Hidden or collapsed content must not trap focus.
- Disclosure widgets must remain operable without pointer interaction.
VIII. High-Risk Change Classes
The following changes automatically trigger accessibility validation requirements:
- Any change under
templates/. - Any change to shared layout templates.
- Any change to shared template components.
- Any change to
static/css/affecting rendered colors, spacing, display states, or focus styles. - Any change to template-driven JS controlling stateful UI.
- Any PR that changes the rendered output of tabs, accordions, alerts, nav, cards, dialogs, or forms.
IX. Prohibited Patterns
The following are prohibited:
- Adding ARIA attributes to elements whose roles do not support them.
- Using color alone to distinguish links from surrounding text.
- Downgrading heading semantics to non-heading elements for styling convenience without a justified accessibility reason.
- Relying on Bootstrap defaults without verifying contrast in the project token system.
- Shipping template changes without the required accessibility validation evidence when the change is in scope.
X. Documentation and PR Obligations
When a PR touches a covered template/UI surface:
- Accessibility validation results must be reported in the PR template.
- Accessibility issues found and fixes made must be reported in
CHANGELOG.md. - If accessibility issues remain intentionally unresolved, they must be explicitly listed as follow-up risk in the PR.
XI. Amendment
Changes to this document must update the version and effective date, remain aligned with INV-ARC-017 and SOP-TEST-003, and update any dependent SOP or PR-process document that references this accessibility contract.
Last updated: 2026-10-15