Sc2 4 7 Visible Link Focus

Please note, this is a draft

Description

This test checks that if links receive focus their style is changed in such a way that focus is recognized by the user.

Background

Assumptions

Test properties

Property Value
Success Criterion 2.4.7 Focus Visible
Test mode Automatic
Test environment Rendered page
Test subject Single web page

Test procedure

Selector

Test mode: automatic

Select each visible anchor element on the page which does not have a negative tabindex attribute set

Step 1: Outline visibility

Test mode: automatic

Set OUTLINE_NO_FOCUS to be the CSS outline of the selected element.

Move focus to the selected element.

If the CSS outline of the selected element differs from OUTLINE1, return:

Outcome Passed
Testcase SC2-4-7-visible-link-focus
ID SC2-4-7-visible-link-focus-pass-1

Move focus away from selected element

Step 2:

As in step 1, set variables for the following CSS properties of the selected element: border, color, box-shadow, background

Move focus to the selected element.

If any of the CSS properties border, color, box-shadow or background is different from its previously set variable, return:

Outcome Passed
Testcase SC2-4-7-visible-link-focus
ID SC2-4-7-visible-link-focus-pass-2

Else, return

Outcome Failed
Testcase SC2-4-7-visible-link-focus
ID SC2-4-7-visible-link-focus-fail
Error The focus of the link is not visible