android - 使用对讲时通过滑动在标题之间导航

标签 android screen-readers talkback accessibility

Android 9 引入了 accessibilityHeading标签,可由对讲使用以宣布标题。

https://developer.android.com/about/versions/pie/android-9.0#a11y

寻找Heading-based navigation

在我的应用程序中,我的 Activity 中有多个带有一些标题的 TextView

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:accessibilityHeading="true"
            android:text="Accessibility Heading 1"
            android:textColor="#000000"
            android:textSize="18sp" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="20dp"
            android:text="Message"
            android:textColor="#000000" />

但是当我运行该应用程序时,标题仅被视为普通 TextView ,Talkback 没有给予任何特殊处理。 .

我可以向左滑动来浏览所有元素。 可以选择向上滑动以更改对讲公告的模式。例如 Default , Links , Controls , Headings

选择时Headings ,我希望对讲仅宣布标题并从一个标题跳到另一个标题,但即使在 Swipe Left 之后它仍保持在同一位置或 Swipe Right手势。

最佳答案

同时将 accessibilityHeadingfocusableInTouchMode 设置为 true。然后,将导航模式设置为 Headers(您可以通过 up down 手势),滑动 updown 通过 header 导航您。 向右向左滑动仍可让您浏览单个项目。

关于android - 使用对讲时通过滑动在标题之间导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52642769/

相关文章:

Java Swing JEditorPane 和屏幕阅读器

automation - 使用 NVDA 屏幕阅读器自动进行辅助功能测试

accessibility - 用于在 JAWS 中进行开发的文本控制台?

android - 嵌套的 RecyclerView;内心的 child 偷走了焦点

android - 在没有互联网连接的情况下使用 WiFi

java - 有什么好的安卓开发ORM工具吗?

android - 如何从android中的asp页面获取VIEWSTATE和EVENTVALIDATION值

Android NDK -multlib 支持使用 gradle

android - 当对讲中的句子中有句号时,是否应该读取 "dot"

android - Exoplayer 搜索栏不适用于方向键