Image Alt text is short
Short alt text can sometimes be an indication that included alt text is not descriptive.
Penny Kronz avatar
Written by Penny Kronz
Updated over a week ago

There are two possible ways to flag for short alt text. One is by the number of characters used in the alt text. The second is by the number of words used to describe the alt text. The following rules can be used in on rule set or users can choose to include one of the other.

How to set rule based on character count:

  • Set rule to “Flag pages that contains" 

  • Set Search by to: XPath

  • Rule:

//img[string-length(@alt) < X]

Update X to be the number of character threshold that you would like to flag for (ie 100)

How to set rule based on word count:

  • Set rule to “Flag pages that contains" 

  • Set Search by to: XPath

  • Rule:

//img[count(tokenize(@alt, " ")) < X]

Update X to be the number of word threshold that you would like to flag for. If you would like to ensure alt text contains 3 words, set X to 3.

Did this answer your question?