A call for consistent display of alt text across browsers
A while ago I posted Safari, WebKit and alt text for missing images, in which I note that most WebKit-based browsers do not always display alt text when images are missing. In alt and title content display in popular browsers, Steve Faulkner presents his results from taking a closer look at this in the browsers that are currently most widely used.
In addition to checking what browsers do with an image’s alt text, Steve also checked if they do something with the title text, if any. Interestingly it turns out that Chrome and Safari display the contents of the
title attribute if the image has no
alt attribute. This situation shouldn’t occur in well-authored HTML documents, but I’m guessing WebKit displays the title text as error-recovery in the case of missing alt text, since in most cases it’s probably much better than displaying the file name.
The results of Steve’s testing show that the behaviour varies quite a bit across browsers, and I agree with his conclusion that it would be nice to see this standardised by specifying the recommended behaviour in HTML 5.
- Previous post: Is SVG support coming to Internet Explorer?