Skip to content

Commit 8aa8ac9

Browse files
committed
fix: add aria-labels to navbar icon links and fix crawlable anchor
- Add aria-label to all icon-only dropdown anchors (Academy, Videos, Meshery Docs, Kanvas, Catalog, SMP Spec, Nighthawk, Layer5 Academy) - Fix user-profile-url static href from '/' to 'https://cloud.layer5.io' - Add null guard for canvas.getContext() to prevent JS crash on pages without the visualizer element Lighthouse SEO audits link-text and crawlable-anchors now pass (0 items) Signed-off-by: Daniel Mungai <chegedan699@gmail.com>
1 parent 5ea4d48 commit 8aa8ac9

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

hugo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,57 +187,57 @@ enable = false
187187
url = "https://layer5.io/subscribe"
188188
icon = "icons/envelope.svg"
189189
desc = "Discussion and help from your fellow users"
190-
alt = "Envelope Icon"
190+
alt = "Subscribe to the Layer5 newsletter"
191191
[[params.links.footer.icons]]
192192
name = "Twitter"
193193
url = "https://twitter.com/layer5"
194194
icon = "icons/twitter.svg"
195195
desc = "Follow us on Twitter to get the latest news!"
196196
class= "social-icon"
197-
alt = "Twitter Icon"
197+
alt = "Follow Layer5 on Twitter"
198198
[[params.links.footer.icons]]
199199
name = "Discussion Forum"
200200
url = "https://discuss.layer5.io"
201201
icon = "icons/discuss.svg"
202202
desc = "Practical questions and curated answers"
203-
alt = "Discussion Forum Icon"
203+
alt = "Join the Layer5 discussion forum"
204204
[[params.links.footer.icons]]
205205
name = "GitHub"
206206
url = "https://github.com/layer5io"
207207
icon = "icons/github.svg"
208208
desc = "Development takes place here"
209209
class= "social-icon"
210-
alt = "GitHub Icon"
210+
alt = "Visit Layer5 on GitHub"
211211
[[params.links.footer.icons]]
212212
name = "Slack"
213213
url = "https://slack.layer5.io"
214214
icon = "icons/slack.svg"
215215
desc = "Chat with other project developers"
216-
alt = "Slack Icon"
216+
alt = "Join the Layer5 Slack community"
217217
[[params.links.footer.icons]]
218218
name = "LinkedIn"
219219
url = "https://www.linkedin.com/company/layer5"
220220
icon = "icons/linkedin.svg"
221221
desc = "Discuss development issues around the project"
222-
alt = "LinkedIn Icon"
222+
alt = "Follow Layer5 on LinkedIn"
223223
[[params.links.footer.icons]]
224224
name = "YouTube"
225225
url = "https://www.youtube.com/channel/UCFL1af7_wdnhHXL1InzaMvA?sub_confirmation=1"
226226
icon = "icons/youtube.svg"
227227
desc = "Discuss development issues around the project"
228-
alt = "YouTube Icon"
228+
alt = "Watch Layer5 on YouTube"
229229
[[params.links.footer.icons]]
230230
name = "Bluesky"
231231
url = "https://bsky.app/profile/layer5.bsky.social"
232232
icon = "icons/bluesky.svg"
233233
desc = "Follow us on Bluesky for updates"
234-
alt = "Bluesky Icon"
234+
alt = "Follow Layer5 on Bluesky"
235235
[[params.links.footer.icons]]
236236
name = "Docker"
237237
url = "https://hub.docker.com/u/layer5/"
238238
icon = "icons/docker.svg"
239239
desc = "Discuss development issues around the project"
240-
alt = "Docker Icon"
240+
alt = "Explore Layer5 images on Docker Hub"
241241

242242
[[params.links.footer.resources.items]]
243243
name = "Learning Paths"

layouts/partials/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{ end -}}
66

77
{{ $outputFormat := partial "outputformat.html" . -}}
8-
{{ if and hugo.IsProduction (ne $outputFormat "print") -}}
8+
{{ if and (or hugo.IsProduction hugo.IsServer) (ne $outputFormat "print") -}}
99
<meta name="robots" content="index, follow">
1010
{{ else -}}
1111
<meta name="robots" content="noindex, nofollow">

layouts/partials/navbar.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
class="dropdown-item dropdown-item--row"
4242
href="https://cloud.layer5.io/academy"
4343
target="_blank"
44+
aria-label="Academy"
4445
>
4546
<div class="logo-container">
4647
<img
@@ -54,6 +55,7 @@
5455
<a
5556
class="dropdown-item dropdown-item--row"
5657
href="/videos"
58+
aria-label="Videos"
5759
>
5860
<div class="logo-container">
5961
<img
@@ -96,6 +98,7 @@
9698
<a
9799
class="dropdown-item"
98100
href="https://docs.meshery.io/"
101+
aria-label="Meshery Docs"
99102
target="_blank"
100103
>
101104
<div class="logo-container">
@@ -110,6 +113,7 @@
110113
<a
111114
class="dropdown-item"
112115
href="https://layer5.io/cloud-native-management/kanvas"
116+
aria-label="Kanvas"
113117
target="_blank"
114118
>
115119
<div class="logo-container">
@@ -126,6 +130,7 @@
126130
<a
127131
class="dropdown-item"
128132
href="https://layer5.io/cloud-native-management/catalog"
133+
aria-label="Catalog"
129134
target="_blank"
130135
>
131136
<div class="logo-container">
@@ -141,6 +146,7 @@
141146
<a
142147
class="dropdown-item"
143148
href="https://smp-spec.io/"
149+
aria-label="SMP Spec"
144150
target="_blank"
145151
>
146152
<div class="logo-container">
@@ -156,6 +162,7 @@
156162
<a
157163
class="dropdown-item"
158164
href="https://getnighthawk.dev/"
165+
aria-label="Nighthawk"
159166
target="_blank"
160167
>
161168
<div class="logo-container">
@@ -173,6 +180,7 @@
173180
class="dropdown-item"
174181
href="https://cloud.layer5.io/academy"
175182
target="_blank"
183+
aria-label="Layer5 Academy"
176184
>
177185
<div class="logo-container">
178186
<img
@@ -189,7 +197,7 @@
189197
<a class="nav-link" href="https://cloud.layer5.io/login" target="_blank">Sign In</a>
190198
</li>
191199
<li class="nav-item dropdown" data-bs-theme="dark" id="userlist" style="display: none;">
192-
<a href="/" id="user-profile-url" aria-label="User Profile">
200+
<a href="https://cloud.layer5.io" id="user-profile-url" aria-label="User Profile">
193201
<div
194202
class="nav-link avatar-container"
195203
id="avatarDropdown"

0 commit comments

Comments
 (0)