Run HTML_CodeSniffer
Run HTML_CodeSniffer
According to Success Criterion 1.1.1 (Non-text Content), all non-text content, including images, should have a short text alternative, and (if required) a long text alternative.
When an image is used as the only content within a link, the alt text of the image should indicate the function of the link - this is slightly different to the normal requirement that it describe the image (although in a perfect environment, it should describe both).
This is a regression test for GitHub issue #52. There are three links in the tested paragraph. The first one is an image with empty alt text which should generate the H30.2 error, used as a control. The third includes the additional text in a STRONG tag, which previously passed.
The second includes additional text, not included in a tag, and it is this that we are testing as a regression to issue #52.
The first link should emit the following Error:
The second and third links should not throw this error (but should throw a warning: H67.2, stating the image is ignored by assistive technology). A H30.2 error in the second link indicates a regression for issue #52, and an error in the third is a regression from what was previously working.