Skip to content

Commit

Permalink
indicate what to do with multiple headings in hgroup
Browse files Browse the repository at this point in the history
Related to whatwg/html#7829.

Assuming this PR lands, an `hgroup` will only allow a single heading and paragraph elements <small>(and script-supporting elements, but that's not relevant here)</small> to represent sub-heading information.

However, as there are _lots_ of instances of `hgroup` in the wild where multiple headings are used - as this was allowed prior to the HTML PR, these will become invalid markup patterns, and indicating that the headings of lower level be treated as `p` elements will at least mitigate for this change.

For additional discussion:
- should `hgroup` be exposed as a 'heading group' or even just a 'group' to define the boundaries of where the hgroup content starts/stops
- should `p` elements or errant extra `h#` elements be exposed as 'sub headings'.  `doc-subtitle` could potentially be used - though I'm not sure if that is actually appropriate, as we _don't_ want the subheadings to be exposed as 'headings' as some of the mappings for `doc-subtitle` would seem to indicate might be the result of mapping to this role.  This could potentially be related to what dpub ARIA roles should be brought back into ARIA proper - e.g., `role=subheading` 

this effectively resolves #123
this may well help resolving w3c/aria-practices#1157
  • Loading branch information
scottaohara authored Apr 28, 2022
1 parent 82df665 commit a570e0f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,11 @@ <h3>HTML Element Role Mappings</h3>
<td class="uia"><div class="general">Use WAI-ARIA mapping</div></td>
<td class="atk"><div class="general">Use WAI-ARIA mapping</div></td>
<td class="ax"><div class="general">Use WAI-ARIA mapping</div></td>
<td class="comments"></td>
<td class="comments">
If an `hgroup` contains multiple heading elements, then the heading element with the highest priority level
MUST be treated as the sole heading of the `hgroup`. All other heading elements MUST instead be exposed as if they
were `p` elements.
</td>
</tr>
<tr tabindex="-1" id="el-hr">
<th>
Expand Down

0 comments on commit a570e0f

Please sign in to comment.