[whatwg] A plea to Hixie to adopt <main>

James Graham jgraham at opera.com
Wed Nov 7 09:48:49 PST 2012


On 11/07/2012 05:52 PM, Ojan Vafai wrote:
> On Wed, Nov 7, 2012 at 6:23 AM, Simon Pieters <simonp at opera.com> wrote:
>
>> My impression from TPAC is that implementors are on board with the idea of
>> adding <main> to HTML, and we're left with Hixie objecting to it.
>>
>
> For those of use who couldn't make it, which browser vendors voiced
> support? I assume Opera since you're writing this thread.

To be clear, "Opera" didn't voice support for anything. Some people from 
Opera suggested that it seemed like a reasonable idea (I think it seems 
like a reasonable idea).

> Hixie's argument is, I think, that the use case that <main> is intended to
>> address is already possible by applying the Scooby-Doo algorithm, as James
>> put it -- remove all elements that are not main content, <header>, <aside>,
>> etc., and you're left with the main content.
>>
>> I think the Scooby-Doo algorithm is a heuristic that is not reliable
>> enough in practice, since authors are likely to put stuff outside the main
>> content that do not get filtered out by the algorithm, and vice versa.
>>
>> Implementations that want to support a "go to main content" or "highlight
>> the main content", like Safari's Reader Mode, or whatever it's called, need
>> to have various heuristics for detecting the main content, and is expected
>> to work even for pages that don't use any of the new elements. However, I
>> think using <main> as a way to opt out of the heuristic works better than
>> using <aside> to opt out of the heuristic. For instance, it seems
>> reasonable to use <aside> for a pull-quote as part of the main content, and
>> you don't want that to be excluded, but the Scooby-Doo algorithm does that.
>>
>> If there is anyone besides from Hixie who objects to adding <main>, it
>> would be useful to hear it.
>
>
> This idea doesn't seem to address any pressing use-cases.

I think that finding the main content of a page has clear use cases. We 
can see examples of authors working around the lack of this feature in 
the platform every time they use a "skip to main" link, or (less 
commonly) aria role=main. I believe we also see browsers supporting 
role=main in their AT mapping, which suggests implementer interest in 
this approach since the solutions are functionally isomorphic (but with 
very different marketing and usability stories).

I think the argument that the Scooby Doo algorithm is deficient because 
it requires many elements of a page to be correctly marked up, compared 
to <main> which requires only a single element to get the same 
functional effect, has merit. The observation that having one element on 
a page marked — via class or id —  "main" is already a clear cowpath 
enhances the credibility of the suggested solution. On the other hand, I 
agree that now everyone heading down the cowpath was aiming for the same 
place; a <div class=main> wrapping the whole page, headers, footers, and 
all is clearly not the same as one that identifies the extent of the 
primary content. I don't know how these different uses stack up 
(apologies if it is in some research that I overlooked).

> I don't expect
> authors to use it as intended consistently enough for it to be useful in
> practice for things like Safari's Reader mode. You're stuck needing to use
> something like the Scooby-Doo algorithm most of the time anyways.

I think Maciej commented on this. IIRC, he said that it wouldn't be good 
enough for reader mode alone, but might usefully provide an extra piece 
of data for the heuristics.

> I don't
> outright object, but I think our time would be better spent on addressing
> more pressing problems with the web platform.

I think that's a very weak argument. In fact, given the current 
landscape I would expect this to swallow more of the web standards 
communities' time if it is not adopted than if it is. But I don't think 
that's a strong argument in favour of adopting it either.




More information about the whatwg mailing list