feat(fp): WP-17 — app-level a11y: route focus, template lint, WCAG checklist
Adds route-change focus management (new page's h1, afterNextRender) plus scroll-position restoration wired once in app.config.ts; angular-eslint's templateAccessibility bundle linting every inline template via processInlineTemplates (verified firing with a planted violation, one real hit fixed in rich-text-editor); docs/wcag-checklist.md and Foundations/ Accessibility MDX tying the four a11y layers (axe, lint, play tests, manual checklist) together. The checklist pass already earned its keep — it found a real 320px overflow in aanvraag-block's warning alert. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import tseslint from 'typescript-eslint';
|
||||
import angular from 'angular-eslint';
|
||||
|
||||
/**
|
||||
* Enforces the architecture's working agreements that were previously only
|
||||
@@ -28,8 +29,18 @@ export default [
|
||||
},
|
||||
plugins: { '@typescript-eslint': tseslint.plugin },
|
||||
rules: { '@typescript-eslint/no-explicit-any': 'error' },
|
||||
// This repo has no .html files — every template is inline. This processor
|
||||
// extracts each component's template string into a virtual `*.html` file,
|
||||
// which the template-a11y block below (`files: ['src/**/*.html']`) then lints.
|
||||
processor: angular.processInlineTemplates,
|
||||
},
|
||||
|
||||
// Template a11y (WP-17): the official angular-eslint accessibility bundle
|
||||
// (alt-text, label-has-associated-control, click/mouse-events-have-key-events,
|
||||
// interactive-supports-focus, valid-aria, no-autofocus, and more) linting the
|
||||
// virtual `.html` files the processor above extracts from inline templates.
|
||||
...angular.configs.templateAccessibility.map((c) => ({ ...c, files: ['src/**/*.html'] })),
|
||||
|
||||
// Tests legitimately use `any` to feed invalid messages/states into reducers.
|
||||
{
|
||||
files: ['src/**/*.spec.ts'],
|
||||
|
||||
Reference in New Issue
Block a user