-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Accessibility] Nested ARIA and HTML buttons - Presentational Roles Conflict Resolution #50045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
giacomo-petri
wants to merge
10
commits into
web-platform-tests:master
Choose a base branch
from
giacomo-petri:patch-5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e2f7125
Nested ARIA and HTML buttons - Presentational Roles Conflict Resolution
giacomo-petri 23c4853
Update wai-aria/role/role_none_conflict_resolution.tentative.html
giacomo-petri 5d2a636
Update wai-aria/role/role_none_conflict_resolution.tentative.html
giacomo-petri 99d9117
Update role_none_conflict_resolution.tentative.html
giacomo-petri db7d403
Update role_none_conflict_resolution.tentative.html
giacomo-petri 767d7d1
Apply suggestions from code review
giacomo-petri ddab884
Update role_none_conflict_resolution.tentative.html
giacomo-petri cbd4f58
Update role_none_conflict_resolution.tentative.html
giacomo-petri d33999c
Update role_none_conflict_resolution.tentative.html
giacomo-petri 38c80a0
Update role_none_conflict_resolution.tentative.html
giacomo-petri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
wai-aria/role/role_none_conflict_resolution.tentative.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"; | ||
giacomo-petri marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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); | ||
cookiecrook marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| AriaUtils.verifyRolesBySelector(".ex-role"); | ||
| </script> | ||
|
|
||
| </body> | ||
| </html> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.