Skip to content

Commit 5fc7512

Browse files
committed
Alt tag Missing Fixed
1 parent 645d0a1 commit 5fc7512

10 files changed

Lines changed: 60 additions & 12 deletions

File tree

data/home.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ categories:
6262
aliases: [font, typography, typeface, download]
6363
- name: RAG
6464
icon: cfd-rag
65+
iconAlt: "Random API Generator icon"
66+
iconTitle: "RAG — Random API Generator"
6567
url: /RandomApiGenerator/docs/
6668
description: Random API generator docs and playground for mock APIs.
6769
date: "2026-04-14"
@@ -249,6 +251,8 @@ categories:
249251
aliases: [json, json editor, validate, format]
250252
- name: JS LIDE
251253
icon: cfd-jswebide
254+
iconAlt: "JavaScript IDE in the browser icon"
255+
iconTitle: "JS LIDE — JavaScript IDE"
252256
url: /Javascript/
253257
description: Lightweight JavaScript IDE in the browser.
254258
date: "2026-04-24"
@@ -285,6 +289,8 @@ categories:
285289
aliases: [json visualizer, json mapper, visual mapper, tree view]
286290
- name: CSV
287291
icon: cfd-csv
292+
iconAlt: "CSV editor and converter icon"
293+
iconTitle: "CSV — editor and converter"
288294
url: /CSV/
289295
description: View, edit, and convert CSV files online.
290296
date: "2025-03-03"
@@ -294,6 +300,8 @@ categories:
294300
aliases: [csv editor, spreadsheet, table, convert csv]
295301
- name: CIN
296302
icon: cfd-cin
303+
iconAlt: "Corporate identification lookup icon"
304+
iconTitle: "CIN — corporate ID lookup"
297305
url: /CIN/
298306
description: Corporate identification and business lookup utilities.
299307
date: "2026-04-26"
@@ -623,6 +631,8 @@ categories:
623631
aliases: [developer conference, devcon, announcements, cfddc]
624632
- name: PI
625633
icon: cfd-pi
634+
iconAlt: "Pi digits explorer icon"
635+
iconTitle: "PI — pi digits explorer"
626636
url: /PI/
627637
description: Explore Pi digits, facts, and visualizations.
628638
date: "2026-03-15"
@@ -632,6 +642,8 @@ categories:
632642
aliases: [pi digits, math, 3.14, constant]
633643
- name: RL
634644
icon: cfd-rl
645+
iconAlt: "Reinforcement learning demos icon"
646+
iconTitle: "RL — reinforcement learning demos"
635647
url: /Reinforcement/
636648
description: Reinforcement learning demos and experiments.
637649
date: "2026-03-15"

data/homepage.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,40 +48,58 @@ hubBanners:
4848
games:
4949
image: "/images/banners/games.jpg"
5050
title: "Games & Fun"
51+
imageAlt: "Browser games and puzzles on CodeFryDev"
52+
imageTitle: "Games & Fun"
5153
description: "Puzzles, classics, and arcade games—play instantly in your browser."
5254
ai:
5355
image: "/images/banners/ai.jpg"
5456
title: "AI Tools"
57+
imageAlt: "AI-powered tools and generators on CodeFryDev"
58+
imageTitle: "AI Tools"
5559
description: "Meme generators, summarizers, chat, and more—no signup required."
5660
designlab:
5761
image: "/images/banners/designlab.jpg"
5862
title: "Design Lab"
63+
imageAlt: "Design lab tools and creative resources for makers"
64+
imageTitle: "Design Lab"
5965
description: "Creative design tools, visualizers, and resources for makers."
6066
store:
6167
image: "/images/banners/store.jpg"
6268
title: "CodeFryDev Store"
69+
imageAlt: "CodeFryDev mobile apps on Google Play"
70+
imageTitle: "CodeFryDev Store"
6371
description: "Mobile apps and downloads on Google Play."
6472

6573
categoryBanners:
6674
creative-assets:
6775
image: "/images/banners/creative-assets.jpg"
6876
title: "Explore Creative & Assets"
77+
imageAlt: "Creative tools, digital art, and learning assets on CodeFryDev"
78+
imageTitle: "Explore Creative & Assets"
6979
description: "Art tools, wallpapers, 3D models, and learning resources for makers."
7080
tools-utilities:
7181
image: "/images/banners/tools-utilities.jpg"
7282
title: "Tools & Utilities Collection"
83+
imageAlt: "Productivity and developer utilities in the browser"
84+
imageTitle: "Tools & Utilities Collection"
7385
description: "Productivity apps, formatters, SEO tools, and dev utilities in your browser."
7486
games-fun:
7587
image: "/images/banners/games-fun.jpg"
7688
title: "Games & Fun"
89+
imageAlt: "Free browser games including Wordle, Snake, and Chain Reaction"
90+
imageTitle: "Games & Fun"
7791
description: "Wordle, Snake, Chain Reaction, and more—play instantly in your browser."
7892
site-links:
7993
image: "/images/banners/site-links.jpg"
8094
title: "Site & Resources"
95+
imageAlt: "Site links, about pages, and external resources"
96+
imageTitle: "Site & Resources"
8197
description: "About, updates, store, privacy, and external links."
8298
containers-packages:
8399
image: "/images/banners/containers-packages.jpg"
84100
title: "Containers & Packages"
101+
imageAlt: "Docker images and npm packages from CodeFryDev"
102+
imageTitle: "Containers & Packages"
85103
description: "Official Docker images and npm packages from CodeFryDev."
86104

87105
hero:
@@ -91,14 +109,17 @@ hero:
91109
slides:
92110
- image: "/images/hero/slide-1.webp"
93111
imageAlt: "Team collaborating on laptops"
112+
imageTitle: "Tools, games & AI in your browser"
94113
title: "Tools, games & AI in your browser"
95114
description: "This is a platform where we learn, work on experimental projects, play games, come up with innovative ideas, and build many more..."
96115
- image: "/images/hero/slide-2.webp"
97116
imageAlt: "Developers working together at a desk"
117+
imageTitle: "Build faster with CodeFryDev"
98118
title: "Build faster with CodeFryDev"
99119
description: "From JSON playgrounds to design lab resources—everything runs in your browser."
100120
- image: "/images/hero/slide-3.webp"
101121
imageAlt: "Laptop showing code on a desk"
122+
imageTitle: "No install. Just open and use."
102123
title: "No install. Just open and use."
103124
description: "Explore creative assets, productivity tools, games, and AI helpers in one place."
104125

layouts/about-us/about-us.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ <h2 id="about-team-heading" class="about-heading m-0">Our team</h2>
105105
<li>
106106
<a href="{{ .RelPermalink }}" class="about-team-card no-underline group">
107107
<span class="about-team-card__avatar-wrap">
108-
<img src="{{ .Params.listProfile_image }}" alt="" width="64" height="64" class="about-team-card__avatar" loading="lazy">
108+
<img src="{{ .Params.listProfile_image }}" alt="{{ .Title }}" width="64" height="64" class="about-team-card__avatar" loading="lazy">
109109
</span>
110110
<span class="about-team-card__body">
111111
<span class="about-team-card__name">{{ .Title }}</span>

layouts/partials/home/browse-index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ <h2 class="browse-index__section-title">Categories</h2>
5252
<span class="browse-category-card__previews" aria-hidden="true">
5353
{{- range $previews -}}
5454
<span class="browse-category-card__preview" title="{{ .name }}">
55-
<img src="/images/home/{{ .icon }}.svg" alt="" width="32" height="32" loading="lazy">
55+
<img src="/images/home/{{ .icon }}.svg" alt="{{ .iconAlt | default (printf "%s icon" .name) }}" width="32" height="32" loading="lazy"{{- with .iconTitle }} title="{{ . }}"{{ end }}>
5656
</span>
5757
{{- end -}}
5858
</span>

layouts/partials/home/category-banner.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
class="absolute inset-0 h-full w-full object-cover"
2020
loading="lazy"
2121
decoding="async"
22+
{{- with $banner.imageTitle }} title="{{ . }}"{{ end }}
2223
>
2324
{{- else -}}
2425
<img
@@ -29,6 +30,7 @@
2930
class="absolute inset-0 h-full w-full object-cover"
3031
loading="lazy"
3132
decoding="async"
33+
{{- with $banner.imageTitle }} title="{{ . }}"{{ end }}
3234
>
3335
{{- end -}}
3436
<div class="absolute inset-0 bg-gradient-to-r from-slate-950/65 via-transparent to-slate-950/10" aria-hidden="true"></div>

layouts/partials/home/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="site-footer__inner">
1111
<div class="site-footer__mast">
1212
<a href="/" class="site-footer__brand" aria-label="CodeFryDev home">
13-
<img src="/images/IconCodefrydev.svg" alt="" width="28" height="28" class="site-footer__logo" loading="lazy">
13+
<img src="/images/IconCodefrydev.svg" alt="CodeFryDev" width="28" height="28" class="site-footer__logo" loading="lazy">
1414
<span class="site-footer__name">CodeFryDev</span>
1515
</a>
1616
<p class="site-footer__tagline">

layouts/partials/home/hero.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,27 @@
55
{{- $autoplay := $hero.autoplayMs | default 6000 -}}
66
{{- $slides := $hero.slides -}}
77
{{- $firstSlide := index $slides 0 -}}
8+
{{- $firstSlideAlt := $firstSlide.imageAlt | default $firstSlide.title -}}
89

910
<section id="hero" data-section-label="Home" class="home-hero relative text-center flex flex-col items-center justify-center px-4 py-8 overflow-hidden bg-[#edf2f8]" aria-roledescription="carousel" aria-label="Featured highlights">
1011
<div class="home-hero__bg" aria-hidden="true">
1112
<div id="bg-layer-1" class="home-hero__bg-layer opacity-100">
1213
<img
1314
id="hero-bg-img-1"
1415
src="{{ $firstSlide.image }}"
15-
alt=""
16+
alt="{{ $firstSlideAlt }}"
1617
width="1600"
1718
height="840"
1819
class="home-hero__bg-img"
1920
fetchpriority="high"
2021
decoding="async"
22+
{{- with $firstSlide.imageTitle }} title="{{ . }}"{{ end }}
2123
>
2224
</div>
2325
<div id="bg-layer-2" class="home-hero__bg-layer opacity-0">
2426
<img
2527
id="hero-bg-img-2"
26-
alt=""
28+
alt="{{ $firstSlideAlt }}"
2729
width="1600"
2830
height="840"
2931
class="home-hero__bg-img"

layouts/partials/home/nav.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<nav class="flex items-center justify-between gap-4 h-[73px]" aria-label="Main navigation">
1010
<div class="flex items-center gap-2.5 shrink-0 z-20">
1111
<a href="/" id="ladybug-logo-anchor" class="flex items-center no-underline shrink-0" aria-label="CodeFryDev home">
12-
<img src="/images/IconCodefrydev.svg" alt="" width="36" height="36" class="h-9 w-9 shrink-0" fetchpriority="high">
12+
<img src="/images/IconCodefrydev.svg" alt="CodeFryDev" width="36" height="36" class="h-9 w-9 shrink-0" fetchpriority="high">
1313
</a>
1414
<span class="hidden sm:inline-flex items-baseline font-bold text-lg tracking-tight text-brand leading-none">
1515
<a href="/" class="text-inherit no-underline hover:opacity-90">CODEFRYDEV</a>

layouts/partials/home/tool-card.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
{{- end -}}
1414
{{- $titleClass := "text-lg xl:text-xl font-semibold text-slate-900 tracking-tight leading-tight truncate m-0 min-w-0" -}}
1515
{{- $linkClass := "tool-card__link text-inherit no-underline hover:text-brand after:absolute after:inset-0 after:rounded-2xl after:z-10 after:content-['']" -}}
16+
{{- $iconAlt := $item.iconAlt | default (printf "%s icon" $item.name) -}}
1617

1718
<article
1819
class="tool-card relative bg-white border border-gray-100 p-3.5 rounded-2xl flex items-center gap-3 hover:-translate-y-1 hover:shadow-md transition-all group"
@@ -50,7 +51,7 @@ <h3 class="{{ $titleClass }}">
5051
</div>
5152
</div>
5253
<div class="w-20 h-20 xl:w-[104px] xl:h-[104px] bg-gray-50/80 rounded-xl shrink-0 flex items-center justify-center p-2 border border-gray-50 group-hover:border-gray-100 transition-colors relative z-0">
53-
<img src="/images/{{ $iconDir }}/{{ $item.icon }}.svg" alt="" class="w-full h-full object-contain opacity-80 group-hover:opacity-100 transition-opacity" loading="lazy" width="80" height="80">
54+
<img src="/images/{{ $iconDir }}/{{ $item.icon }}.svg" alt="{{ $iconAlt }}" class="w-full h-full object-contain opacity-80 group-hover:opacity-100 transition-opacity" loading="lazy" width="80" height="80"{{- with $item.iconTitle }} title="{{ . }}"{{ end }}>
5455
{{- if $isExternal -}}
5556
<span class="absolute top-1 right-1 text-[9px] text-slate-400" aria-hidden="true"></span>
5657
{{- end -}}

static/js/home-hero.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,24 @@
2727
const autoplayMs = prefersReducedMotion ? 0 : Number(window.heroAutoplayMs) || 6000;
2828
const fadeMs = prefersReducedMotion ? 0 : 500;
2929

30-
function setLayerImage(layerEl, url) {
31-
if (!layerEl || !url) return;
30+
function slideImageAlt(slide) {
31+
return (slide && (slide.imageAlt || slide.title)) || '';
32+
}
33+
34+
function setLayerImage(layerEl, slide) {
35+
if (!layerEl || !slide || !slide.image) return;
3236
var img = layerEl.querySelector('img');
3337
if (img) {
34-
img.src = url;
38+
img.src = slide.image;
39+
img.alt = slideImageAlt(slide);
40+
if (slide.imageTitle) {
41+
img.title = slide.imageTitle;
42+
} else {
43+
img.removeAttribute('title');
44+
}
3545
return;
3646
}
37-
layerEl.style.backgroundImage = "url('" + String(url).replace(/'/g, "\\'") + "')";
47+
layerEl.style.backgroundImage = "url('" + String(slide.image).replace(/'/g, "\\'") + "')";
3848
}
3949

4050
function syncLadybugBackup() {
@@ -113,7 +123,7 @@
113123
const nextLayer = activeLayer === 1 ? bgLayer2 : bgLayer1;
114124
const currentLayerEl = activeLayer === 1 ? bgLayer1 : bgLayer2;
115125

116-
setLayerImage(nextLayer, slide.image);
126+
setLayerImage(nextLayer, slide);
117127

118128
if (fadeMs === 0) {
119129
applySlideContent(slide);

0 commit comments

Comments
 (0)