Introduction

The Web Accessibility Scan tool checks browser content during browser playback for compliance with web accessibility guidelines such as WCAG 2.2 and Section 508. Web accessibility scans must be chained to existing browser playback tests, which will scan the current state of the web page right after performing that browser playback action.

Chaining the Web Accessibility Scan Tool to Browser Playback

The Web Accessibility Scan tool tests accessibility in the browser and thus must be chained to a Browser Playback test.

To chain an accessibility scan to a browser playback test:

  1. Right-click the Browser Playback test to which you want to add a Web Accessibility Scan and choose Add Output.
  2. In the wizard that opens, enable Browser contents (rendered HTML) and click Next.
  3. Choose Web Accessibility Scan from the list of available tools and click Finish. The Web Accessibility Scan tool opens.

  4. Change the name, if desired.
  5. You can limit scope of the scan to an element instead of scanning the entire page. To do so, choose a method by which you will define the element from the menu at the top of the Narrow Scope to Element Locator panel. The options are:
    • Use Elements Properties: When this is selected, define the element using the Element name, Attribute name, Attribute value, and/or Index value fields.
    • Use XPath: When this is selected, enter a literal XPath string that identifies the element in the XPath field.
    • Use Script: When this is selected, enter a script that produces an XPath string that identifies the element. See Extensibility and Scripting Basics for more information about using scripts.
  6. Save your changes.

Excluding Elements and Rules

It is recommended that you run the Web Accessibility Scan tool at least once without any excludes. If there are violations reported and you wish to exclude them from future scans, you can update the Web Accessibility Scan tool to ignore them.

To exclude elements and rules:

  1. (Optional but recommended) Run the Web Accessibility Scan tool and review the reported violations. Element locators and rule IDs from the report can be easily added to your exclude tables.
  2. Double-click the Web Accessibility Scan tool.
  3. Click Add for the table to which you wish to add an exclude. This opens a new row in the table into which you can add your element locator or rule ID.
    • You can copy an element or rule from the violation report into the appropriate table. You can also manually enter element locators to the Elements to Exclude table. Refer to the table below for more details regarding the prefixes used to locate elements.
  4. Save your changes.

The following table describes prefixes used to locate elements during the Web Accessibility Scan:

PrefixDescription

alt=

Searches for elements by their alt attribute value.
class=Searches for elements by a class associated with the element. Only one class name should be used.
css=Interprets the text that follows the prefix as a CSS selector. Searches for elements using that CSS selector.
dom=Interprets the text that follows the prefix as JavaScript that returns one or more web elements. Executes the JavaScript in the context of the page and returns the elements that the JavaScript returns.
id=Searches for elements by their id attribute value.
link=Interprets the text that follows the prefix as link text. Searches for links with that link text.
xpath=Interprets the text that follows the prefix as an XPath selector. Searches for elements using that XPath selector.
document.Interprets the entire string, including document., as JavaScript that returns one or more element. Executes the JavaScript in the context of the page and returns the elements that the JavaScript returns.
/Interprets the entire string, including /, as an XPath selector. Searches for elements using that XPath selector.

When none of the above prefixes are found, the value is assumed to be an ID and functions as though it were prefixed with id=.

Web Accessibility Rules Enabled

Rule IDDescription
area-altEnsure <area> elements of image maps have alternate text.
aria-allowed-attrEnsure an element's role supports its ARIA attributes.
aria-braille-equivalentEnsure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent.
aria-command-nameEnsure every ARIA button, link and menuitem has an accessible name.
aria-conditional-attrEnsure ARIA attributes are used as described in the specification of the element's role.
aria-deprecated-roleEnsure elements do not use deprecated roles.
aria-hidden-bodyEnsure aria-hidden="true" is not present on the document body.
aria-hidden-focusEnsure aria-hidden elements are not focusable nor contain focusable elements.
aria-input-field-nameEnsure every ARIA input field has an accessible name.
aria-meter-nameEnsure every ARIA meter node has an accessible name.
aria-progressbar-nameEnsure every ARIA progressbar node has an accessible name.
aria-prohibited-attrEnsure ARIA attributes are not prohibited for an element's role.
aria-required-attrEnsure elements with ARIA roles have all required ARIA attributes.
aria-required-childrenEnsure elements with an ARIA role that require child roles contain them.
aria-required-parentEnsure elements with an ARIA role that require parent roles are contained by them.
aria-rolesEnsure all elements with a role attribute use a valid value.
aria-toggle-field-nameEnsure every ARIA toggle field has an accessible name.
aria-tooltip-nameEnsure every ARIA tooltip node has an accessible name.
aria-valid-attr-valueEnsure all ARIA attributes have valid values.
aria-valid-attrEnsure attributes that begin with aria- are valid ARIA attributes.
autocomplete-validEnsures that the autocomplete attribute is correct and suitable for the form field.
avoid-inline-spacingEnsures that text spacing set through style attributes can be adjusted with custom stylesheets.
blinkEnsure <blink> elements are not used.
button-nameEnsure buttons have discernible text.
bypassEnsure each page has at least one mechanism for a user to bypass navigation and jump straight to the content.
color-contrastEnsure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds.
definition-listEnsure <dl> elements are structured correctly.
dlitemEnsure <dt> and <dd> elements are contained by a <dl>.
document-titleEnsure each HTML document contains a non-empty <title> element.
duplicate-id-ariaEnsure every id attribute value used in ARIA and in labels is unique.
form-field-multiple-labelsEnsure form field does not have multiple label elements.
frame-focusable-contentEnsure <frame> and <iframe> elements with focusable content do not have tabindex=-1.
frame-title-uniqueEnsure <iframe> and <frame> elements contain a unique title attribute.
frame-titleEnsure <iframe> and <frame> elements have an accessible name.
html-has-langEnsure every HTML document has a lang attribute.
html-lang-validEnsure the lang attribute of the <html> element has a valid value.
html-xml-lang-mismatchEnsure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page.
image-altEnsure <img> elements have alternate text or a role of none or presentation.
input-button-nameEnsure input buttons have discernible text.
input-image-altEnsure <input type="image"> elements have alternate text.
labelEnsure every form element has a label.
link-in-text-blockEnsure links are distinguished from surrounding text in a way that does not rely on color.
link-nameEnsure links have discernible text.
listEnsure that lists are structured correctly.
listitemEnsure <li> elements are used semantically.
marqueeEnsure <marquee> elements are not used.
meta-refreshEnsure <meta http-equiv="refresh"> is not used for delayed refresh.
meta-viewportEnsure <meta name="viewport"> does not disable text scaling and zooming.
nested-interactiveEnsure interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies.
no-autoplay-audioEnsure <video> or <audio> elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio.
object-altEnsure <object> elements have alternate text.
role-img-altEnsure [role="img"] elements have alternate text.
scrollable-region-focusableEnsure elements that have scrollable content are accessible by keyboard.
select-nameEnsure select element has an accessible name.
server-side-image-mapEnsure that server-side image maps are not used.
summary-nameEnsure summary elements have discernible text.
svg-img-altEnsure <svg> elements with an img, graphics-document or graphics-symbol role have an accessible text.
target-sizeEnsure touch targets have sufficient size and space.
td-headers-attrEnsure that each cell in a table that uses the headers attribute refers only to other cells in that table.
th-has-data-cellsEnsure that <th> elements and elements with role=columnheader/rowheader have data cells they describe.
valid-langEnsure lang attributes have valid values.
video-captionEnsure <video> elements have captions.


  • No labels