[html5] Understanding HGROUP

Matthew Jelenic matthew.jelenic at gmail.com
Thu Jun 11 17:48:37 PDT 2015


On Fri, Jun 12, 2015 at 4:11 AM, Brian Tremblay <webmaster at tsmchughs.com>
 wrote:


> I've never done that. Maybe that's why I'm missing the point.
>
> whereas the contents of a header element could be headings, or logos
>> or just metadata about the section… - a bit too vague to machine
>> interpret.
>>
>
> Ok. Then <header><h1><h2> would do the job, ISTM.

<header>
>  <h1>Flight 222</h1>
>  <h2>A journey to Shashamene Land</h2>
> </header>
>
>
> --
> Brian Tremblay


But then the <h2> would appear in the outline, which <hgroup> prevents.
Conundrum!

I hadn't thought about making the page machine readable as a cause, and I
guess it makes sense, but I'd address that using structured data. Wack an
*itemprop="alternativeHeadline"* on my <p> that occurs in a
schema.org/Article itemscope and the happy little web crawlers get their
tasty info (as well as all the other data I'm revealing to them that way)!

Would exposing that info semantically through a tag be better? Maybe?

But, where do we draw the line? There's plenty of info I'm giving the
machines through structured data and I'd rather keep it out of custom tags
(there'd be a lot of new tags) - after all, the content's layout and
context gives meaning to people and it's the machines that need the help.

There are other things on the book cover, though. The page author, a quote
from a review, the publisher's name. Those things are paragraphs, not
headings.

Ian Hickson <ian at hixie.ch>


Ah, there we go. Yeah, that's a good example. The header would fill up with
a lot of <p>. Wait. Ew. Anyways, I suppose I'd probably "structured data"
the lot for the machines, and provide meaning to the user via layout
context. Good point, Ian!

Actually, just had a thought. Accessibility. Sure I can make some text big
and associate it with the heading via proximity, but that doesn't really
convey the same meaning to a screen reader or other accessibility tech,
does it? I *could* chuck a role=heading on that badboy and call it a day -
but again I don't like using headings when it's not starting a section
(though I understand that it is acceptable within the fencing of <hgroup>).

I guess there's always more than one way to mark up a cat!

Thanks for the discussion, WHATWG Peoples! It looks like it's a case where
we have a few options available (it's good to have choices!) and it's up to
the person doing the building to decide what works best for them.

Thanks again, it was educational!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20150612/490419fa/attachment.htm>


More information about the Help mailing list