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

initial draft for role="generic" issue #699 #805

Merged
merged 9 commits into from
Jul 24, 2019
Merged

Conversation

carmacleod
Copy link
Contributor

@carmacleod carmacleod commented Aug 20, 2018

issue #699.

Notes & Questions for block and inline generic roles draft:

  1. Used Superclass Role as roletype for both (should it be structure?)
  2. Listed Related Concepts as HTML div/span (should we also list CSS display:block/display:inline? or maybe list those under Base Concept? or not at all?)
  3. Added both to Document Structure Roles category (or should they be categorized in a new "Generic Roles" category)?

Preview | Diff

@carmacleod
Copy link
Contributor Author

Preview of new role sections:

@carmacleod
Copy link
Contributor Author

carmacleod commented Sep 6, 2018

New preview of single generic role:

@carmacleod
Copy link
Contributor Author

carmacleod commented Sep 25, 2018

Preview of new aria-textseparation attribute:

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

I left a comment on #699, but none of it needs to be merge-blocking for this first pass.

Copy link
Contributor

@mcking65 mcking65 left a comment

Choose a reason for hiding this comment

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

I attempted to write some authoring guidance based on what we have in this PR, and I could not do it. I think we have too many open questions to move forward with this. I added some comments to the PR to help clarify some of the problems. I'll add other questions in the issue.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html 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
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@jnurthen jnurthen added the WIP label Nov 13, 2018
@jnurthen jnurthen added Agenda and removed Agenda labels Dec 4, 2018
@carmacleod carmacleod changed the title initial draft for issue #699 initial draft for role="generic" issue #699 Feb 20, 2019
@jnurthen
Copy link
Member

@carmacleod any chance we can split text separation into a separate PR?

@carmacleod
Copy link
Contributor Author

Done. Also refreshed branch.

This PR now only contains generic role.
PR #996 contains the aria-textseparation markup.

Note that I added "Name from: prohibited" to the generic Characteristics table, but need to wait until #985 is merged before uncommenting "Prohibited States and Properties: aria-label, aria-labelledby".

@carmacleod carmacleod force-pushed the issue699-block-inline branch from 7497c9f to a7390ef Compare June 27, 2019 15:22
@carmacleod
Copy link
Contributor Author

Discussion points:

@scottaohara @a11ydoer
Regarding possibly using the word "autonomous" instead of "generic" in this sentence:

With the exception of providing generic HTML Custom Elements, authors should not use this role in content.

I see that to create an autonomous custom element, you extend HTMLElement:
"Autonomous custom elements" = class MyElement extends HTMLElement { ...

... and to create a customized built-in element (and automatically get all of the semantic and behavioral goodness that comes with a pre-existing element), you extend that element (e.g., button):
"Customized built-in elements" = class MyButton extends HTMLButtonElement { ...

Here's the list of elements that will (probably) be mapped to generic:

  • div, form (without accessible name), footer (not scoped to body element), header (not scoped to body element), section (without accessible name), span, thead, tfoot
  • abbr, address, b, i, kbd, mark, pre, q, s, samp, small, u, var
  • and possibly: a (no href), bdi, bdo, dfn (currently mapped to term)

So I'm thinking that maybe (?) someone might extend any one of those, in which case it would be a "customized built-in element" with no semantics (is that correct?). Anyhow, what do you think about modifying the above sentence to something like:

With the exception of providing generic (usually autonomous) HTML Custom Elements, authors should not use this role in content.

@mcking65
Regarding differentiating between role="generic and role="presentation", we already have this sentence:

A generic can provide a limited number of accessible states and properties for its descendants, such as aria-hidden and aria-live.

How about adding an extra sentence, something like:

A generic can provide a limited number of accessible states and properties for its descendants, such as aria-hidden and aria-live. This differentiates it from the presentation role.

Should we mention tabindex? It would be allowed on generic but not on presentation (i.e. if used on presentation, it causes the element to revert to its implicit role).

@scottaohara
Copy link
Member

scottaohara commented Jul 3, 2019

regarding an autonomous custom element, e.g. <my-whatever>, the custom element should be mapped to/considered generic, or as a role=presentation. Unless provided an explicit role, e.g. button. So by default, the role wouldn't need to be set?

If extending an existing HTML element e.g. class MySmall extends HTMLSmallElement, then it should inherit role=generic from existing small element. So shouldn't need it there either?

Unless I'm absolutely missing something here, I honestly don't know why an author would ever use role=generic when creating custom elements.

Per our meeting last week, I do see the benefit of having the role in general, to allow mappings for elements that would otherwise have no mapping, but need to expose something to the accessibility API. But as far as authors actually using it, I'd be happier with just a direct "you shouldn't need this."

re:

dfn (currently mapped to term)

per your "currently" comment, any reason as to why this would change?

- add note saying authors should not use in content
- add editor's note about global properties triage
@carmacleod carmacleod force-pushed the issue699-block-inline branch from e78b884 to 25fec15 Compare July 18, 2019 02:51
@carmacleod
Copy link
Contributor Author

carmacleod commented Jul 18, 2019

Per discussion with @scottaohara, the "Note" can be simplified to:

generic role is intended for implementors of User Agents. Authors should not use this role in content.

  • changed "generic is a role used for the ontology" to "generic role is intended for implementors of User Agents".
  • removed mention of custom elements because custom elements that do not have a more specific role will map to generic.

Discussion points:

  1. Are there any valid use cases for allowing authors to set role="generic"?
    i.e. "Authors SHOULD NOT use in content..." or "MUST NOT"?
  2. What happens if an author gives a generic a tabindex or adds event handling?
    i.e. Allowed? Author error?
  3. Would it be helpful to mention that "generics can be used as the target of a relation such as aria-labelledby or aria-describedby"?

dfn (currently mapped to term)

per your "currently" comment, any reason as to why this would change?

@joanmarie, do you know why dfn is listed under "Triage needed" in the Generic Role section of the Role Parity wiki page? (i.e. will dfn stay mapped to term, now that dt is associationlistitemkey?)

@joanmarie
Copy link
Contributor

@carmacleod Because I hadn't updated the wiki.

@joanmarie
Copy link
Contributor

Conclusion re point 1: Move out of the note and SHOULD NOT.

Conclusion re point 2: Not an author error.

Conclusion re point 3: Authoring guidance.

@joanmarie
Copy link
Contributor

To be landed Tuesday afternoon assuming no more objections!

@jongund
Copy link
Contributor

jongund commented Jul 21, 2019

@carmacleod @jnurthen @mcking65 @joanmarie

Was the name for element ever considered as the role name for generic?
It seems to be much more descriptive or familiar than generic, but it may have been considered earlier in the process and rejected for some reason.

@mcking65
Copy link
Contributor

@jongund asked:

Was the name for element ever considered as the role name for generic?
It seems to be much more descriptive or familiar than generic, but it may have been considered earlier in the process and rejected for some reason.

Yes, for the reason that it is a word frequently used throughout the spec and defined in the glossary. We know from the experience of naming a role "application," that using words like that is riddled with problems.

@jnurthen jnurthen merged commit 1fa5c62 into master Jul 24, 2019
@carmacleod
Copy link
Contributor Author

@jongund @mcking65
Also, just to follow up with one last point, I think element has more of an "abstract superclass" feel, whereas the generic role (by any name) needs to be concrete.

@jnurthen jnurthen deleted the issue699-block-inline branch July 23, 2020 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants