WebAIM - Web Accessibility In Mind

E-mail List Archives

image with alt as H1 content?

for

From: Rick Hill
Date: Nov 14, 2011 4:39PM


Just checking. Is this syntax OK for compliance. Assuming we want an H1 at top of pages that display a graphic log that is a link but have a text fall back:

<h1><a href="index.html"><img src="logo.png" width="100" height="100" alt="Home page" /></a></h1>

I understand a "better" method might be to have a background image overlaying the h1 text, but this is more convenient for the purposes of deploying this in a CMS with many sites having different logos/headings …
–––––––––––––––––––––––––––––––––––––––
Rick