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

Updating HTML elements to map to their Aria 1.2 roles #348

Merged
merged 11 commits into from
Nov 7, 2021

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Sep 29, 2021

This pull request updates many elements to match the new roles introduced in ARIA 1.2 (working through issue #229), and which are in core aam. The updated elements are as follows:

  • blockquote
  • caption
  • code
  • del
  • em
  • ins
  • meter
  • paragraph
  • strong
  • sub
  • sup
  • time

NOTE: I have not presently updated the mapping for figcaption to the caption role. At various times, people have expressed their unhappiness with the figcaptoin element's current behavior, and the redundancy / verbosity impacts it has as the accessible name for figure. @jnurthen I would like to add this as a future agenda item to the ARIA wg call - specifically the group's feelings on changing figcaption to provide a description, rather than name – or some other alternative.

Additionally, this PR fixes the mappings for body, htmland hgroup

Further, some updates to remove the mention of "?" cells from the 3.4 introduction, and that UAs must not expose aria-roledescription on generic elements.

Lastly, this PR updates the following elements which map to generic (or will map to generic under certain conditions). This, along with the updates to body and hgroup starts the work on #346.


Preview | Diff


Preview | Diff

map to core aam blockquote role
`html` should have mapped to `document` - this is now corrected and the table now indicates to refer to the WAI-ARIA mapping for the document role.

`body` no longer maps to `document` - which matches reality.  `body` now maps to `role=generic`.   further updates may be needed here for instances where authors incorrectly name a generic / provide the body with elements important to accessibility - e.g., `contenteditable`.

closes #330
* remove bullet about “?” cells.  these have all been removed.
* update list item about `aria-roledescription` and mention that UAs must not expose the attribute if used on an implicit `generic` element.
this PR updates the following elements to point to their implicit ARIA roles defined in core aam

* caption
* code
* del
* em
* ins
* meter
* paragraph
* strong
* sub
* sup
* time
starts on issue #346, indicate some of the elements that will map to, or under certain conditions map to `generic`

* autonomous custom elements
* div
* form without accessible name
* form associated custom elements
* section without accessible name
@jnurthen jnurthen requested a review from cyns October 7, 2021 17:15
@scottaohara
Copy link
Member Author

per my mention about speaking to the WG regarding figcaption, there was consensus in the working group to not have figcaption contribute to the accessible name of a figure. instead, it was suggested that an aria-details association between the figure and the figcaption seemed to make the most sense, since a figcaption can contain structured and interactive content that would be less meaningful as a flattened text string (name or description).

all that said, this PR will not be updated to map figcaption to the caption role

Copy link
Contributor

@joanmarie joanmarie left a comment

Choose a reason for hiding this comment

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

See my comments related to the details mapping change.

index.html Outdated Show resolved Hide resolved
index.html Show resolved Hide resolved
index.html Show resolved Hide resolved
@scottaohara scottaohara requested a review from joanmarie November 2, 2021 19:39
@joanmarie
Copy link
Contributor

LGTM. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hgroup mappings do not seem correct Mappings for body and html don't seem to match reality
3 participants