我仍然在一些人的工作中看到角色属性。我也在使用它,但不确定它的效果。
例如:
<header id="header" role="banner">
Header stuff in here
</header>
或者:
<section id="facebook" role="contentinfo">
Facebook stuff in here
</section>
或者:
<section id="main" role="main">
Main content stuff in here
</section>
这个 role 属性是必要的吗?
这个属性对语义更好吗?
它能改善 SEO 吗?