Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a suitable WAI-ARIA role attribute for a map element

In my webpage, I have half of it being a map display using Google maps. What aria-role should I add to that canvas element which is displaying the map? I have looked at WAI-ARIA docs for possible role definitions and the closest I found is widget.

What would be a suitable aria-role for a map on the page?

like image 513
Yangshun Tay Avatar asked Jun 23 '17 03:06

Yangshun Tay


People also ask

What is WAI-ARIA attribute?

WAI-ARIA (Web Accessibility Initiative - Accessible Rich Internet Applications) is a specification written by the W3C, defining a set of additional HTML attributes that can be applied to elements to provide additional semantics and improve accessibility wherever it is lacking.

What do landmark WAI-ARIA roles define?

The Accessible Rich Internet Applications (WAI-ARIA) specification defines a set of roles known as document landmarks. They can be used to programmatically identify key areas of content on a page, which means they can be interpreted by access technologies such as screen readers.

What are the three types of aria attributes?

ARIA States & PropertiesWidget attributes. Live region attributes. Drag-and-drop attributes.


1 Answers

If you are using google maps, you should use role="application" because it is possible to use a screen reader to interact with the map and according to the ARIA spec site the application role is for:

A structure containing one or more focusable elements requiring user input, such as keyboard or gesture events, that do not follow a standard interaction pattern supported by a widget role.

This is especially true for users who are not blind but have low vision and can actually benefit from the map.

https://www.w3.org/TR/wai-aria/#application

like image 105
Alexander Luna Avatar answered Oct 12 '22 00:10

Alexander Luna