Matthias Scharwies: Warnhinweis für fehlendes alt-Attribut

Beitrag lesen

Servus!

Grad bei Miriam Suzanne gesehen:

Sollten wir das im Wiki auch machen?

img:not([alt]), .audio-player__canvas:not([title]), .video-player video:not([title]), .media-gallery__gifv video:not([title]) {
    border: medium dashed red;
    box-sizing: border-box;
}

.media-gallery__item-thumbnail:has(img:not([alt]))::after {
    content: 'No image description';
    background: maroon;
    color: mistyrose;
    display: inline-block;
    padding: 0.1rem 0.4rem;
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
}

BTW: Im Firefox wird das Pseudoelement nicht angezeigt.

Herzliche Grüße

Matthias Scharwies

--
Eigentlich hatte ich heute viel vor - jetzt habe ich morgen viel vor!