Chapter How do you mark up subheadings?
https://mastodon.social/@aardrian@toot.cafe/115477037040834249
https://www.tempertemper.net/blog/the-return-of-the-heading-group First time I’ve seen someone name hgroupDoes anyone have a good use case or a good reason generally for naming hgroup s? I would think that is unnecessary noise for screen reader users?cc @James Scholes
10 replies
James Scholes Saturday at 7:34 PM
Sorry if I’m misreading this, but I think the author is in search of a solution to a problem that doesn’t exist (or at least not to the degree they seem to think it does).Labelling a group with the word “heading,” which itself is the name of an accessible role, is a demonstrably bad idea. And while there are use cases for grouping a heading with some text, blog post title plus post metadata is not a compelling example of one. (edited)
1
1
1
James Scholes Saturday at 7:42 PM
There are many red flags here. Unfortunately I’m struggling to articulate them in a way that doesn’t come across as rude to someone I don’t know, and who has put time and effort into an accessibility post.But in terms of naming <hgroup> (h-group for the SR users like me for whom the H is probably silent):
<hgroup>has similar semantics to<div role="group"or<fieldset>, when named.- A group without a name is often meaningless noise, so you will most commonly see
role="group"or fieldsets with names (the latter usually coming from a legend). - As such, I think that if someone has a valid use case for
<hgroup>, they probably can and should find a name for it just as they would with fieldset orrole="group". - I don’t think the use case in the post is helpful, and hence the group doesn’t need a name or to be a group.
(edited)
1
1
1
sarasoueidan Sunday at 2:56 AM
Thank you @James Scholes that confirms my assumptions. That’s why I asked for examples of use cases or a reason to do this because this is one of those examples of devs trying to improve the experience for screen reader users but end up creating more noise instead.
stevef Today at 1:47 AM
yeah i defined it in that way, so it gave people who wanted to use hgroup a way to do it without making it overly verbose
hgroup was always present in WHATWG html, i always thought it pretty useless, given its reason for existing was to mask headings other than the highest ranked from the outline algorithm (which never got implemented), but some people like it. using it makes them feel better, so i provided that (edited)
the missing piece is the implementation of the special semantics for
within to indicate that the is a subheading, but the aural semantics are of unknown <0 value in this case Adrian Roselli Today at 4:02 AM FYI that I commented (on Masto since the site has no comment form) and he responded (4×): https://mastodon.social/@tempertemper/115485340807681664 sarasoueidan 8 minutes ago @stevef I’ve followed the updates with the algorithm closely (thanks to your posts about it) when I was writing the course content and remember you also recommending how to mark up subheadings with I asked for examples or use cases for naming
1<p> s.hgroup specifically because i can’t think of any where it would be useful to SR users instead of adding unnecessary noise.This is yet one of many examples of aria-label being used in a well-intentioned attempt to “help” screen reader users understand something they don’t need help understanding. Like @James Scholes said, it’s (yet another) example of trying to solve a problem that doesn’t exist.