Skip to content

Commit 85bca42

Browse files
committed
🔍️ added alt to img for better seo
1 parent 64fa7a7 commit 85bca42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎js/display.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ function renderEpisodes(episodes, seasonNum) {
215215
img.onerror = function () {
216216
this.src = fallbackThumb;
217217
};
218+
img.alt = `Thumbnail for ${ep.title}`;
218219
thumbContainer.appendChild(img);
219220

220221
const overlay = document.createElement('div');
@@ -275,7 +276,7 @@ export function createMediaCard(item, extraClasses = "") {
275276
const fallback = `https://placehold.co/400x600/1a1a1a/e50914?text=${encodeURIComponent(item.title)}`;
276277

277278
card.innerHTML = `
278-
<img src="${item.poster}" onerror="this.src='${fallback}'" class="w-full h-full object-cover object-center transition-transform duration-700 loading='lazy'">
279+
<img src="${item.poster}" alt="Poster for ${item.title}" onerror="this.src='${fallback}'" class="w-full h-full object-cover object-center transition-transform duration-700 loading='lazy'">
279280
<div class="absolute inset-x-0 bottom-0 p-4 z-20 bg-gradient-to-t from-black/90 via-black/50 to-transparent translate-y-2 group-hover:translate-y-0 transition-transform duration-300">
280281
<h3 class="font-bold text-white text-base md:text-lg leading-tight mb-1 drop-shadow-md line-clamp-1">${item.title}</h3>
281282
<div class="flex items-center gap-3 text-xs font-bold text-gray-300 opacity-0 group-hover:opacity-100 transition-opacity delay-100">

0 commit comments

Comments
 (0)