I was reading the WCAG 2.0 Technique H30.
The Procedure says:
For each link in the content that uses this technique:
- Check that text or a text alternative for non-text content is included in the a element
- If an img element is the only content of the a element, check that its text alternative describes the purpose of the link
- If the a element contains one or more img element(s) and the text alternative of the img element(s) is empty, check that the text of the link describes the purpose of the link
- If the a element only contains text, check that the text describes the purpose of the link
I focused on point 2: what if the img
has an alt
attribute, but hasn't a text alternative?
For example, does the following code satisfy that technique requirement?
<a href="http://www.mystite.com">
<img src="http://www.mystite.com/myimage.jpg" alt="Description of the image" />
</a>