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

Option role has confusing/contradictory/circular context roles specified #809

Closed
carmacleod opened this issue Aug 23, 2018 · 7 comments · Fixed by #1087
Closed

Option role has confusing/contradictory/circular context roles specified #809

carmacleod opened this issue Aug 23, 2018 · 7 comments · Fixed by #1087
Labels
editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo has PR PR exists that will close this issue
Milestone

Comments

@carmacleod
Copy link
Contributor

The role definition for option states the following:

A selectable item in a select list.

Authors MUST ensure elements with role option are contained in, or owned by, an element with the role listbox or group. Options not associated with a listbox might not be correctly mapped to an accessibility API.

  1. The first sentence says that an option is a selectable item in a select list, where select can be:
  • combobox
  • listbox
  • menu
  • radiogroup
  • tree
  1. The next sentence says that authors MUST ensure elements with role option are contained in, or owned by, an element with the role listbox or group, where listbox is just listbox, and group can be:
  • group
  • row
  • select
  • toolbar
  1. The third sentence says options not associated with a listbox might not be correctly mapped to an accessibility API.

The group context role was added for 1.2, but I think the other sentences still need cleanup. It is strange that listbox is singled out as being "the" required context role, yet there are other allowed context roles. Additionally confusing is that select is a subclass of group but both are mentioned.

The following wording is cleaner, although I'm not sure if this corresponds to the actual mappings:

A selectable item in a group.

Authors MUST ensure elements with role option are contained in, or owned by, an element with the role group or one of its subclasses. Options not associated with a group might not be correctly mapped to an accessibility API.

@carmacleod
Copy link
Contributor Author

Also, the Required Context Role: for option currently contains both:

  • group
  • listbox

Again, it is strange to single out listbox, when these other concrete roles are also allowed:

  • combobox
  • menu
  • radiogroup
  • tree
  • row
  • toolbar

So I think the Required Context Role: section for option should either contain only group, or all of the possible concrete roles.

@jnurthen
Copy link
Member

I think the problem is the first sentence. As far as I know option only applies for listbox. Would changing the first sentence to "A selectable item in a listbox." sort out all the other issues?

@carmacleod
Copy link
Contributor Author

As far as I know option only applies for listbox.

Oh, interesting. So, why was group added as context role?

If it really-truly is only for listbox then those sentences need to be:

A selectable item in a listbox.

Authors MUST ensure elements with role option are contained in, or owned by, an element with the role listbox. Options not associated with a listbox might not be correctly mapped to an accessibility API.

i.e. also need to remove "or group" from sentence 2.

And the Required Context Role: section needs to only contain listbox (i.e. delete group).

But group was recently added, so there must be discussion about that around here somewhere.

@jnurthen
Copy link
Member

options would be allowed inside a group in a listbox too.

@carmacleod
Copy link
Contributor Author

carmacleod commented Aug 23, 2018

issue #719
PR #782

@carmacleod
Copy link
Contributor Author

options would be allowed inside a group in a listbox too.

Ah, I see. So how about:

A selectable item in a listbox.

Authors MUST ensure elements with role option are contained in, or owned by, an element with role listbox or group (as long as group is contained in a listbox). Options not associated with a listbox might not be correctly mapped to an accessibility API.

@jnurthen jnurthen added this to the ARIA 1.2 milestone Aug 23, 2018
@jnurthen jnurthen added the editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo label Aug 23, 2018
@kevinSuttle
Copy link

kevinSuttle commented Jul 31, 2019

Something I've noticed that I don't see listed anywhere else, which may be adding to this confusion with listbox and option

listbox seems to be the only role which attempts to emulate the <select multiple> pattern, which is supported by means of aria-multiselectable (also supported by roles such as tablist, tree, etc., but not menu).

Could just be me, though.

@scottaohara scottaohara added the has PR PR exists that will close this issue label Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo has PR PR exists that will close this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants