什么是地图元素的合适WAI-ARIA角色属性 [英] What is a suitable WAI-ARIA role attribute for a map element
问题描述
在我的网页中,我有一半是使用Google地图的地图显示。我应该在显示地图的 canvas
元素中添加什么 aria-role
?我查看了 WAI-ARIA文档了解可能的角色定义和最接近的角色我发现是 widget
。
什么是合适的 aria-role
用于页面上的地图?
如果使用的是Google地图,则应使用 role = application
,因为可以使用屏幕阅读器与地图进行交互,并且根据ARIA规范网站,应用程序角色是:
一种结构,包含一个或多个需要用户
输入的可聚焦元素,例如键盘或手势事件,但不遵循由
支持的标准交互模式
对于非盲但视力低下并能从地图中真正受益的用户而言,尤其如此。 / p>
https://www.w3.org/TR/wai-aria/#application
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?
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
这篇关于什么是地图元素的合适WAI-ARIA角色属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!