Labels should be added to all non-text content; the alt attribute is a requirement for both HTML 4 and XHTML W3C standards based documents.
When trying to decide on the text label required for a particular non-text element, I find it helps to think of them as (roughly) falling into one of three categories: functional, decorative (including layout), or providing content.
Functional
For functional images, including navigation bars (and horizontal rules) the text should describe the function or destination. For example, if an image is used as a search button, the alt attribute could be ‘Search’, if an image is used for navigation the alt attribute should describe the destination. Usually the alt attribute for functional images contains the same text as appears on the graphic button or navigation bar.
Providing content
For images that contain important content, the alt attribute should provide a short description of the content (a few words that sums up the content). Use the title or longdesc attributes for longer descriptions.
Decorative including layout images (e.g. single pixel gifs)
For purely decorative images, or images used to help with the layout of a page, the alt attribute should be empty (alt=”‘).
Tags: accessibility, alt attributes, image labels, images
Related Content
- Website Accessibility Auditing Service – for WCAG 2.1, WCAG 2.2 ComplianceRichard Morton is a member of our website accessibility audit team "A large proportion of my work over the last six years has been web accessibility auditing, using the Web Content Accessibility Guidelines (WCAG 2.1 & WCAG 2.2).I do manual testing, using the standard browsers, and light tools like the AIS ...
- About Web Designer and Accessible Website Design Specialist Jim ByrneA passion for equality and accessibility Decades before he became an accessible website design specialist, Jim started his working life as a computer programmer in 1979 using 'miniframe' computers that had LP (a long player record) sized 'not very floppy disks'. The disks needed to be screwed into a large cabinet ...
- Accessible website design blogNews, views, links about accessible web design and more.
Take my Web Accessibility Online Training Course - WCAG 2.1 Compliance
Learn to design and manage WCAG compliant, accessible websites with my online course
You will learn both the techniques of accessible website design and an entire ‘framework for thinking about the subject’. It will equip you with the skills to understand, identify and fix issues any accessibility issues you come across. Watch the free videos to get a taste of what is on the course.Working with non-profits, charities, voluntary and public sector organisations and social enterprises for over 20 years. Jim set up one of the worlds first website accessibility web agencies in the mid 1990s.