HTML5 role Attribute

Seeing impaired individuals may use a screen reader application to convert a webpage's
text to sound. However AJAX applications can update a webpage without the user realizing
the content has changed and needs to be re-processed by the screen reader application.
The role attribute can be used to inform the accessibility application that the
webpage content has changed, and the nature of the change. They role attribute
adds semantic value (meaning) to html elements.

The role attribute is part of the Accessible Rich Internet Applications (ARIA)
specification. Shown below is code using the role attribute.

An example use of the role attribute might be using the role="navigation" value
to inform a screen reader application that the menu has changed, so the user might
want to re-examine it to identify the new selections. Some other useful values for
the role attribute are:

alert

A message with important information has appeared or changed.

article

A section of webpage content has changed.

banner

An area that contains site related rather than page specific content has changed.