mirror of
https://github.com/servo/servo
synced 2026-04-28 18:37:39 +02:00
47 lines
1.9 KiB
HTML
47 lines
1.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
|
|
<title>CSS Test: :focus pseudo-class - adjacent sibling selector</title>
|
|
<style type="text/css">
|
|
@page { font: italic 8pt sans-serif; color: gray;
|
|
margin: 7%;
|
|
counter-increment: page;
|
|
@top-left { content: "CSS 2.1 Conformance Test Suite"; }
|
|
@top-right { content: "Test focus-pseudo-class-002"; }
|
|
@bottom-right { content: counter(page); }
|
|
}
|
|
</style>
|
|
|
|
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
|
|
<link rel="help" href="http://www.w3.org/TR/html4/interact/forms.html#h-17.11" />
|
|
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#dynamic-pseudo-classes" />
|
|
<link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#adjacent-selectors" />
|
|
<meta name="flags" content="interact" />
|
|
<meta name="assert" content="An HTML 4 text input control must be focused in order to enter text into it. The :focus pseudo-class applies to a text input control while it has the focus (accepts keyboard events or other forms of text input)." />
|
|
|
|
<style type="text/css"><![CDATA[
|
|
span
|
|
{
|
|
color: white;
|
|
}
|
|
|
|
input:focus + span
|
|
{
|
|
color: green;
|
|
}
|
|
]]></style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<p>Enter in the text field below with the pointing device or with the keyboard (with the tab key or with the "T" accesskey) and then enter some text into it. A message in green should then have appeared on its right-hand side indicating that such text field has received focus. In order to pass this test, the tester should not have to move the pointing device outside the text field.</p>
|
|
|
|
<div>
|
|
<input type="text" accesskey="T" tabindex="1" /> <span>Focus received by text field</span>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |