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

Labelling listbox option groups #1696

Closed
scottaohara opened this issue Feb 15, 2022 · 1 comment · Fixed by #1703
Closed

Labelling listbox option groups #1696

scottaohara opened this issue Feb 15, 2022 · 1 comment · Fixed by #1703
Assignees
Labels
Milestone

Comments

@scottaohara
Copy link
Member

Right now if I were to tell someone how to provide a visible label for their listbox option groups, i'd have to recommend a markup pattern like:

<div role=listbox ...>
  <div role=group aria-labelledby=f>
    <div id=f aria-hidden=true>group label</div>
    <div role=option ...>...</div>
    ...
  </div>
</div>

And fine. we can get by with that. But is there any reason we could not say that caption was an allowed child of a group in this context?

<div role=listbox ...>
  <div role=group aria-labelledby=f>
    <div id=f role=caption>group label</div>
    <div role=option ...>...</div>
    ...
  </div>
</div>

In this context, the caption would only ever be accessed directly by AT if someone were to switch out of forms mode when interacting with the listbox. Arguably, we could also tell AT that in this context the caption should be ignored... though I could see good reason to not do that as well.

Also, if we re-pickup the idea of naming an ancestor from a descendant role, this could eventually turn into:

<div role=listbox ...>
  <div role=group>
    <div role=caption>group label</div>
    <div role=option ...>...</div>
    ...
  </div>
</div>
@jnurthen jnurthen self-assigned this Feb 17, 2022
@jnurthen jnurthen added this to the ARIA 1.4 milestone Feb 17, 2022
@scottaohara scottaohara self-assigned this Feb 17, 2022
@scottaohara
Copy link
Member Author

Also this is not just for listbox groupings of options, but would also be useful for groupings of menu items, and their ilk, in menu patterns

scottaohara added a commit that referenced this issue Mar 12, 2022
This change in the definition is related to the changes in `figure` and `figcaption` in HTML AAM: w3c/html-aam#359 and introduces the idea that a `caption` may contain structured content - and in this PR - `aria-details` is referenced as a way authors should reference such content if within a `caption`

Additionally, this PR extends the definition to allow `caption` to be used for purposes of naming/describing a `group` or `radiogroup`, which fills some gaps from the dropped `legend` role.

If these updates are accepted, this would help pave the way to resolve #1696 as well.
pkra pushed a commit that referenced this issue Apr 29, 2022
* revise caption definition

This change in the definition is related to the changes in `figure` and `figcaption` in HTML AAM: w3c/html-aam#359 and introduces the idea that a `caption` may contain structured content - and in this PR - `aria-details` is referenced as a way authors should reference such content if within a `caption`

Additionally, this PR extends the definition to allow `caption` to be used for purposes of naming/describing a `group` or `radiogroup`, which fills some gaps from the dropped `legend` role.

If these updates are accepted, this would help pave the way to resolve #1696 as well.

* add in missing id to first example

* fix spacing issues

* include additional example
pkra pushed a commit that referenced this issue Jul 14, 2022
* revise caption definition

This change in the definition is related to the changes in `figure` and `figcaption` in HTML AAM: w3c/html-aam#359 and introduces the idea that a `caption` may contain structured content - and in this PR - `aria-details` is referenced as a way authors should reference such content if within a `caption`

Additionally, this PR extends the definition to allow `caption` to be used for purposes of naming/describing a `group` or `radiogroup`, which fills some gaps from the dropped `legend` role.

If these updates are accepted, this would help pave the way to resolve #1696 as well.

* add in missing id to first example

* fix spacing issues

* include additional example
jnurthen pushed a commit that referenced this issue Oct 10, 2023
* revise caption definition

This change in the definition is related to the changes in `figure` and `figcaption` in HTML AAM: w3c/html-aam#359 and introduces the idea that a `caption` may contain structured content - and in this PR - `aria-details` is referenced as a way authors should reference such content if within a `caption`

Additionally, this PR extends the definition to allow `caption` to be used for purposes of naming/describing a `group` or `radiogroup`, which fills some gaps from the dropped `legend` role.

If these updates are accepted, this would help pave the way to resolve #1696 as well.

* add in missing id to first example

* fix spacing issues

* include additional example
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 a pull request may close this issue.

2 participants