From a570e0f0e4d9fcc1abea312bbaf0878d8de89f7d Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 28 Apr 2022 10:08:52 -0400 Subject: [PATCH] indicate what to do with multiple headings in hgroup Related to https://github.com/whatwg/html/pull/7829. Assuming this PR lands, an `hgroup` will only allow a single heading and paragraph elements (and script-supporting elements, but that's not relevant here) 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 https://github.com/w3c/aria-practices/issues/1157 --- index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index cd2235c7..ae2353af 100644 --- a/index.html +++ b/index.html @@ -1260,7 +1260,11 @@

HTML Element Role Mappings

Use WAI-ARIA mapping
Use WAI-ARIA mapping
Use WAI-ARIA mapping
- + + 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. +