The use cases for a element in HTML
The W3C HTML WG and the WHATWG are currently discussing the introduction of a
The
I am supportive of the introduction of a
Main use case: accessibility
In my opinion, the main use case for the introduction of
Like any other users, when blind users want to perceive a Web page/application, they need to have a quick means of grasping the content of a page. Since they cannot visually scan the layout and thus determine where the main content is, they use accessibility technology (AT) to find what is known as “landmarks”.
“Landmarks” tell the user what semantic content is on a page: a header (such as a banner), a search box, a navigation menu, some asides (also called complementary content), a footer, … and the most important part: the main content of the page. It is this main content that a blind user most often wants to skip to directly.
In the days of HTML4, a hidden “skip to content” link at the beginning of the Web page was used as a means to help blind users access the main content.
In the days of ARIA, the aria @role=main enables authors to avoid a hidden link and instead mark the element where the main content begins to allow direct access to the main content. This attribute is supported by AT - in particular screen readers - by making it part of the landmarks that AT can directly skip to.
Both the hidden link and the ARIA @role=main approaches are, however, band aids: they are being used by those of us that make “finished” Web pages accessible by adding specific extra markup.
A world where ARIA is not necessary and where accessibility developers would be out of a job because the normal markup that everyone writes already creates accessible Web sites/applications would be much preferable over the current world of band-aids.
Therefore, to me, the primary use case for a
An immediate effect would be that pages that have a
Other use cases
The
Comments
steve faulkner Hi Silvia, I don't agree with your statement: "Thus, the ease of styling a element is only a positive side effect and not actually a real use case." what we know is that around 40% of pages have (usually) a div with an id value that identifies it as the main content area of a page. Developers do this fora reason and most of the time its not for accessibility reasons, but as a styling hook. I went and looked at some pages in the data set I used and found the #id value that indcated the main content area was often used in CSS style declarations.silvia @Steve There is a difference between a div with @id=main being used as the main styling area and one being used as the main content area. The latter is the concept that is of more interest. It is more useful from an accessibility POV and should not include for example menus. However, even if Web developers get this wrong, the result is not disastrous - at worst the blind person lands just "almost" near the main content, instead of directly there.
steve faulkner @Silvia, sure I am not saying it is a reason to add main, but when asked about uses cases for elements like nav and header, hixie throws up styling as one of them and lack of usefulness for styling has been cited as a reason that main may fail, which I don't think is correct.silvia @Steve My article above is focused around reasons to add main. I did say that it is useful for styling. So it seems we agree.Roy I don't know Hixie's reasons for objecting to main, but I think that Hixie probably has a lot of experience with the kind of things that cause confusion among spec users and (main) seems like a prime candidate, much as article and section are causing confusion currently. Unfortunately, confusion with -what- exactly should be / will be main content will probably have more broad reaching effects on it's utility than the more scoped article and section. I'm also sad to see the element's potential to cement the very static and unimaginative interpretation of web pages in terms of news paper articles, at a time when web apps, canvas, and load-everything javascript are moving us into areas beyond such static fare for the web.Roy Err, just to clarify what I mean by effects on it's utility, I could easily see developers using main as a wrapper for all content in the body, or all non-header, non-aside content, and a variety of other approaches, and main failing to have consistency. Even in cases where main content is used to bring the core content to the fore and all else to the background, that core content may encompass so much raw html and content that the utility of jumping to main or highlighting main may be minimal. Hopefully that doesn't happen, but those are the kind of problems that I would be looking out for as a spec editor.silvia @Roy All we are after is to make blind users' lives easier. Maybe read http://blog.silktide.com/2013/01/things-learned-pretending-to-be-blind-for-a-week/ to understand the problems better.