Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /shadow-dom/focus-navigation/reading-flow/tentative/grid-order-across-scopes.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: reading-flow with value grid-order on shadow host</title>
<link rel="author" title="Di Zhang" href="mailto:dizhangg@chromium.org">
<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='../../resources/shadow-dom.js'></script>
<script src="../../resources/focus-utils.js"></script>
<style>
.wrapper {
display: grid;
reading-flow: grid-order;
}
</style>
<!-- Since B,A are inside a display: contents, they are visited together. -->
<!-- Since B has order 1, its display: contents parent is visited first. -->
<div class="test-case" data-expect="B,A,C"
data-description="Grid items in shadow host that is a display contents grid item">
<div class=wrapper>
<div style="display: contents">
<template shadowrootmode=open>
<slot></slot>
</template>
<button id="A" style="order: 2">A</button>
<button id="B" style="order: 1">B</button>
</div>
<button id="C" style="order: 3">C</button>
</div>
</div>
<script>
runFocusTestCases();
</script>