Skip to content
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

Merged
merged 5 commits into from
May 15, 2023
Merged

Add computed role section and mappings #167

merged 5 commits into from
May 15, 2023

Conversation

index.html Show resolved Hide resolved
@spectranaut
Copy link
Contributor Author

spectranaut commented Mar 16, 2023

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?

index.html Outdated Show resolved Hide resolved
@cookiecrook
Copy link
Contributor

cookiecrook commented Mar 17, 2023

@spectranaut wrote:

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?

The PR associated with web-platform-tests/interop-accessibility#8 includes

  • a region role test file that included expectations w/ and w/o labels
  • a list of simple context-independent roles with pointers to the TBA contextual tests

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.

@cookiecrook
Copy link
Contributor

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 table context in the engines such as WebKit’s isDataTable():

https://github.com/WebKit/WebKit/blob/main/Source/WebCore/accessibility/AccessibilityTable.cpp#L111

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

index.html Outdated Show resolved Hide resolved
@zcorpan
Copy link
Member

zcorpan commented Mar 21, 2023

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 table context in the engines such as WebKit’s isDataTable():

https://github.com/WebKit/WebKit/blob/main/Source/WebCore/accessibility/AccessibilityTable.cpp#L111

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

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

Getting interop on this also seems good imo.

@cookiecrook
Copy link
Contributor

.github/pull_request_template.md Outdated Show resolved Hide resolved
.github/pull_request_template.md Outdated Show resolved Hide resolved
index.html Show resolved Hide resolved
cookiecrook added a commit to web-platform-tests/wpt that referenced this pull request Apr 7, 2023
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)
cookiecrook added a commit to cookiecrook/wpt that referenced this pull request Apr 8, 2023
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)
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 15, 2023
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
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>
Copy link
Contributor Author

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.

Copy link
Contributor

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.

@spectranaut spectranaut marked this pull request as ready for review May 15, 2023 17:14
index.html Outdated Show resolved Hide resolved
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>
Copy link
Contributor

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]>
@spectranaut spectranaut merged commit b7aaf0f into main May 15, 2023
github-actions bot added a commit that referenced this pull request May 15, 2023
SHA: b7aaf0f
Reason: push, by spectranaut

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@cookiecrook cookiecrook deleted the computed-roles branch May 15, 2023 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Which ARIA synonym role should computedrole return?
5 participants