Skip to content

Commit 03c9846

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 ee75395 commit 03c9846

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

hugo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,57 +190,57 @@ enable = false
190190
url = "https://layer5.io/subscribe"
191191
icon = "icons/envelope.svg"
192192
desc = "Discussion and help from your fellow users"
193-
alt = "Envelope Icon"
193+
alt = "Subscribe to the Layer5 newsletter"
194194
[[params.links.footer.icons]]
195195
name = "Twitter"
196196
url = "https://twitter.com/layer5"
197197
icon = "icons/twitter.svg"
198198
desc = "Follow us on Twitter to get the latest news!"
199199
class= "social-icon"
200-
alt = "Twitter Icon"
200+
alt = "Follow Layer5 on Twitter"
201201
[[params.links.footer.icons]]
202202
name = "Discussion Forum"
203203
url = "https://discuss.layer5.io"
204204
icon = "icons/discuss.svg"
205205
desc = "Practical questions and curated answers"
206-
alt = "Discussion Forum Icon"
206+
alt = "Join the Layer5 discussion forum"
207207
[[params.links.footer.icons]]
208208
name = "GitHub"
209209
url = "https://github.com/layer5io"
210210
icon = "icons/github.svg"
211211
desc = "Development takes place here"
212212
class= "social-icon"
213-
alt = "GitHub Icon"
213+
alt = "Visit Layer5 on GitHub"
214214
[[params.links.footer.icons]]
215215
name = "Slack"
216216
url = "https://slack.layer5.io"
217217
icon = "icons/slack.svg"
218218
desc = "Chat with other project developers"
219-
alt = "Slack Icon"
219+
alt = "Join the Layer5 Slack community"
220220
[[params.links.footer.icons]]
221221
name = "LinkedIn"
222222
url = "https://www.linkedin.com/company/layer5"
223223
icon = "icons/linkedin.svg"
224224
desc = "Discuss development issues around the project"
225-
alt = "LinkedIn Icon"
225+
alt = "Follow Layer5 on LinkedIn"
226226
[[params.links.footer.icons]]
227227
name = "YouTube"
228228
url = "https://www.youtube.com/channel/UCFL1af7_wdnhHXL1InzaMvA?sub_confirmation=1"
229229
icon = "icons/youtube.svg"
230230
desc = "Discuss development issues around the project"
231-
alt = "YouTube Icon"
231+
alt = "Watch Layer5 on YouTube"
232232
[[params.links.footer.icons]]
233233
name = "Bluesky"
234234
url = "https://bsky.app/profile/layer5.bsky.social"
235235
icon = "icons/bluesky.svg"
236236
desc = "Follow us on Bluesky for updates"
237-
alt = "Bluesky Icon"
237+
alt = "Follow Layer5 on Bluesky"
238238
[[params.links.footer.icons]]
239239
name = "Docker"
240240
url = "https://hub.docker.com/u/layer5/"
241241
icon = "icons/docker.svg"
242242
desc = "Discuss development issues around the project"
243-
alt = "Docker Icon"
243+
alt = "Explore Layer5 images on Docker Hub"
244244

245245
[[params.links.footer.resources.items]]
246246
name = "Learning Paths"

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)