W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

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

From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
Date: Thu, 8 Nov 2012 08:07:10 +1100
Message-ID: <CAHp8n2mN-Sm9ULynUtgUBbpj6rBsBnHJS0BHy-LE5K7MbN2=sA@mail.gmail.com>
To: Markus Ernst <derernst@gmx.ch>
Cc: "Jukka K. Korpela" <jkorpela@cs.tut.fi>, whatwg@lists.whatwg.org
On Thu, Nov 8, 2012 at 3:00 AM, Markus Ernst <derernst@gmx.ch> wrote:

> Am 07.11.2012 15:48 schrieb Jukka K. Korpela:
>  I suppose that the heuristics would include recognizing a <div> element
>> to which class "main" has been assigned. Then one could argue that
>> <main> is not needed, as authors can keep using <div class="main">, as
>> millions of pages use.
> I doubt that this is useable for that kind of heuristics anyway - as there
> is no standard for this, "main" as a class name may indicate the main
> contents, but also a main container to center the whole page. Also,
> non-english speaking coders may use their own language words as id or class
> names.


Looking at existing uses of <div class="main"> to analyse whether we need a
<main> element really doesn't make sense to me. I firmly believe that
class="main" is mostly used for CSS purposes and not for semantic (and thus
accessibility) purposes.

Instead, we should be looking at pages that use <xxx role=main> or more
traditionally in older Web pages use a "skip to main" link as the use cases
for a <main> element. Sometimes that may co-incide with <div class="main">,
but not in general.

Therefore, I don't actually think that the introduction in Steve's
document  is making a good case for the existence of the element with this
"The main element formalises the common
identification of the main content section of a document using the
id values such as 'content' and 'main'."

I'd suggest explaining that there is currently no explicit means of
identifying with 100% accuracy what part of a Web page is the single most
important part. Instead we have a solution only for accessibility purposes
with the @role="main" ARIA attribute, or more traditionally by providing a
"skip to main" link on the top of the page. If there was a <main> element
that semantically identified the important part of a Web page, that would
improve accessibility, but also enable for example search engines to give
that part of a Web page a higher importance.

On that latter part: I am always annoyed when a search engine gives me
links to a particular topic that I was searching for which is only
mentioned in a side bar as some related information. It would be possible
to exclude such content if there was a <main> element. The argument that
<article> and <aside> etc. will do away with such problems relies on
authors actually making use of these elements. I am yet to see that happen
- in fact I have seen people that started using these elements go away from
them again, since they don't seem to have any obvious advantage. <main> on
the other hand has a very real advantage - immediately for accessibility -
and its easier to put a single <main> element on a page than to introduce a
whole swag of new elements. It's the simplicity of that single element that
will make it immediately usable by everyone, will reduce the probability of
authoring error, and thus make it reliable for search engines and other
semantic uses.

Received on Wednesday, 7 November 2012 21:09:01 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:48 UTC