Coding for Beginners: CSS Basics #49— Accessibility for Background Images?

Maribel Gray on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

BeginnerAccessibility3 min

About this video

This short lesson covers why background images are treated as decorative in HTML and CSS, and how to add alternative text to one using role="img" and aria-label on an empty span inside a div. It is aimed at designers learning basic HTML and CSS.

What you’ll learn

  • Explain why background images are not announced by assistive technology
  • Add alternative text to a background image with role and aria-label
  • Place accessibility attributes on an empty span inside a div