Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: focusgroup - none behavior token disables navigation</title>
<meta name="assert" content="none disables all focusgroup navigation.">
<link rel="author" title="Microsoft" href="http://www.microsoft.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/shadow-dom/focus-navigation/resources/focus-utils.js"></script>
<script src="../resources/focusgroup-utils.js"></script>
<div focusgroup="none">
<button tabindex=0 id=n1>n1</button>
<button tabindex=0 id=n2>n2</button>
</div>
<script>
promise_test(async t => {
const n1 = document.getElementById('n1');
await focusAndSendDirectionalInput(n1, kRight);
assert_equals(document.activeElement.id, 'n1');
}, "none: Right blocked");
promise_test(async t => {
const n1 = document.getElementById('n1');
await focusAndSendDirectionalInput(n1, kLeft);
assert_equals(document.activeElement.id, 'n1');
}, "none: Left blocked");
promise_test(async t => {
const n1 = document.getElementById('n1');
await focusAndSendDirectionalInput(n1, kDown);
assert_equals(document.activeElement.id, 'n1');
}, "none: Down blocked");
promise_test(async t => {
const n1 = document.getElementById('n1');
await focusAndSendDirectionalInput(n1, kUp);
assert_equals(document.activeElement.id, 'n1');
}, "none: Up blocked");
</script>