什么是适合地图元素的 WAI-ARIA 角色属性 [英] What is a suitable WAI-ARIA role attribute for a map element

查看:49
本文介绍了什么是适合地图元素的 WAI-ARIA 角色属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网页中,我有一半是使用 Google 地图的地图显示.我应该向显示地图的 canvas 元素添加什么 aria-role?我查看了 WAI-ARIA 文档 以了解可能的角色定义和最接近的我发现是 widget.

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.

页面上地图的合适aria-role是什么?

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

推荐答案

如果你使用谷歌地图,你应该使用 role="application" 因为可以使用屏幕阅读器进行交互使用地图并根据 ARIA 规范站点,应用程序角色用于:

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/#申请

这篇关于什么是适合地图元素的 WAI-ARIA 角色属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆