Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions wai-aria/role/role_none_conflict_resolution.tentative.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!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://w3c.github.io/aria/#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>Non-focusable ARIA role="button" nesting non-focusable ARIA role="button" (no presentational roles conflict resolution, since inner button is not focusable)</h2>
<div role="button">
<span>outer button</span>
<span role="button" class="ex-role" data-expectedrole="SPEC_AMBIGUOUS_LOG_VALUE" data-testname="non-focusable ARIA[role=button] nesting non-focusable ARIA[role=button]">Inner button</span>
</div>

<!-- no conflict, since nested button is not focusable; inner button should be exposed as generic - children presentational - //https://github.com/web-platform-tests/interop-accessibility/issues/161 -->
<h2>Focusable ARIA role="button" nesting non-focusable ARIA role="button" (no presentational roles conflict resolution, since inner button is not focusable)</h2>
<div role="button" tabindex="0">
<span>outer button</span>
<span role="button" class="ex-role" data-expectedrole="SPEC_AMBIGUOUS_LOG_VALUE" data-testname="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>Non-focusable ARIA role="button" nesting focusable ARIA role="button" (presentational roles conflict resolution arise, since inner button is focusable)</h2>
<div role="button">
<span>outer button</span>
<span role="button" class="ex-role" data-expectedrole="SPEC_AMBIGUOUS_LOG_VALUE" data-testname="non-focusable ARIA[role=button] nesting focusable ARIA[role=button]" tabindex="0">Inner button</span>
</div>

<!-- conflict arise, since inner button is focusable - //https://github.com/web-platform-tests/interop-accessibility/issues/161-->
<h2>Focusable ARIA role="button" nesting focusable ARIA role="button" (presentational roles conflict resolution arise, since inner button is focusable)</h2>
<div role="button" tabindex="0">
<span>outer button</span>
<span role="button" class="ex-role" data-expectedrole="SPEC_AMBIGUOUS_LOG_VALUE" data-testname="focusable ARIA[role=button] nesting focusable ARIA[role=button]" tabindex="0">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-role");
innerButton.setAttribute('data-expectedrole','SPEC_AMBIGUOUS_LOG_VALUE');
innerButton.setAttribute('data-testname','JS injected HTML button within another HTML button');
document.getElementById("inner-button-container").appendChild(innerButton);

AriaUtils.verifyRolesBySelector(".ex-role");
</script>

</body>
</html>