Skip to main content
All CollectionsCustom PoliciesFind Pages that contain specific HTML elements for manual quality review
Flag pages with <input> element with type="image" where provided alt text may not be as concise as possible
Flag pages with <input> element with type="image" where provided alt text may not be as concise as possible

Allows users to review pages with specific elements for additional quality

Updated over 2 years ago

This policy can be used to create a list of pages that have an input element with type="image" where the provided alternative text is greater than a specified character threshold. DubBot natively screens to verify that alt text and labels are actually included with these elements as recommended per WCAG. 

This flag can be used to further curate a list to manually review that the provided aria-label or alt content is as concise as possible while accurately describing the function of the input field. 

WCAG Success Criterion 1.1.1 (Level A) outlines that alt text for all input elements with a type attribute value of "image" identifies the purpose or function of the image. Users should check that the alternative text is as concise as possible while describing the function of the input field. The alternative text may be provided via an alt attribute, an aria-label attribute, or an aria-labelledby attribute that references an id to another element in the page's source.

How to set it up:

  • Set rule to “Flag pages that contains" 

  • Set Search by to: XPath

  • Rule:

//input[@type="image" and ((@alt and string-length(@alt) > 100) or (@aria-label and string-length(@aria-label) > 100) or (@aria-labelledby and @aria-labelledby != ""))]

Note: this policy does not indicate that there is something necessarily wrong with the input field. This policy should just be used to create a list of pages for reviewing the provided alternative content for the input field.

Did this answer your question?