Home › Forums › All Other Themes › Nivo Slider: img.nivo-main-image without alt attribute (Lighthouse a11y/SEO)
- This topic has 1 reply, 2 voices, and was last updated 9 months, 2 weeks ago by
Sonal S Sinha.
-
AuthorPosts
-
January 31, 2026 at 8:56 pm #235803
Technical Description of the Problem (to be pasted into the ticket)
I am encountering a persistent error in Lighthouse / Chrome DevTools → “Names and labels”:
Image elements are missing [alt] attributes
Reported selector: div.slider-main > div.slider-wrapper > div#slider > img.nivo-main-image
Element: <img class=”nivo-main-image … lzl-cached” … src=”…” data-lzl-src=”…”>
➡️ The alt attribute is missing, not just empty.Technical Context
The slider is based on the jQuery Nivo Slider. The logic creates/updates the main image with:
var u = $(“<img/>”).addClass(“nivo-main-image”);
u.attr(“src”, i.currentImage.attr(“src”));
u.attr(“alt”, i.currentImage.attr(“alt”) || “”);
Additionally, an update is triggered on the event:
$(“#slider”).on(“nivo:animFinished”, …)
to re-align src and alt after each transition.
Current Result
Despite efforts, Lighthouse continues to detect that the img.nivo-main-image element is missing the alt attribute, suggesting that:
The alt is being removed/overwritten at runtime by another script, or
There is a conflict with lazy-load (with classes like lzl-cached and attributes like data-lzl-src appearing in the DOM), which could:
Replace the <img> element with a clone
Rewrite the attributes and “drop” the alt
Manage src/data-* without preserving the alt
Note on Nivo Transitions
Nivo generates “slices/boxes” during the animation by creating many internal <img> elements with alt=””. This is secondary; the Lighthouse error explicitly points to the main image (img.nivo-main-image), which lacks the alt attribute.
Request to the Developer
A “permanent” fix is needed to ensure that img.nivo-main-image always has an alt attribute in the final DOM, even with lazy-load active.
Required Technical Actions (Checklist):
Verify if a lazy-load plugin/script (e.g., lzl-*) is replacing img.nivo-main-image and removing the alt attribute.
Ensure that when img.nivo-main-image is created/updated, the attribute is set with:
setAttribute(“alt”, “…”) (not just .attr()), and/or
A MutationObserver to restore alt if another script removes it.
Alternatively: disable lazy-load specifically for the slider or exclude #slider img from optimizations that rewrite the markup.
February 2, 2026 at 11:36 am #235808Hi,
Unfortunately your all themes package has expired.
Kindly renew your package by buying it here: https://www.sktthemes.org/shop/all-themes/
We look forward to welcoming you again into our family.
Regards,
Chris -
AuthorPosts
- You must be logged in to reply to this topic.
