Skip to content

Commit b36247b

Browse files
HeyItsGilbertclaude
andcommitted
fix(a11y,seo): add accessible names and fill missing meta descriptions
Resolves the most widespread Unlighthouse findings across the site: - link-name / button-name (scored 0 on all crawled pages): icon-only social links, mobile-menu toggle, dropdown chevron, and back-to-top button now have aria-labels; decorative icons marked aria-hidden. - meta-description (scored 0 on 65 list/taxonomy/author/pagination pages): these had neither .Description nor .Summary, leaving the tag empty. Add a summary-then-title fallback so every page emits a non-empty description. - unsized-images / image-aspect-ratio: footer CC BY-SA and Netlify badges get explicit width/height matching intrinsic ratio. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 760dcbb commit b36247b

3 files changed

Lines changed: 31 additions & 19 deletions

File tree

‎themes/powershell-community/layouts/_default/baseof.html‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@
99
{{- $ogTitle := cond .IsHome .Site.Title .Title -}}
1010
{{- $title := cond .IsHome .Site.Title (printf "%s — %s" .Title $brand) -}}
1111
{{- $metaDesc := .Site.Params.description -}}
12-
{{- if .Description }}{{ $metaDesc = .Description }}{{ else if not .IsHome }}{{ $metaDesc = (.Summary | plainify | truncate 160) }}{{ end -}}
12+
{{- if .Description -}}
13+
{{- $metaDesc = .Description -}}
14+
{{- else if not .IsHome -}}
15+
{{- $summary := .Summary | plainify | strings.TrimSpace -}}
16+
{{- if $summary -}}
17+
{{- $metaDesc = ($summary | truncate 160) -}}
18+
{{- else if .Title -}}
19+
{{- $metaDesc = printf "%s on PowerShell.org — articles, podcasts, and resources from the PowerShell community." .Title -}}
20+
{{- end -}}
21+
{{- end -}}
1322
{{- $socialDesc := $metaDesc -}}
1423
{{- with .Params.og_description }}{{ $socialDesc = . }}{{ end -}}
1524
{{- $ogImage := partial "og-image.html" . -}}

‎themes/powershell-community/layouts/partials/footer.html‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ <h3 class="text-lg font-semibold text-white">PowerShell.org</h3>
1313
The community hub for PowerShell enthusiasts, automaters, and professionals worldwide.
1414
</p>
1515
<div class="flex space-x-4">
16-
<a href="{{ .Site.Params.social.twitter }}" target="_blank" rel="noopener"
16+
<a href="{{ .Site.Params.social.twitter }}" target="_blank" rel="noopener" aria-label="PowerShell.org on Twitter"
1717
class="text-gray-400 hover:text-blue-400 transition-colors duration-200">
18-
<i class="fab fa-twitter text-lg"></i>
18+
<i class="fab fa-twitter text-lg" aria-hidden="true"></i>
1919
</a>
20-
<a href="{{ .Site.Params.social.youtube }}" target="_blank" rel="noopener"
20+
<a href="{{ .Site.Params.social.youtube }}" target="_blank" rel="noopener" aria-label="PowerShell.org on YouTube"
2121
class="text-gray-400 hover:text-red-400 transition-colors duration-200">
22-
<i class="fab fa-youtube text-lg"></i>
22+
<i class="fab fa-youtube text-lg" aria-hidden="true"></i>
2323
</a>
24-
<a href="{{ .Site.Params.social.github }}" target="_blank" rel="noopener"
24+
<a href="{{ .Site.Params.social.github }}" target="_blank" rel="noopener" aria-label="PowerShell.org on GitHub"
2525
class="text-gray-400 hover:text-gray-200 transition-colors duration-200">
26-
<i class="fab fa-github text-lg"></i>
26+
<i class="fab fa-github text-lg" aria-hidden="true"></i>
2727
</a>
28-
<a href="{{ .Site.Params.social.discord }}" target="_blank" rel="noopener"
28+
<a href="{{ .Site.Params.social.discord }}" target="_blank" rel="noopener" aria-label="PowerShell.org on Discord"
2929
class="text-gray-400 hover:text-purple-400 transition-colors duration-200">
30-
<i class="fab fa-discord text-lg"></i>
30+
<i class="fab fa-discord text-lg" aria-hidden="true"></i>
3131
</a>
3232
</div>
3333
</div>
@@ -85,19 +85,19 @@ <h4 class="font-medium text-white mb-1">{{ .Site.Params.summit.title }}</h4>
8585
<a href="/terms/" class="text-gray-400 hover:text-white transition-colors duration-200">Terms of Use</a>
8686
<a href="/contact/" class="text-gray-400 hover:text-white transition-colors duration-200">Contact</a>
8787
<a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener">
88-
<img src="/images/cc-by-sa.png" alt="Licensed under CC BY-SA 4.0" class="h-6" />
88+
<img src="/images/cc-by-sa.png" alt="Licensed under CC BY-SA 4.0" class="h-6 w-auto" width="2000" height="705" />
8989
</a>
9090
<a href="https://www.netlify.com" target="_blank" rel="noopener">
91-
<img src="https://www.netlify.com/assets/badges/netlify-badge-color-accent.svg" alt="Deploys by Netlify" class="h-6" />
91+
<img src="https://www.netlify.com/assets/badges/netlify-badge-color-accent.svg" alt="Deploys by Netlify" class="h-6 w-auto" width="114" height="51" />
9292
</a>
9393
</div>
9494
</div>
9595
</div>
9696

9797
<!-- Back to Top Button -->
98-
<button id="back-to-top"
98+
<button id="back-to-top" type="button" aria-label="Back to top"
9999
onclick="window.scrollTo({top: 0, behavior: 'smooth'})"
100100
class="hidden fixed bottom-8 right-8 powershell-blue text-white p-3 rounded-full shadow-lg hover:opacity-90 transition-opacity duration-200 z-40">
101-
<i class="fas fa-arrow-up"></i>
101+
<i class="fas fa-arrow-up" aria-hidden="true"></i>
102102
</button>
103103
</footer>

‎themes/powershell-community/layouts/partials/header.html‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,18 @@ <h1 class="text-xl font-bold text-gray-900">PowerShell.org</h1>
5959
Summit {{ .Site.Params.summit.year }}
6060
</a>
6161
<a href="{{ .Site.Params.social.discord }}"
62-
target="_blank" rel="noopener"
62+
target="_blank" rel="noopener" aria-label="PowerShell.org on Discord"
6363
class="text-gray-500 hover:text-blue-600 transition-colors duration-200">
64-
<i class="fab fa-discord text-xl"></i>
64+
<i class="fab fa-discord text-xl" aria-hidden="true"></i>
6565
</a>
6666
</div>
6767

6868
<!-- Mobile menu button -->
6969
<div class="md:hidden">
70-
<button onclick="toggleMobileMenu()"
70+
<button onclick="toggleMobileMenu()" type="button"
71+
aria-label="Toggle navigation menu" aria-controls="mobile-menu" aria-expanded="false"
7172
class="text-gray-700 hover:text-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 p-2 rounded-md">
72-
<i class="fas fa-bars text-xl"></i>
73+
<i class="fas fa-bars text-xl" aria-hidden="true"></i>
7374
</button>
7475
</div>
7576
</div>
@@ -93,8 +94,10 @@ <h1 class="text-xl font-bold text-gray-900">PowerShell.org</h1>
9394
class="block text-gray-700 hover:text-blue-600 hover:bg-gray-50 px-3 py-2 rounded-md text-base font-medium flex-1 {{ if hasPrefix $.RelPermalink .URL }}text-blue-600 bg-blue-50{{ end }}">
9495
{{ .Name }}
9596
</a>
96-
<button @click="open = !open" class="px-3 py-2 text-gray-500 hover:text-blue-600">
97-
<i class="fas fa-chevron-down text-xs transition-transform duration-200" :class="open ? 'transform rotate-180' : ''"></i>
97+
<button @click="open = !open" type="button" :aria-expanded="open"
98+
aria-label="Toggle {{ .Name }} submenu"
99+
class="px-3 py-2 text-gray-500 hover:text-blue-600">
100+
<i class="fas fa-chevron-down text-xs transition-transform duration-200" :class="open ? 'transform rotate-180' : ''" aria-hidden="true"></i>
98101
</button>
99102
</div>
100103
<div x-show="open" x-transition class="pl-6 space-y-1" style="display: none;">

0 commit comments

Comments
 (0)