Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 7 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /wai-aria/role/role_none_conflict_resolution.tentative.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<title>Role None/Presentation 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>
<!-- 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>
<!-- This test case is specifically designed to check the role, but a separate test case has been created in accname/name/comp_host_language_label.tentative.html to check the acc name -->
<h2>HTML input with role="none" (presentational roles conflict resolution)</h2>
<label for="irn">input label</label>
<input id="irn" type="text" data-expectedrole="textbox" data-testname="HTML input[role=none] but focusable" class="ex-role" role="none">
<!-- This test case is specifically designed to check the role, but a separate test case has been created in accname/name/comp_host_language_label.tentative.html to check the acc name -->
<h2>HTML input with role="none" and disabled (presentational roles conflict resolution does not apply due to disabled attr)</h2>
<label for="irpd">input label</label>
<input id="irpd" type="text" data-testname="HTML input[role=none][disabled]" class="ex-generic" role="none" disabled>
<h2>HTML input with role="none" and readonly (presentational roles conflict resolution)</h2>
<label for="irnro">input label</label>
<input id="irnro" type="text" data-expectedrole="textbox" data-testname="HTML input[role=none][readonly] but focusable" class="ex-role" role="none" readonly>
<h2>HTML input with role="none", disabled and readonly (presentational roles conflict resolution does not apply due to disabled attr)</h2>
<label for="irpdro">input label</label>
<input id="irpdro" type="text" data-testname="HTML input[role=none][disabled][readonly]" class="ex-generic" role="none" disabled readonly>
<script>
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");
AriaUtils.verifyGenericRolesBySelector(".ex-generic");
</script>
</body>
</html>