Question

Is role recommended to use in my html5 markup or? And why should I use it if the answer is yes.

Thank you.

Was it helpful?

Solution

Roles are pragmas, designed to provide information directly to accessibility technologies, rather than using HTML5 semantics. In the cases where the same information can be conveyed by either via native HTML or via the role attribute, for example <nav> versus role='navigation', the native semantics should be used. This is generally the case for landmark roles. For other roles, using them can help users with disabilities get the most from your content, so they may benefit from it to the same extent as everyone else.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top