Skip to content

Define concept of minimum role #454

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

Closed
wants to merge 30 commits into from
Closed

Define concept of minimum role #454

wants to merge 30 commits into from

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Jan 10, 2023

Worked on this with @aleventhal as this concept is necessary for some current HTML features (as identified in the attribute mapping table in this PR) as well as future proposed features, such as popover.

Implementation


Preview | Diff

Worked on this with @aleventhal as this concept is necessary for some current HTML features (as identified in the attribute mapping table in this PR) as well as future proposed features, such as `popover`.
Copy link
Member

@adampage adampage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no feedback of substance 😅, just a couple proofing suggestions.

scottaohara and others added 2 commits January 19, 2023 06:44
Co-authored-by: Adam Page 
Co-authored-by: Adam Page 
@jnurthen jnurthen requested a review from cookiecrook January 19, 2023 18:49
Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an approval caveat remove the sentence fragment, at least!

@spectranaut
Copy link
Contributor

Maybe it's time to open issues on the browsers with this change?

needed to call out that an explicit role of none, presentation or generic would still need to result in that role being ignored if other conditions were true.
Copy link
Collaborator

@cookiecrook cookiecrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a few problems with this and suggest we schedule a deep dive.

The first is that this doesn't seem to account for native-reserved roles, or roles that we can't yet or haven't yet mimicked with ARIA. For example, or … I think this change suggests UAs MUST map both to group, even though it wouldn't be logical to do so. Even if ARIA eventually adds a role for native date pickers, video is likely to remain separate for a while, because there isn't a good method to support the video API that goes along with it.

The second issue is that ARIA's concept of group requires a much more explicit and purposeful author decision, IMHO, than the related concept in the AX API... As a reminder, AXGroup predates ARIA's group by almost a decade, and is used as a generic container. ARIA's group, as I understand it, represents some explicit logical grouping, so I am not certain it's a good change to force promotion of something like

when the author may have added the relevant role and label to another nearby container. E.g.,

Now I have an extraneous, unlabeled group inside my main, where I hadn't before.
">
<main aria-label="Edit post">
  <div contenteditable>
    Now I have an extraneous, unlabeled group inside my main, where I hadn't before.
  div>
main>

Update b/c I thought of another one. Does the sub-span in this one really need a minimum role?

<main contenteditable="true">
    Obi-Wan never told you what happened to your father.
    He told me enough! He told me you killed him!
    <span contenteditable="false">No. I am your father.span>
div>

scottaohara reacted with thumbs up emoji
@scottaohara
Copy link
Member Author

@cookiecrook thank you for the review.

per your two comments:

...that this doesn't seem to account for native-reserved roles...

it was definitely the intent to account for that, so happy to incorporate changes to make sure that's included / I'll have a think on other wording to make sure that's clear.

re:

so I am not certain it's a good change to force promotion of something like

when the author may have added the relevant role and label to another nearby container.

that's an interesting idea. Though it makes me think back to past projects I worked on - one being a website builder where there were blocks of editable areas within predefined templates. So a main could have 2 or 3 contenteditable divs within it. Something to think about...

@cookiecrook
Copy link
Collaborator

cookiecrook commented Jan 30, 2023

per your two comments:

FYI Our comments crossed when I added a third to the list: contenteditable="false" or contenteditable="plaintext-only" override cascades on sub-sections may not need explicit roles... example above.

@scottaohara
Copy link
Member Author

scottaohara commented Jan 30, 2023

@cookiecrook we had talked about false not triggering a need for a minimum role. In the comments for contenteditable it indicates the minimum role only changes if the value is true. I have a comment in the source code to mention what happens with plaintext-only when that is added to the standard.

scottaohara and others added 5 commits January 31, 2023 07:59
Co-authored-by: James Craig 
Co-authored-by: Valerie Young 
adds "not mapped" to the ARIA role cell.  there is no perfect role for this right now, and until one is made (if ever) we shouldnt' change this.
@spectranaut
Copy link
Contributor

We had a deep dive this morning, it seems the main conclusions were:

  • to remove the minimum role of group from contenteditable, as there is already a history of browsers/ATs attemping to make contenteditable work and we can't be sure if making those elements "group" would make things better or worse.
  • there was agreement that the minimum role of contenteditable=plaintextonly could be "textbox"
  • there was quite a bit of discussion about whether or not "minimum role" was the right language (instead of "implicit role for this attribute", opponents say the "implicit role" has a specific meaning related to the tagname so sound cause confusion). @mcking65, who thought it was unclear, committed to reviewing this PR in order to understand.
  • It was decided not to use the language "fallback" because that implies that authors shouldn't rely on the minimum role, when in fact, the aim is to allow them to rely on the minimum role. If adding an attribute makes the semantic meaning of the element clear, then you shouldn't need to also add a role. Therefore validators will have to be updated to not report errors when these attributes are used on elements with no implicit or explicit roles.

@cookiecrook
Copy link
Collaborator

It was decided not to use the language "fallback"

Also that term had been used to describe the fallback roles such as role="switch checkbox" where checkbox was the ARIA 1.0 fallback role if the engine did not yet support the ARIA 1.1 switch role.

@scottaohara
Copy link
Member Author

had a call with aaron and james today
agreed that accesskey can be dropped from this
no disagreement about introducing the concept
still not 100% on tabindex, but not against it - it's just a change that may create other issues to review (re: naming divs with title which are now groups because of tabindex=0)
can this be merged with the other work i'm doing for contextual role (proably?)

i need to work though if this should be merged, or can be revised into contextual role. i'll work on that soon

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 7, 2023
As a new concept called minimum role was added to the HTML-AAM spec[1],
and the contents corresponding to global attributes in that spec have
been implemented.

[1]: w3c/html-aam#454

AX-Relnotes: n/a.
Fixed: 1474047
Change-Id: I586506e8ddd1e81ad11e92ef9e167586cb41545e
@aleventhal
Copy link
Collaborator

@scottaohara what's the update on this? Which attributes should we start with?

@scottaohara
Copy link
Member Author

OK, finally got back to this and resolved all the merge conflicts. The PR is much simpler to review now in the diff mode.

This now adds the minimum role concept, and to start we're indicating this will occur for the draggable and autofocus attributes.

tabindex is presently not part of this PR (well, it's commented out for further investigation/discussion).

I plan on some editorial revising of this section with the contextual role PR (#484) - but need this to merge first before I work on that anymore.

I think this finalizes the outstanding conversations for this PR (with any potential addition of tabindex being it's own topic for the future)

cc @aleventhal @cookiecrook @jcsteh @benbeaudry

@aleventhal
Copy link
Collaborator

Still LGTM.

@benbeaudry
Copy link

+1!

scottaohara added a commit to web-platform-tests/wpt that referenced this pull request Mar 5, 2024
add tests for minimum role in html aam
w3c/html-aam#454
@scottaohara
Copy link
Member Author

merged via w3c/aria#2220

aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 27, 2024
Bug: w3c/html-aam#454
Change-Id: Ia3930b068311f26f6a7e0be8bbcce53acf820bdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5663675
Auto-Submit: Aaron Leventhal 
Commit-Queue: Mark Schillaci 
Commit-Queue: Aaron Leventhal 
Reviewed-by: Mark Schillaci 
Cr-Commit-Position: refs/heads/main@{#1320576}
cookiecrook pushed a commit to web-platform-tests/wpt that referenced this pull request May 20, 2025
* Create roles-minimum.tentative.html
* add tests for minimum role in html aam w3c/html-aam#454
* remove unused call
* link to issue to clarify dead spec link
lando-prod-mozilla bot pushed a commit to mozilla-firefox/firefox that referenced this pull request May 23, 2025
Automatic update from web-platform-tests
Create roles-minimum.tentative.html (#44934)

* Create roles-minimum.tentative.html
* add tests for minimum role in html aam w3c/html-aam#454
* remove unused call
* link to issue to clarify dead spec link

--

wpt-commits: eba641bdc0a4b66b0bb162ebd775e46bab2b5ca4
wpt-pr: 44934

Differential Revision: https://phabricator.services.mozilla.com/D250952
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 24, 2025
Automatic update from web-platform-tests
Create roles-minimum.tentative.html (#44934)

* Create roles-minimum.tentative.html
* add tests for minimum role in html aam w3c/html-aam#454
* remove unused call
* link to issue to clarify dead spec link

--

wpt-commits: eba641bdc0a4b66b0bb162ebd775e46bab2b5ca4
wpt-pr: 44934

Differential Revision: https://phabricator.services.mozilla.com/D250952
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request May 26, 2025
Automatic update from web-platform-tests
Create roles-minimum.tentative.html (#44934)

* Create roles-minimum.tentative.html
* add tests for minimum role in html aam w3c/html-aam#454
* remove unused call
* link to issue to clarify dead spec link

--

wpt-commits: eba641bdc0a4b66b0bb162ebd775e46bab2b5ca4
wpt-pr: 44934

Differential Revision: https://phabricator.services.mozilla.com/D250952
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request May 28, 2025
Automatic update from web-platform-tests
Create roles-minimum.tentative.html (#44934)

* Create roles-minimum.tentative.html
* add tests for minimum role in html aam w3c/html-aam#454
* remove unused call
* link to issue to clarify dead spec link

--

wpt-commits: eba641bdc0a4b66b0bb162ebd775e46bab2b5ca4
wpt-pr: 44934

Differential Revision: https://phabricator.services.mozilla.com/D250952

UltraBlame original commit: 157047121bca597e3c6232f62942306071927820
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request May 28, 2025
Automatic update from web-platform-tests
Create roles-minimum.tentative.html (#44934)

* Create roles-minimum.tentative.html
* add tests for minimum role in html aam w3c/html-aam#454
* remove unused call
* link to issue to clarify dead spec link

--

wpt-commits: eba641bdc0a4b66b0bb162ebd775e46bab2b5ca4
wpt-pr: 44934

Differential Revision: https://phabricator.services.mozilla.com/D250952

UltraBlame original commit: 157047121bca597e3c6232f62942306071927820
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request May 28, 2025
Automatic update from web-platform-tests
Create roles-minimum.tentative.html (#44934)

* Create roles-minimum.tentative.html
* add tests for minimum role in html aam w3c/html-aam#454
* remove unused call
* link to issue to clarify dead spec link

--

wpt-commits: eba641bdc0a4b66b0bb162ebd775e46bab2b5ca4
wpt-pr: 44934

Differential Revision: https://phabricator.services.mozilla.com/D250952

UltraBlame original commit: 157047121bca597e3c6232f62942306071927820
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.

9 participants