Menu

1 / 2

An Alt-Text Regression Test for Responsive Listing Galleries

DEV Community: html·Waqas Ahmed·3 days ago
#CRJy02Li
#devto2#devto#dev#description#alternative
Long article (454 words) — no AI summary yet.
Reading 0:00
15s threshold

AI assisted with drafting this article. The cited standards and original portfolio sample are linked below.

A listing gallery can pass a check for missing alt attributes and still ship a poor description. For example, the desktop image may show a doorway the mobile crop excludes. Both widths can have non-empty alt text, but only one description fits what’s actually shown.

Test the media record, not only the attribute

Start with an image ID, the short alternative, and a description of what each crop must preserve. Keep those three together in the CMS. At QA, open the gallery after import and compare the selected assets at desktop and mobile widths. If you use a picture element, the alt attribute belongs on the img element inside it, rather than on the individual source elements.

Here is a minimal example of the relationship.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.