Web Accessibility & WCAG (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
How do you make images accessible with the `alt` attribute?
junior LevelCode ExampleDocker & Containers
In Simple Words:
- Informative Images: Provide concise, descriptive text explaining the meaning and context:
html
<img src="chart.png" alt="Bar chart showing 25% revenue growth in Q3 2026." /> - Decorative Images: Use an explicit empty alt tag (
alt=""):Warning: Omitting thehtml<!-- Empty alt tells screen readers to IGNORE the image completely --> <img src="decorative-swirl.png" alt="" />altattribute entirely causes screen readers to announce the raw file URL (image-assets-final-v2.png), creating awful user experience!