/** * Maps axe-core rule IDs to human-readable issue titles. * Used when rendering stored scan results in the dashboard so that * issues stored before the sanitize_issue_text() fix (2026-07-21) * show the correct title instead of the garbled version that resulted * from sanitize_text_field() stripping HTML tag tokens. * * If a rule ID is present here, this title takes precedence over the * stored value. Rules not in this map fall back to the stored title. */ export const RULE_TITLES: Record = { // WCAG 1.1.1 — Alt text 'image-alt': 'Images missing alt text attribute', 'input-image-alt': 'Images missing alt text attribute', 'area-alt': 'Images missing alt text attribute', // WCAG 4.1.2 — Form labels / button names 'label': 'Form inputs missing label association', 'label-title-only': 'Form inputs missing label association', 'button-name': 'Form inputs missing label association', // WCAG 2.1.1 — Keyboard accessibility 'keyboard': 'Interactive element not keyboard accessible', // WCAG 3.1.1 — Language 'html-has-lang': 'HTML lang attribute missing', 'html-lang-valid': 'HTML lang attribute missing', // WCAG 2.4.7 — Focus visible 'focus-visible': 'Focus indicator removed via CSS', // WCAG 1.4.3 — Colour contrast 'color-contrast': 'Potentially insufficient colour contrast', 'color-contrast-enhanced': 'Potentially insufficient colour contrast', // WCAG 2.4.6 — Headings 'empty-heading': 'Empty heading elements found', 'heading-order': 'Heading levels are skipped', // WCAG 2.4.4 — Link text 'link-name': 'Links with non-descriptive text', // WCAG 4.1.2 — ARIA 'aria-allowed-role': 'Invalid ARIA role attributes', 'aria-roles': 'Invalid ARIA role attributes', // WCAG 1.3.1 — Tables 'scope-attr-valid': 'Data tables missing headers or caption', 'td-headers-attr': 'Data tables missing headers or caption', 'th-has-data-cells': 'Data tables missing headers or caption', 'table-duplicate-name': 'Data tables missing headers or caption', // WCAG 1.3.6 / 1.3.1 — Landmarks 'landmark-one-main': 'Page missing landmark elements:
', 'landmark-main-is-top-level': 'Page missing landmark elements:
', 'landmark-no-duplicate-main': 'Page missing landmark elements:
', 'landmark-banner-is-top-level': 'Page missing landmark elements: