-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add computed role section and mappings #167
Conversation
hey @cookiecrook and @scottaohara, I'd really like your opinion on this! Check out the githack to see how the tables look: https://raw.githack.com/w3c/core-aam/computed-roles/index.html#mapping_role And @cookiecrook, I'd really like to hear your take or expectations for the roles with are context dependent, and the other roles which are affected by the existence of attributes and accessible names. Have you gotten to thinking about those yet? |
@spectranaut wrote:
The PR associated with web-platform-tests/interop-accessibility#8 includes
so yes, I’ve been thinking about how to ensure we can test it all, but I have not been thinking deeply of how to specify it. Yours looks like a good start. It should probably also include a reference that contextual requirements may apply. For example, a cell in a valid row context should return a computedrole of cell, but an orphaned cell should not. |
We should discuss further how much we need to spec granularly vs leave to WPT edge case tests. For example, it would be tedious to spec all the built-in heuristics of what constitutes a valid data and I expect there will be some discussion of the purposeful implementation differences related to layout list-itis and an expectation of computedrole: thread: https://twitter.com/cookiecrook/status/1337226933822603270 |
I think this would be good to define, and HTML has a suggestion for the heuristic: https://html.spec.whatwg.org/multipage/tables.html#the-table-element
Getting interop on this also seems good imo. |
Asserts computedrole for ARIA Core-AAM role synonyms - image/img - none/presentation - list/directory Related Issues: - web-platform-tests/interop-accessibility#10 - w3c/core-aam#166 Supporting Spec Change: - w3c/core-aam#167 Implementation Changes: - WebKit: https://webkit.org/b/224617 - Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1428763 Reviewed By: - spectranaut: Valerie Young (Igalia)
Asserts computedrole for ARIA Core-AAM role synonyms - image/img - none/presentation - list/directory Related Issues: - web-platform-tests/interop-accessibility#10 - w3c/core-aam#166 Supporting Spec Change: - w3c/core-aam#167 Implementation Changes: - WebKit: https://webkit.org/b/224617 - Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1428763 Reviewed By: - spectranaut: Valerie Young (Igalia)
Automatic update from web-platform-tests Synonym role tests for wai-aria (#38941) Asserts computedrole for ARIA Core-AAM role synonyms - image/img - none/presentation - list/directory Related Issues: - web-platform-tests/interop-accessibility#10 - w3c/core-aam#166 Supporting Spec Change: - w3c/core-aam#167 Implementation Changes: - WebKit: https://webkit.org/b/224617 - Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1428763 Reviewed By: - spectranaut: Valerie Young (Igalia) -- wpt-commits: 0b1a0be7ff72257eb0f2bb4a7227824e5c40761d wpt-pr: 38941
Co-authored-by: Peter Krautzberger <[email protected]>
1e55ba1
to
54347d6
Compare
index.html
Outdated
</section> | ||
<section id="roleMappingComputedRole"> | ||
<h2>Computed Role</h2> | ||
<p>The computed role of an element is a string that represents the role of the element for the purposes of specification comformance testing. When an element has a role but is not contained in the required context (for example, an role `listitem` outside of a `list`), the computed role of the element is unspecified.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cookiecrook this section is non normative so I think I will land it soon, maybe we can just leave this as "unspecified" for now.
Have you done any testing or thought about what the browser should expose as the computed role in this other scenario? I saw that you didn't add tests for it yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recall writing some tests for orphaned elements, like <div role="listitem">
but I agree that we do not fully specify or test this yet.
For example, in the scenario:
<div role="listitemcheckbox checkbox"></div>
It's not listitemcheckbox
b/c of the missing context, but do we use the fallback concrete role, checkbox
, or the native host language role, generic
?
In any case, I agree its okay to leave unspecified in this PR.
index.html
Outdated
</section> | ||
<section id="roleMappingComputedRole"> | ||
<h2>Computed Role</h2> | ||
<p>The computed role of an element is a string that represents the role of the element for the purposes of specification comformance testing. When an element has a role but is not contained in the required context (for example, an role `listitem` outside of a `list`), the computed role of the element is unspecified.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recall writing some tests for orphaned elements, like <div role="listitem">
but I agree that we do not fully specify or test this yet.
For example, in the scenario:
<div role="listitemcheckbox checkbox"></div>
It's not listitemcheckbox
b/c of the missing context, but do we use the fallback concrete role, checkbox
, or the native host language role, generic
?
In any case, I agree its okay to leave unspecified in this PR.
Co-authored-by: Scott O'Hara <[email protected]>
SHA: b7aaf0f Reason: push, by spectranaut Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Closes #166
The githack is easier to review, because the mapping tables code works (unlike in the PR preview, below): https://raw.githack.com/w3c/core-aam/computed-roles/index.html#mapping_role
Implementation
Preview | Diff