问题
A quick question, if I'm using within my markups 'main' am I still obligated to use 'role' attribute?
For example, should I use:
<main>
or
<main role="main">
?
回答1:
The main element has the main role by default.
You are allowed to explicitly set the role
attribute with this value, but it’s not recommended:
In the majority of cases setting an ARIA
role
and/oraria-*
attribute that matches the default implicit ARIA semantics is unnecessary and not recommended as these properties are already set by the browser.
However, user agents that don’t support HTML5 (but WAI-ARIA) might benefit from this attribute.
来源:https://stackoverflow.com/questions/24540862/html5-tags-and-wai-aria