Re: change proposal for <main>: possible validation warning heuristic for misuse

On Wed, Dec 5, 2012 at 10:33 AM, Steve Faulkner <faulkner.steve@gmail.com>wrote:

> On 1 December 2012 22:19, Maciej Stachowiak <mjs@apple.com> wrote:
> > This would end up documenting the semi-mythical "Scooby Doo algorithm"
> for
> > cases when the <main> element is absent.
>
>
> From what I understand, the Scooby Doo algorithm concept was derived from
> section '4.13.1 The main part of the content' of the spec. It was named and
> further elucidated by bruce lawson [2] . Mike Taylor produced a script
> based on the concept [3]
>
> today I created a bookmarklet from the script (adds a dashed border and
> yellow background to what it identifies as the main content)
>
> Scooby Doo
>
> and tested it out on a hundred or so of the pages using <!DOCTYPE html>
> [4] I found that in approximately 95% of cases the algorithm identified the
> main content as either including all of the page content or an element at
> the very start of the page. In other words it is of little to no use in
> determining either what the main content consists of or where it starts.


> I think a much more useful algorithm would take into account id values
> commonly used to identify the main content.
>

Let's be careful what we write into the spec. We should not codify
something that is common usage right now, but won't work in the future.
Also, conversely, we should not ignore something (Scooby Doo) that doesn't
work right now (because <header>, <nav> etc are not in common usage), but
might work very well in a few years when most Web pages have picked up
<header>. This is why I did my analysis assuming Web pages would use those
new elements - where would Scooby Doo end up?

So, you could re-run your analysis by adapting your bookmarklet to run
Scooby Doo not just on the defined elements, but also on elements that have
a @class of header, nav, etc. That may be a bit fairer on Scooby Doo.

Regards,
Silvia.


>
> [1] http://dev.w3.org/html5/spec/links.html#the-main-part-of-the-content
> [2] http://www.brucelawson.co.uk/2012/scooby-doo-content-element/
> [3] http://pastie.org/4663081
> [4] http://www.html5accessibility.com/tests/HTML5-main-content/
>
> regards
> SteveF
>

Received on Wednesday, 5 December 2012 06:58:40 UTC