可访问性标准是否要求每个 html 页面都有一个主标签?

Do accessability standards require that every html page a main tag?

为了满足可访问性标准,每个页面都应该有一个 <main> 标签吗?我注意到各大网站有时会在其页面中使用 <main> 标记,有时则不会。是否有任何主要的可访问性标准规定或建议每个页面都应该有一个 <main> 标签?这似乎有道理,但我也不确定 not 的可访问性后果是什么。

是的,每个 html 页面 should/could 都有主标签。你一定认为这个标签,是一个展示主要信息的容器。这不是强制性标签,但在 IMO 看来这是一个很好的做法。

引用自 Mozilla 开发者网络:

The HTML <main> element represents the main content of the of a document or application. The main content area consists of content that is directly related to, or expands upon the central topic of a document or the central functionality of an application.

可以找到更多信息 here

希望对你有帮助