问题描述
如果定义内容主要部分的最具语义和可访问性的方式是标准< main>
元素,则使用ARIA地标似乎是多余的。是否真的需要将 role =main
添加到元素中?
It seems redundant to use an ARIA landmark if the most semantic and accessible way to define the main section of your content is the standard <main>
element. Is adding role="main"
to the element really necessary?
推荐答案
并非所有现代浏览器都已将aria-role main
映射到< main>
元素(目前为止) Firefox 21+和Chrome 26+已映射它)。当所有浏览器都支持此功能时,属性 role =main
可能会被删除,但同时最好继续使用它。
Not all modern browsers have already mapped the aria-role main
to the <main>
element (so far only Firefox 21+ and Chrome 26+ have mapped it). When all browser will support this feature, then the attribute role="main"
could be dropped, but in the meanwhile it's better to still use it.
资料来源:
(和Steve Faulkner的回答)
(最后引用和回答)
http://html5doctor.com/the-main-element/#comment-35495 (and Steve Faulkner's answer)http://html5doctor.com/the-main-element/#comment-36407 (last citation and answer)
这篇关于是role =" main"必要的< main>元件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!