blob: c3f76c617dfac686909b498ec7d5b60ca383eff6 [file] [log] [blame]
<!DOCTYPE html>
<script src='../resources/testharness.js'></script>
<script src='../resources/testharnessreport.js'></script>
<script src='resources/shadow-dom.js'></script>
<script src='resources/focus-utils.js'></script>
<div id="log"></div>
document tree: [i0 -> [x-foo]]<br>
x-foo's shadow tree: [j1 -> [s1] -> [s2] -> j2 ->[x-bar]]<br>
x-bar's shadow tree: [k1 -> [s3]]<br>
slot #s1: [i1 -> i2]<br>
slot #s2: [i3]<br>
slot #s3: [[s4]]<br>
slot #s4: [i4 -> i5]<br><br>
<b>v1 ideal nav forward: [i0 -> j1 -> i1 -> i2 -> i3 -> j2 -> x-bar -> k1 -> i4 -> i5]</b><br>
<input id="i0" tabindex=0 value="i0">
<div id="x-foo">
<input id="i2" slot="s1" tabindex=2 value="i2">
<input id="i1" slot="s1" tabindex=1 value="i1">
<input id="i3" slot="s2" tabindex=3 value="i3">
<input id="i4" slot="s4" tabindex=4 value="i4">
<input id="i5" slot="s4" tabindex=5 value="i5">
<template data-mode="open">
<div id="x-bar" tabindex=5>
<slot id="s4" name="s4" slot="s3"></slot>
<template data-mode="open">
<slot id="s3" name="s3" tabindex=2></slot>
<input id="k1" tabindex=1 value="k1">
<input id="j1" tabindex=1 value="j1">
<slot id="s2" name="s2" tabindex=3></slot>
<slot id="s1" name="s1" tabindex=2></slot>
<input id="j2" tabindex=4 value="j2">
'use strict';
test(() => {
let xfoo = document.getElementById('x-foo');
let elements = [
}, 'Focus should cover assigned elements of an assigned slot, as well as elements that are directly assigned to a slot.');