Type of policy: XPath
What it is used for: You might want to identify certain words or special characters that a digital camera might have added to default ALT text. The following example contains multiple checks, all in a single check. This example is looking for parentheses (
and )
, underscore _
, the word Image
or the shortened version of image, img
.
How to set it up:
Use XPath
Set policy to “Page contains" the Regular Expression
Add the following portions that you'd like to use (you can add or remove as needed)
//img[contains(@alt, '(') or contains(@alt, ')') or contains(@alt, '_') or contains(@alt, 'image') or contains(@alt, 'Image') or contains(@alt, 'img')]