Skip to content

"suggestion" role is not aligned with "Allowed Accessibility Child Roles" model #2834

Description

@giacomo-petri

We moved from "Required Owned Elements" to "Allowed Accessibility Child Roles", updating all related roles accordingly. However, the definition for suggestion still appears somewhat outdated and inconsistent with the updated model:

suggestion role

...
Authors MUST ensure that a suggestion contains either one insertion child or one deletion child or ensure that it contains two children where one is an insertion and the other is a deletion. Authors MUST ensure a suggestion does not contain any other children.
...

In particular:

  • it refers to "children" rather than "accessibility children". This seems to unnecessarily restrict valid accessibility tree structures such as "generic/role none" intervening. For example, it would appear to prevent patterns such as:
    <p>
      The best pet is a
      <span role="suggestion">
        <div>
          <span role="deletion">cat</span>
          <span role="insertion">dog</span>
        </div>
      </span>
    </p>
    
  • it uses "contains"; my assumption is that this is intended to mean "contains in the descendant accessibility tree", rather than being strictly limited to DOM-wrapped children. This interpretation would already account for cases involving aria-owns and generic intervening elements, provided that the notion of "accessibility children" is applied consistently.
  • it must not be empty. I assume this is intentional, although it is not consistent with other patterns for "allowed accessibility child roles" such as menu, menubar, tree, treegrid, ...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions