Re: [whatwg] hgroup functionality absorbed into header?
On Fri, 16 Oct 2009, Kornel Lesi�~Dski wrote: On 9 Oct 2009, at 09:18, Ian Hickson wrote: For example, the W3C copy of HTML5 says: h1HTML5/h1 h2A vocabulary and associated APIs for HTML and XHTML/h2 h2Editor's Draft 9 October 2009/h2 ... h2Abstract/h2 ...which is what it would be interpreted as. This is what is meant: section h1HTML5; A vocabulary and associated APIs for HTML and XHTML; Editor's Draft 9 October 2009/h1 If that's what you mean, why not write it this way? h1HTML5 span class=subtitle A vocabulary and associated APIs for HTML and XHTMLbr Editor's Draft 9 October 2009/span/h1 Because HTML5 A vocabulary and associated APIs for HTML and XHTML Editor's Draft 9 October 2009 is not the title of the document. The title is HTML5, and the rest are distinct subtitles. People already use h2 in this manner, it's a well-established pattern. Your version with split h2 seems to use it only for visual effect. Not just visual, but presentational, yes, pretty much. It also makes it clear how to generate the outline. I still think that subtitle (subheader, tagline) would be just as effective, less confusing and less likely to break outline when used improperly... How is h2 confusing? It's what people do already. I think something like subtitle is just as likely to be misused as hgroup, to be honest. Also, it has a much poorer legacy (backwards compatibility) story. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] hgroup functionality absorbed into header?
On Sun, 18 Oct 2009 08:54:59 +0100, Ian Hickson i...@hixie.ch wrote: Your version with split h2 seems to use it only for visual effect. Not just visual, but presentational, yes, pretty much. It also makes it clear how to generate the outline. I don't understand how presentational h2s make outline clear. I thought they're an exception that didn't work simple outline algorithm: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml5%2Foutline=1#outlineresult and hgroup exists to resolve ambiguity caused by presentational use of headers. I still think that subtitle (subheader, tagline) would be just as effective, less confusing and less likely to break outline when used improperly... How is h2 confusing? h2 alone isn't. hgroup is the source of confusion. * Difference between hgroup and header is not obvious. It wasn't to me when I first saw them, and this isn't first thread about them. * Makes meaning of hx overloaded (sometimes it's a header that affects outline and level or other headers, sometimes it's a subheader that doesn't do anything that header would). Have you seen this post? http://www.onderhond.com/blog/work/the-hgroup-tag I think it sums up problems quite well. I think something like subtitle is just as likely to be misused as hgroup, to be honest. Sure, but it's much more fail-safe. If you use header instead of hgroup or fail to use hgroup, you may significantly change structure of the document. You can't make much damage with subheader. Sections will remain correct and at worst you'll add wrong subtitles to headers. My proposal for processing of subheader: * look for first hx preceeding subheader in tree order (depth-first starting with last child) [makes any subheader after hx work] * abort and ignore subheader when search crosses section boundaries [prevents misplaced subheader from being associated with wrong section]. Optionally: * if hx is an ancestor of subheader, associate subheader with that header The last rule allows: h1subheaderThe magnificent/subheader HTML 5 specification/h1 which addresses one of use cases you've mentioned a while ago when hgroup was discussed. Also, it has a much poorer legacy (backwards compatibility) story. Both solutions have problems. I don't think ones are much worse than the others. hgroup breaks the outline, subheader is ignored. Without CSS h2s will be too large and have too big margins. subheader will not get special rendering, but at least will look like block element (hx and p typically surrounding it will cause this). One might use psubheaderb if non-CSS display is a concern. With CSS subheader will work fine and doesn't limit styling possibilities. hgroup's content model doesn't allow any non-header elements, so one can't add any extra hooks for styling: hgroup h1/ div!-- add fancy border around subheaders? -- h2/ h2/ /div /hgroup Another thing - can you write XPath query that extracts all headers from the document? Without hgroup it's simple. With hgroup I'm not sure if I could manage to write correct query. -- regards, Kornel Lesinski
Re: [whatwg] hgroup functionality absorbed into header?
On Sun, 18 Oct 2009, Kornel Lesinski wrote: On Sun, 18 Oct 2009 08:54:59 +0100, Ian Hickson i...@hixie.ch wrote: Your version with split h2 seems to use it only for visual effect. Not just visual, but presentational, yes, pretty much. It also makes it clear how to generate the outline. I don't understand how presentational h2s make outline clear. I thought they're an exception that didn't work simple outline algorithm: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml5%2Foutline=1#outlineresult and hgroup exists to resolve ambiguity caused by presentational use of headers. I mean that it defines exactly what value to use in the outline. This: h1The Reality Dysfunction; Space is not the only void/h1 ...would result in an outline that had the following title: The Reality Dysfunction; Space is not the only void However, this: hgroup h1The Reality Dysfunction/h1 h2Space is not the only void/h2 /hgroup ...results in an outline with just: The Reality Dysfunction ...as desired. (A user agent could also include the subtitle, but it isn't required.) I still think that subtitle (subheader, tagline) would be just as effective, less confusing and less likely to break outline when used improperly... How is h2 confusing? h2 alone isn't. hgroup is the source of confusion. * Difference between hgroup and header is not obvious. It wasn't to me when I first saw them, and this isn't first thread about them. Sure, but people get it pretty quickly. Most of the threads are along the lines of I don't like it, not It does X where X is wrong. * Makes meaning of hx overloaded (sometimes it's a header that affects outline and level or other headers, sometimes it's a subheader that doesn't do anything that header would). Have you seen this post? http://www.onderhond.com/blog/work/the-hgroup-tag I think it sums up problems quite well. If those are the problems, then I think we're doing pretty well. There were a couple of misunderstandings quickly addressed by the comments. As far as I can tell, the other concerns were all theoretical, such as not approving of the element taking its meaning from its parents. However, this is a pattern used all over HTML5, and I don't see why it's a problem. I think something like subtitle is just as likely to be misused as hgroup, to be honest. Sure, but it's much more fail-safe. If you use header instead of hgroup or fail to use hgroup, you may significantly change structure of the document. That's clearly not the end of the world, since people are doing it all the time today! You can't make much damage with subheader. Sections will remain correct and at worst you'll add wrong subtitles to headers. There's plenty of damage you could make. What if someone decides that header should be subheader because it's in a section, and they end up putting entire sections in there, for instance? Authors have an unlimited capacity for misusing HTML. Also, it has a much poorer legacy (backwards compatibility) story. Both solutions have problems. I don't think ones are much worse than the others. I think subheader has far bigger problems than hgroup (primarily its lack of default styles in legacy UAs). hgroup breaks the outline I still think this is incorrect. It fixes the outline in new UAs, and has no effect on legacy UAs. subheader is ignored. Without CSS h2s will be too large and have too big margins. The CSS is already there, though, since people are already using h2 for this. With CSS subheader will work fine and doesn't limit styling possibilities. hgroup's content model doesn't allow any non-header elements, so one can't add any extra hooks for styling: hgroup h1/ div!-- add fancy border around subheaders? -- h2/ h2/ /div /hgroup That's a good point. However, in general, I would encourage people to not insert HTML divs purely for styling; instead, in the future, XBL and CSS will hopefully provide the tools to address this. (We can always allow div later if this becomes a real problem.) Another thing - can you write XPath query that extracts all headers from the document? Without hgroup it's simple. With hgroup I'm not sure if I could manage to write correct query. This problem exists in general in HTML -- can you write an XPath that selects the elements on a per-section basis, say? Or that selects all the third-level headers, including the right h1s in sections? For that kind of thing we'll need pesudo-elements (in Selectors) or custom functions (in XPath). -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Re: [whatwg] hgroup functionality absorbed into header?
On 9 Oct 2009, at 09:18, Ian Hickson wrote: For example, the W3C copy of HTML5 says: h1HTML5/h1 h2A vocabulary and associated APIs for HTML and XHTML/h2 h2Editor's Draft 9 October 2009/h2 ... h2Abstract/h2 ...which is what it would be interpreted as. This is what is meant: section h1HTML5; A vocabulary and associated APIs for HTML and XHTML; Editor's Draft 9 October 2009/h1 If that's what you mean, why not write it this way? h1HTML5 span class=subtitle A vocabulary and associated APIs for HTML and XHTMLbr Editor's Draft 9 October 2009/span/h1 Your version with split h2 seems to use it only for visual effect. I still think that subtitle (subheader, tagline) would be just as effective, less confusing and less likely to break outline when used improperly... -- regards, Kornel Lesiński
Re: [whatwg] hgroup functionality absorbed into header?
On Sat, 3 Oct 2009, Oli Studholme wrote: In talking with authors about HTML5 hgroup[1] I’ve found it seems confusing for many people, and I’ve also found it a little difficult to explain so it’s easy to understand (conversation = why? outline algorithm. huh?). Currently it’s only role is to hide subheadings from the outline algorithm and it doesn’t map to a common use pattern for adding semantic meaning. There doesn’t seem to be any tangible benefit to authors in using it. The tangible benefit is that when navigating the document by section, or when generating a table of contents, there will be the right number of sections. For example, the W3C copy of HTML5 says: h1HTML5/h1 h2A vocabulary and associated APIs for HTML and XHTML/h2 h2Editor's Draft 9 October 2009/h2 ... h2Abstract/h2 ... However, this is _not_ meant to mean: section h1HTML5/h1 section h2A vocabulary and associated APIs for HTML and XHTML/h2 /section section h2Editor's Draft 9 October 2009/h2 ... /section section h2Abstract/h2 ... /section ... ...which is what it would be interpreted as. This is what is meant: section h1HTML5; A vocabulary and associated APIs for HTML and XHTML; Editor's Draft 9 October 2009/h1 ... section h2Abstract/h2 ... /section ... ...and expressing that is only really possible with hgroup (or some similar feature, like an attribute toggle somewhere): section hgroup h1HTML5/h1 h2A vocabulary and associated APIs for HTML and XHTML/h2 h2Editor's Draft 9 October 2009/h2 /hgroup ... section h2Abstract/h2 ... /section ... Superfriends suggested a Boolean attribute for header to determine if all child h1-h6 elements are included in the outline[2]. That would unfortunately prevent things like: header h1My great blog/h1 h2Navigation/h2 (navigation links...) h2About me/h2 (intro...) /header The current hgroup model excludes all subtitles from the outline. Well, UAs can show the text, it just prevents the subtitles from generating new sections in the outline. Assuming that subtitles should not be included in the outline (eg to make sure the highest-ranked title is indeed descriptive), what if header by default masked subtitles from the outline algorithm as hgroup currently does? In header, there are no subtitles, the titles would be actual titles for subsections. Previously, hgroup was just called header and did what you describe, but people indicated they wanted sections in header. Currently #the-header-element[3] mentions a “Little Green Guys With Guns” example in which h1-h6 elements in the header but outside hgroup create implied section elements via the outline algorithm. If header hides all but one h1-h6 element this won’t happen (this is also a potential issue with the Boolean attribute idea). While the spec states authors should add wrapping sections I suspect many won’t bother and rely on implied ones (unless they need CSS hooks). This would also be potentially confusing compared with footer, and possibly encourage authors to mistakenly add sections with headers inside of a header (copypaste mistakes etc). Indeed. While this idea has drawbacks I feel hgroup’s lack of tangible author benefit and ‘occasional use’ nature will result in it not being widely used when it should be. The most common uses will likely only take a few WordPress template changes for it to end up being used in a lot of places. -- Ian Hickson U+1047E)\._.,--,'``.fL http://ln.hixie.ch/ U+263A/, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
[whatwg] hgroup functionality absorbed into header?
Hi All, In talking with authors about HTML5 hgroup[1] I’ve found it seems confusing for many people, and I’ve also found it a little difficult to explain so it’s easy to understand (conversation = why? outline algorithm. huh?). Currently it’s only role is to hide subheadings from the outline algorithm and it doesn’t map to a common use pattern for adding semantic meaning. There doesn’t seem to be any tangible benefit to authors in using it. Superfriends suggested a Boolean attribute for header to determine if all child h1-h6 elements are included in the outline[2]. The current hgroup model excludes all subtitles from the outline. Assuming that subtitles should not be included in the outline (eg to make sure the highest-ranked title is indeed descriptive), what if header by default masked subtitles from the outline algorithm as hgroup currently does? This would mean hgroup is no longer necessary, and make header less optional (it currently feels like solely a CSS hook from an author perspective). Currently #the-header-element[3] mentions a “Little Green Guys With Guns” example in which h1-h6 elements in the header but outside hgroup create implied section elements via the outline algorithm. If header hides all but one h1-h6 element this won’t happen (this is also a potential issue with the Boolean attribute idea). While the spec states authors should add wrapping sections I suspect many won’t bother and rely on implied ones (unless they need CSS hooks). This would also be potentially confusing compared with footer, and possibly encourage authors to mistakenly add sections with headers inside of a header (copypaste mistakes etc). While this idea has drawbacks I feel hgroup’s lack of tangible author benefit and ‘occasional use’ nature will result in it not being widely used when it should be. I’d like to hear your opinion on both this idea and the Superfriends Boolean attribute idea (which I haven’t found discussed in the list). Thanks for your time peace - oli PS note section elements implied by the outline algorithm aren’t present in the DOM and so are not styled (thanks @vant) [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-hgroup-element [2] http://www.zeldman.com/superfriends/guide/#hgroup [3] http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-header-element