This check 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
//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 check does not indicate that there is something necessarily wrong with the input field. This check should just be used to create a list of pages for reviewing the provided alternative content for the input field.