Skip to content

a11y: set HTML lang, add reduced-motion CSS, hide decorative SVG elements#84

Merged
ChristopherRotnes merged 1 commit into
masterfrom
a11y/quick-wins
May 3, 2026
Merged

a11y: set HTML lang, add reduced-motion CSS, hide decorative SVG elements#84
ChristopherRotnes merged 1 commit into
masterfrom
a11y/quick-wins

Conversation

@ChristopherRotnes
Copy link
Copy Markdown
Owner

Summary

Three trivial one-liner fixes that together make the app safer for screen readers and users with motion sensitivity.

  • index.html: lang="en"lang="no" so screen readers use Norwegian pronunciation for all UI text
  • app.css: @media (prefers-reduced-motion: reduce) disables the .fade-in keyframe animation for users who have enabled "Reduce Motion" in their OS settings
  • bodymap.jsx: aria-hidden="true" on the decorative body outline <g> (head circle, neck polygon, torso path) and the FRONT/BACK <text> label in both HeatmapBodySVG and BodySVG — screen readers now skip the silhouette and focus on the labelled muscle shapes

Test plan

  • Inspect <html> element in DevTools — confirm lang="no"
  • Enable "Reduce motion" in OS settings (Windows: Accessibility → Visual effects → Animation effects off) — confirm .fade-in elements appear instantly with no animation
  • Run axe DevTools or Lighthouse a11y audit — confirm no "Page language" violation
  • (Optional) Screen reader smoke test with NVDA — Norwegian text should be read with Norwegian pronunciation

Closes #68, #81, #82

🤖 Generated with Claude Code

…decorative SVG elements

- index.html: lang="en" → lang="no" so screen readers use Norwegian pronunciation
- app.css: @media (prefers-reduced-motion: reduce) disables .fade-in animation
- bodymap.jsx: aria-hidden="true" on decorative body outline <g> and FRONT/BACK <text> in both HeatmapBodySVG and BodySVG so screen readers skip non-interactive silhouette elements

Closes #68, #81, #82

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ChristopherRotnes ChristopherRotnes merged commit ac2fdf5 into master May 3, 2026
1 of 2 checks passed
@ChristopherRotnes ChristopherRotnes deleted the a11y/quick-wins branch May 3, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As a user with a screen reader I want the app language declared as Norwegian so I can hear content pronounced correctly

1 participant