main element is only needed if there is repeated preliminary content in a document
that a user needs to bypass to get to the primary content.
mainelement to encapsulate the primary content [WCAG 1.3.1]
main element is used to identify the primary content of a web page. It was
introduced in HTML5 and provides a solution to the older practice of placing "skip to content"
links at the top of pages so that users of assistive technologies could bypass any periphery
repeated content (e.g., site headers, navigation, ads).
main element is treated by assistive technologies as a
landmark, so users are able to jump directly to the element when
it is present. It is equivalent to the ARIA
The need for bypass links in digital publications is not nearly as common as it is on the web generally, however. As publications are not wrapped inside of web page site trappings, there are not many publications that can benefit from identifying the start of the primary content. Fixed layout publications might include repeated page headers, might be one example, but even those are rare.
Care should be taken not to use the
main element to bypass important content just
because it precedes the primary narrative. In a textbook, for example, the chapter header,
mini table of contents, learning objects and similar content may occur before the text of the
chapter, but none of these are repeated content. They are unique to each chapter. Placing them
main element may cause users to miss them.
Note that the HTML
body element can only have one
main element without
hidden attribute specified on it. It is also not possible for sectioning content
aside to have their own
It is not necessary to provide a label for the
main element when there is only one
instance, but one can be provided using either the
aria-labelledby attributes when there are multiple.