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

updates to contenteditable and tabindex #324

Closed
wants to merge 5 commits into from

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Apr 8, 2021

remap ‘no corresponding role’ elements (i.e., role=generic or inline generic-ish elements) to role=group if they have contenteditable or tabindex set.

related to #259

Review links (because unfortunately the pr-preview Preview and Diff links below are useless):
https://raw.githack.com/w3c/html-aam/contenteditable-tabindex-updates/index.html#att-contenteditable
https://raw.githack.com/w3c/html-aam/contenteditable-tabindex-updates/index.html#att-tabindex


Preview | Diff

remap ‘no corresponding role’ elements (e.g., role=generic) to role=group.
Copy link
Contributor

@carmacleod carmacleod left a comment

Choose a reason for hiding this comment

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

Thanks, @scottaohara !

Just a few notes, below, plus a question: Is it clear what "text accessible object" means?

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Co-authored-by: Carolyn MacLeod <[email protected]>
@joanmarie
Copy link
Contributor

Operating under the assumption that this is going to land, I'm working on making the change in Chromium. (This is independent of the name prohibition code changes btw.) Running Chromium's tests to see what broke led to me finding another thing we need to handle somewhere:

The group role does allow naming BUT from author; not from content. So some things which were generic lost their names as a consequence of becoming a group with no author-provided name. Oops!

Thoughts?

@scottaohara
Copy link
Member Author

in the context of contenteditable, if not specifically named by an author, it exposing no name makes sense to me. since large areas of content can have a contenteditable parent, we would not want all that content contributing to the parent's accessible name.

Similar with tabindex=0 on a scrollable div of content.

what are some of the things you are finding that lost names that I might not be considering here, that we might want to maintain?

@joanmarie
Copy link
Contributor

what are some of the things you are finding that lost names that I might not be considering here, that we might want to maintain?

One test that broke had this: <div tabindex=0>Focusable div</div>

  • Expected results for blink (reminder: I've not done the name-prohibited stuff): genericContainer name='Focusable div'
  • Actual results for blink: group

If a user tabs to that focusable div, they should get a name presented to them, right?

@scottaohara
Copy link
Member Author

@joanmarie yeh that's a reduced example of these https://codepen.io/scottohara/pen/bGBaYEQ

where i think it'd be quite problematic for all that content to be exposed as the name. I don't think <div tabindex=0> should get name from contents.

@jnurthen
Copy link
Member

jnurthen commented Apr 9, 2021

IMO this is something that should fit into the "handling author errors" of the ARIA spec. So if something gets focus and has no accessible name then author agents MAY correct by doing (a) (b) (c) etc.

@joanmarie
Copy link
Contributor

@scottaohara and @jnurthen I'm away on "vacation" next week. But it would be great to have consensus on this so that we can proceed doing/getting our 1.2 implementations. 😄

@aleventhal
Copy link
Collaborator

I think role=group may be too simple of a repair.
For a contenteditable, I would suggest role=textbox is more appropriate. The browser can even try to set aria-multiline appropriately based on whether the field's CSS limits rendering to a single line.
We could even map to role=button if there is a click handler.

@scottaohara
Copy link
Member Author

@aleventhal have you reviewed the discussion on this in #259?

scottaohara added a commit that referenced this pull request Mar 8, 2023
Per discussion around the minimum role concept, and the WG deciding that contentedtiable should remain unmapped to any specific ARIA role when used on a generic.    per that decision #324 is closed, but the other clarifications that were to be a part of that PR are now in this one.

Additionally, there are other necessary updates needed for these mappings, as the previous ones did not get into the nuance of how to handle nested `contenteditable` attributes.
@scottaohara scottaohara closed this Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants