问题描述
在我的网页中,我有一半是使用Google地图的地图显示。我应该在显示地图的 canvas
元素中添加什么 aria-role
?我查看了了解可能的角色定义和最接近的角色我发现是 widget
。
什么是合适的 aria-role
用于页面上的地图?
如果使用的是Google地图,则应使用 role = application
,因为可以使用屏幕阅读器与地图进行交互,并且根据ARIA规范网站,应用程序角色是:
对于非盲但视力低下并能从地图中真正受益的用户而言,尤其如此。 / p>
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:
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角色属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!