When the HTML main element was created, it was intended to represent the single chunk of content that made up the main content area of the page. This definition was disputed for a long time, so in an effort to have some user data to feed into the discussion, we ran a short survey to find out what screen reader users expect in terms of the main element.
The survey focused on screen reader users because they benefit from the semantics of the HTML main
element. The element maps to the main landmark role, which means that screen reader users can navigate to it (using a keyboard shortcut), and identify it as the main content area once they get there.
We asked two questions:
- When you navigate by landmarks, do you expect more than one main landmark on a page?
- When you find a main landmark, do you look for additional main landmarks on the page?
The survey was open between 5 and 12 January 2018, and 238 people completed it during that time.
161 people (68%) said they only expected one main landmark on a page. 163 people (68.5%) said that if they found a main landmark, they did not continue looking for others on the page. This suggests that a reasonable majority of screen reader users agree with the HTML specification, and are also confident that authors are following standards.
The fact that 77 people (32%) expected more than one main landmark was interesting. The survey didn’t investigate the reasons why, but implementation data gathered at the time of the survey suggests that experience isn’t a candidate. From a sample of about 1.5 million pages, just 1,500 (0.1%) had multiple main
elements (compared to about 225,000 (15%) with one main element). This suggests that a considerable majority of authors also agree with the way the main
element is defined in the HTML specification, and that screen reader users’ confidence is well placed.
The dispute has since been resolved, and the WHATWG HTML standard now aligns with the original definition of the main element in the W3C HTML specification.
Note: Source image by R-E-AL, modified and used under CC BY-SA 3.0.