5
Thinking in terms of accessibility, described by WAI-ARIA, you need to define the element with the main content of the page with role="main"
, in order to improve the accessibility of the page for users who rely on assistive technologies.
For example:
<html>
...
<body>
...
<div role="main">
Conteúdo principal da página
</div>
...
</body>
</html>
However, HTML5 already defines an element main
.
My question is, if I replace the above code with this code below, will the assistive tools provide the same functionality? Semantically, <div role="main">
is equal to <main>
? That is, the <main>
has a role="main"
implicit?
<html>
...
<body>
...
<main>
Conteúdo principal da página
</main>
...
</body>
</html>