0

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">

?

Oskar Szura
  • 2,469
  • 5
  • 32
  • 42

1 Answers1

2

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/or aria-* 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.

unor
  • 92,415
  • 26
  • 211
  • 360
  • So *currently* I'd say it's *better* (doesn't hurt any, might help some) to implement the `role` attribute. – Volker E. Jul 17 '14 at 08:58