Sc2 4 7 Focus In Viewport

Description

This test checks that all elements that receive focus are visible in the viewport.

Background

Assumptions

Test properties

Property Value
Test name Focused element visible in viewport
Success Criterion 2.4.7 Focus Visible
Test mode Automatic
Test environment Remote Controlled User Agent
Test subject Single web page

Test procedure

Selector

Test mode: automatic

Each element that matches one of the following CSS selectors

Step 1

Test mode: automatic

Give focus to the selected element.

Check that the offsetTop is equal or greater than 0 AND that the offset left minus the textIndent is equal or greater than 0

If yes, return:

Outcome Passed
Testcase SC2-4-7-focus-in-viewport
ID SC2-4-7-focus-in-viewport-passed1

If no, return:

Outcome Failed
Testcase SC2-4-7-focus-in-viewport
ID SC2-4-7-focus-in-viewport-failed
Error The element should be inside the viewport when it receives focus