Test Case xhtml1_wcag2_20050630_3.2_l2_sc2_006: Change of viewport - input onfocus

Formal Metadata

Formal Metadata
TitleChange of viewport - input onfocus
Description Document containing an input field; when the input field gets focus, the browser window is moved.
CreatorBenToWeb (johannes.koch@…)
RightsCopyright BenToWeb 2004-2007

Technologies and Features

Technologies are markup languages or data formats. If the technology is a markup language, “features” refers to elements and attributes.

XHTML ™ 1.0 The Extensible HyperText Markup Language (Second Edition)

XHTML ™ 1.0 The Extensible HyperText Markup Language (Second Edition)

Feature: input (namespace: http://www.w3.org/1999/xhtml) .

Technical specification: http://www.w3.org/TR/1999/REC-html401-19991224/interact/scripts.html#adef-onfocus.

Test Data


The test is intended to fail because the viewport changes when tabbing to the input field.

Test Modes

End user.

Test Files

Test file.


xhtml1_wcag2_20050630_3.2_l2_sc2_006 (XML).


“Rules” refer to success criteria in WCAG 2.0, checkpoints in WCAG 1.0 and similar requirements.

Primary Rules

The test case fails the following success criterion at line 8, column 48: http://www.w3.org/TR/2006/WD-WCAG20-20050630/#consistent-behavior-receive-focus.

Functional Outcome

Change of viewport onfocus.

Technical Comment

The JavaScript in the onfocus attribute causes the browser to change the viewport.