Skip to content

Commit 8a7581c

Browse files
♿ a11y: fix template a11y issues that lower generated-site Lighthouse (a11y 92→~)
ProjectSites perf loop (idea #14) fire-27 audited a published generated site (megabytespace) at Lighthouse a11y 92 and traced the issues to this template: - Testimonials rating <div aria-label="N out of 5 stars"> had no role → a bare div can't take aria-label (aria-prohibited-attr). Added role="img". - Footer column headers were <h4> with no preceding h3 (section h2 → footer h4 skips a level → heading-order). Changed the 3 footer <h4>→<h3>. Same a11y fixes already shipped on the projectsites.dev marketing homepage (footer h4→h3, etc.). Every FUTURE generated build inherits these. (The carousel target-size finding is AI-generated per-build, not in this base template.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 152ee1c commit 8a7581c

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/components/Footer.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ export default function Footer({ routes = DEFAULT_ROUTES, socials = [] }: Props)
6060
</div>
6161

6262
<nav aria-label="Footer navigation">
63-
<h4 className="text-text font-semibold text-sm uppercase tracking-wider mb-6">
63+
<h3 className="text-text font-semibold text-sm uppercase tracking-wider mb-6">
6464
Navigation
65-
</h4>
65+
</h3>
6666
<ul className="space-y-3 text-sm">
6767
{routes.map((r) => (
6868
<li key={r.to}>
@@ -78,9 +78,9 @@ export default function Footer({ routes = DEFAULT_ROUTES, socials = [] }: Props)
7878
</nav>
7979

8080
<div>
81-
<h4 className="text-text font-semibold text-sm uppercase tracking-wider mb-6">
81+
<h3 className="text-text font-semibold text-sm uppercase tracking-wider mb-6">
8282
Contact
83-
</h4>
83+
</h3>
8484
<address className="not-italic space-y-3 text-sm">
8585
{address && (
8686
<a
@@ -115,9 +115,9 @@ export default function Footer({ routes = DEFAULT_ROUTES, socials = [] }: Props)
115115
</div>
116116

117117
<div>
118-
<h4 className="text-text font-semibold text-sm uppercase tracking-wider mb-6">
118+
<h3 className="text-text font-semibold text-sm uppercase tracking-wider mb-6">
119119
Legal
120-
</h4>
120+
</h3>
121121
<ul className="space-y-3 text-sm">
122122
<li><Link to="/privacy" className="hover:text-accent transition-colors underline-hover">Privacy Policy</Link></li>
123123
<li><Link to="/terms" className="hover:text-accent transition-colors underline-hover">Terms of Service</Link></li>

src/components/Testimonials.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function Testimonials({
5353
{testimonials.map((t, i) => (
5454
<AnimatedSection key={`${t.name}-${i}`} delay={`${i * 0.15}s`}>
5555
<figure className="glass rounded-2xl p-8 h-full flex flex-col">
56-
<div className="flex gap-1 mb-4" aria-label={`${t.rating} out of 5 stars`}>
56+
<div className="flex gap-1 mb-4" role="img" aria-label={`${t.rating} out of 5 stars`}>
5757
{Array.from({ length: t.rating }).map((_, j) => (
5858
<Star
5959
key={j}

0 commit comments

Comments
 (0)