增强无障碍功能
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Maps SDK for Android 包含对无障碍功能的内置支持。本部分概要介绍了可为使用此 API 的任何应用自动启用的无障碍功能。
当用户在其移动设备上启用 TalkBack 无障碍功能时,在屏幕上的每一次滑动都会将焦点从一个界面元素移动到下一个界面元素。(单次滑动的替代方案是,通过在界面上拖动手指来探索界面元素。)当某个界面元素获得焦点时,TalkBack 会读出该元素的名称。如果用户在屏幕任意位置点按两次,系统将执行获得焦点的操作。
有关如何增强 Android 应用无障碍功能的指南,请参阅 Android 无障碍功能文档。需要特别指出的是,最好添加一份介绍地图的公告。如需指定公告的文本,请对视图调用 setContentDescription()
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-06-26。
[null,null,["最后更新时间 (UTC):2024-06-26。"],[[["\u003cp\u003eThe Maps SDK for Android has built-in accessibility features automatically enabled for applications using the API.\u003c/p\u003e\n"],["\u003cp\u003eTalkBack allows users to navigate the map interface by swiping or dragging a finger, announcing UI elements as they come into focus, and performing actions with a double-tap.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should consider adding a map description announcement using \u003ccode\u003esetContentDescription()\u003c/code\u003e for improved accessibility.\u003c/p\u003e\n"],["\u003cp\u003eFurther accessibility guidance can be found in the Android accessibility documentation.\u003c/p\u003e\n"]]],["The Maps SDK for Android offers built-in accessibility features. When TalkBack is enabled, single swipes or dragging moves focus between UI elements, with TalkBack announcing the focused element's name. A double-tap performs the action associated with the focused element. Developers can enhance accessibility by adding a map description via `setContentDescription()`, as per the Android accessibility documentation.\n"],null,["# Enhancing Accessibility\n\nWhen users enable the TalkBack accessibility feature on their mobile devices,\neach single swipe across the screen moves the focus from one UI element to the\nnext. (An alternative to single swiping is to explore UI elements by dragging a\nfinger over the interface.) As a UI element comes into focus, TalkBack reads out\nthe name of the element. If the user double-taps anywhere on the screen, the\nfocused action is performed.\n\nFor guidance on enhancing the accessibility of your Android app, refer to the\n[Android accessibility documentation](https://developer.android.com/guide/topics/ui/accessibility/). In particular, it's good\npractice to add an announcement describing the map. To specify the text of the\nannouncement, call [`setContentDescription()`](https://developer.android.com/reference/android/view/View.html#setContentDescription(java.lang.CharSequence)) on the view."]]