-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
Copy pathrole_none_conflict_resolution.tentative.html
46 lines (41 loc) · 2.07 KB
/
role_none_conflict_resolution.tentative.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!doctype html>
<html>
<head>
<title>Role None Conflict Resolution Verification Tests</title>
<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="/wai-aria/scripts/aria-utils.js"></script>
</head>
<body>
<!-- ARIA specs: https://www.w3.org/TR/wai-aria-1.3/#tree_exclusion -->
<!-- no conflict, since not focusable; inner button should be exposed as generic - children presentational - //https://github.com/web-platform-tests/interop-accessibility/issues/161 -->
<h2>ARIA role="button" nesting ARIA role="button" (no presentational roles conflict resolution, since not focusable)</h2>
<div role="button">
<span>outer button</span>
<span role="button" class="ex-generic" data-testname="non-focusable ARIA[role button] nesting non-focusable ARIA[role button]">Inner button</span>
</div>
<!-- conflict arise, since inner button is focusable - //https://github.com/web-platform-tests/interop-accessibility/issues/161-->
<h2>HTML button nesting HTML button</h2>
<div id="button-container">
<button id="outer-button">
<span>outer button</span>
<span id="inner-button-container"></span>
</button>
</div>
<script>
//https://github.com/web-platform-tests/interop-accessibility/issues/161 starts
const innerButton = document.createElement("button");
innerButton.textContent = " (inner button)";
innerButton.id = "inner-button";
innerButton.classList.add("ex");
innerButton.setAttribute('data-expectedrole','button');
innerButton.setAttribute('data-testname','JS injected HTML button within another HTML button');
document.getElementById("inner-button-container").appendChild(innerButton);
AriaUtils.verifyRolesBySelector(".ex");
AriaUtils.verifyGenericRolesBySelector(".ex-generic");
</script>
</body>
</html>