Skip to content

[a11y][A5] role="log" on <main> removes the main landmark #39

Description

@BrianGenisio

Finding

A5 — role="log" on <main> removes the main landmark
Severity: serious
WCAG: 1.3.1 Info and Relationships, 2.4.1 Bypass Blocks
Theme: both

Where

public/index.html:83

Current behavior

<main class="chat-history" id="chatHistory" role="log" aria-live="polite"> overrides the implicit main role. The page has no main landmark, and chat content is no longer inside one.

axe reports related violations on every scan: aria-allowed-role, landmark-one-main, and contributes to region.

Expected behavior

<main> remains a landmark. Live-region semantics move to a dedicated child (introduced properly by the A1+A2+A11 foundation PR). For this issue, strip role/aria-live from <main> so the landmark is restored; do not leave a temporary role="log" wrapper that the foundation PR would immediately replace.

How this was verified

axe scans in both themes against a running instance (a11y-audits/8-5-26/evidence/report.json).

Suggested approach

One-line markup change on #chatHistory: keep <main>, remove role="log" and aria-live="polite". Lands before the foundation PR so that PR's diff stays focused on render reconciliation.

Acceptance criteria

  • Document exposes exactly one main landmark
  • axe aria-allowed-role and landmark-one-main clear for this element
  • Shrink-only axe baseline updated downward
  • Verified in both light and dark mode

Reference

a11y-audits/8-5-26/audit.md → finding A5
a11y-audits/8-5-26/resolution-plan.md → Wave 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions