-
Notifications
You must be signed in to change notification settings - Fork 26
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
hgroup element mapping update #398
Conversation
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
marked as not ready for merge until discussion topics are covered and continued work on the associated html issue |
Resolution from today's call - don't do anything regarding |
@jnurthen shall we talk about this again now that the updated heading outline has landed in HTML? |
@jnurthen, spoke to @stevefaulkner this morning. agreed that, especially in lieu of updating the mapping for Extra (now) invalid headings within the hgroup just need to be decided upon. If they remain headings, or if they get remapped. |
@scottaohara @jnurthen thinking more about mapping, wondering if it is worthwhile having a specific mapping for |
The ARIA Working Group just discussed The full IRC log of that discussion<jamesn> topic: multiple headings in hgroup<jamesn> zakim, next item <Zakim> agendum 6 -- -> indicate what to do with multiple headings in hgroup https://github.com//pull/398 -- taken up [from agendabot] <jamesn> github: https://github.com//pull/398 <jamesn> scotto: defered this until outline changes were resolved <jamesn> scotto: the proposal is for extra headings within an hgroup outside of the highest level get mapped to a paragraph <jamesn> scotto: or that we don't do anything and let invalid code be invalid code and validators would be the ones to inform authors of this <jamesn> scotto: the other ask is whether we would be interested in creating a heading group role <jamesn> scotto: to allow AT the option of letting users know that this stuff is all related to the heading <jamesn> scotto: steve's thought otherwise is that there isn't any real boundary <jamesn> scotto: these are the proposals <jamesn> Matt_King: is the name heading group? <jamesn> scotto: hgroup <jamesn> scotto: original purpose was to contribute to the never implemented outline algorithm and authors could group headings together and that never happened <jamesn> scotto: now the content model allows a single heading and other paragraphs to provide additional info <jamesn> scotto: there are implementations which group a bunch of headings <jamesn> scotto: we could do something about that or not do anything and have validators flag them as being in error and have authors fix them <jamesn> Matt_King: hgroup could have h1 h2 ... h6 within them <jamesn> Matt_King: only the h1 is supposed to be a heading and the others wouldn't be heading content? <jamesn> scotto: yes but browsers never implemented it <jamesn> scotto: purpose was to allow you to use these headings essentially for styling things <jamesn> Matt_King: if people are doing for styling reasons <jamesn> Matt_King: could be H1 followed by 2 H4s <jamesn> Matt_King: the right thing from AT is P elements <jamesn> Matt_King: no point in showing the boundaries <jamesn> Matt_King: groups almost never help <jamesn> scotto: do we want to specify that errant headings be Paragraphs <jamesn> scotto: might be easier to have validators call this out <jamesn> Matt_King: sounds more reasonable to me <jamesn> jamesn: make validators shout loudly <jamesn> chlane: is that a case for deprecation? <jamesn> scotto: no - not now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updates coming out of WG discussion from today
don't need to call this out in this spec.
merging per bugs for this change being filed and no objections to this change from the wg. |
See HTML-AAM changes: w3c/html-aam#398 Bug: 1422741 Change-Id: I3e19d675c1ba2c3fae18851ffb9715af4213237b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4329037 Auto-Submit: Ahmed Elwasefi <[email protected]> Commit-Queue: Aaron Leventhal <[email protected]> Reviewed-by: Aaron Leventhal <[email protected]> Cr-Commit-Position: refs/heads/main@{#1117678}
Related to whatwg/html#7829.
hgroup
was revised to no longer have any expectation of multiple headings as nested children. This PR simply revises the mapping ofhgroup
from a generic to arole=group
. This mapping change is done to indicate this element represents a group of related content, and to allow authors to name this group without the need of a specific ARIA attribute.Previous discussion about revising the roles of errant headings, beyond the first valid instance, have been put on hold for now, and are not part of this PR.
this resolves #123
this may well help resolving w3c/aria-practices#1157
Implementation bugs filed:
Preview | Diff