android辅助功能_3个适用于Android的辅助功能测试工具

news/2024/10/19 6:25:26/

android辅助功能

The Web Accessibility Content Guidelines (WCAG) 2.1 recommendations explain the success criteria for making web and mobile apps accessible to people with disabilities. The guidelines are pretty straightforward, but can be difficult to eyeball, as they make very specific requirements about the visual qualities of text and other on-screen elements. As someone without any recognized disabilities, I find it difficult to spot potential problems on my own, so it’s helpful to use tools to point out where they occur.

《 Web无障碍内容指南》(WCAG)2.1的建议解释了使残疾人能够访问Web和移动应用程序的成功标准。 这些准则非常简单明了,但由于它们对文本和其他屏幕元素的视觉质量有非常特定的要求,因此可能很难引起注意。 作为没有公认的残疾的人,我发现自己很难发现潜在的问题,因此使用工具指出发生问题的位置会很有帮助。

If you don’t know if your app is WCAG compliant, it probably isn’t. Here are three tools that help you get there. Note that these tools do not certify an app for WCAG compliance — they merely help spot certain issues that are possible to assess using Android APIs.

如果您不知道您的应用是否符合WCAG,则可能不符合。 这里有三个工具可以帮助您实现目标。 请注意,这些工具并不对应用程序进行WCAG合规性认证-它们只是帮助发现某些可能使用Android API进行评估的问题。

  • Google — Accessibility Scanner (Play Store)

    Google —辅助功能扫描器 ( Play商店 )

  • Deque Systems — Accessibility Engine (axe) for Android (Play Store, web)

    Deque Systems —适用于Android的辅助功能引擎(axe) ( Play商店 , 网络 )

  • Microsoft — Accessibility Insights for Android Service (web, GitHub)

    Microsoft-Android服务的可访问性见解 ( web , GitHub )

These tools require only an installed APK to test on. There are other tools that take a more programmatic approach to testing during development (such as Espresso’s accessibility checking), but I won’t cover those here.

这些工具仅需安装APK即可进行测试。 还有一些其他工具在开发过程中采用了更具编程性的方法进行测试(例如Espresso的可访问性检查 ),但在此不做介绍。

The tools provided by Google and Deque are very similar in that they are both provided as Android apps available as Google Play store downloads. They are easy for anyone to use, even without Android development experience.

GoogleDeque提供的工具非常相似,因为它们都是作为Android应用提供的,可通过Google Play商店下载获得。 即使没有Android开发经验,任何人都可以轻松使用它们。

The Microsoft tool is primarily operated as a desktop app (not an Android app like the other two), and requires Android development tools to use. If you are not comfortable with Android app development tools, I would skip it entirely, as it won’t be easy to set up and use.

Microsoft工具主要作为桌面应用程序运行(与其他两个应用程序不同,不是Android应用程序),并且需要使用Android开发工具。 如果您对Android应用程序开发工具不满意,我会完全跳过它,因为它不容易设置和使用。

One important note about all of these tools: they make use of the Android Accessibility Service APIs, which require rather intrusive permissions. In order to operate, they will ask you for permissions to read your screen and keyboard input like this:

关于所有这些工具的重要说明 :它们使用了Android Accessibility Service API,这些API 需要相当大的权限 。 为了进行操作,他们将要求您授予读取屏幕和键盘输入的权限,如下所示:

Granting this type of permission to a malicious or broken app can lead to security issues, so I strongly recommend using these types of accessibility tools only on emulators or devices dedicated for development. If you don’t trust any of these tools and their developers explicitly, simply do not use them at all.

向恶意或损坏的应用程序授予此类权限可能会导致安全问题,因此,我强烈建议仅在仿真器或专用于开发的设备上使用这些类型的可访问性工具。 如果您不明确信任这些工具及其开发者,则根本不要使用它们。

Google的辅助功能扫描器与Deque的辅助功能引擎 (Google’s Accessibility Scanner vs. Deque’s Accessibility Engine)

Since Google’s and Deque’s tools are both operated the same way, I’ll compare them with each other. When active, they will each provide a floating, movable button on screen, visible all the time. Pressing this button will activate the tool on the current screen, providing some diagnostics.

由于Google和Deque的工具都以相同的方式操作,因此,我将它们进行比较。 激活后,它们将在屏幕上始终提供一个浮动的可移动按钮。 按下此按钮将激活当前屏幕上的工具,并提供一些诊断信息。

Deque’s app provides a few of its own sample screens that are intentionally populated with some WCAG accessibility violations that will trigger its rules for demonstration purposes. After enabling the scanner, it shows a menu

Deque的应用程序提供了一些自己的示例屏幕,这些屏幕故意填充了一些WCAG可访问性冲突,这些冲突会触发其规则进行演示。 启用扫描仪后,它会显示一个菜单

Screenshot of the Deque app menu

色彩对比 (Color contrast)

Deque will dutifully spot the accessibility violation that it staged on its own screen:

Deque将尽职尽责地在自己的屏幕上发现其上发生的可访问性冲突:

Screenshot of Deque’s app finding a contrast violation

It’s kind of difficult to see, based on the way it’s highlighting the element, but it’s saying that the text “Color Contrast example” doesn’t have enough contrast, according to the WCAG. Now I’ll run Google’s tool on the same screen:

根据WCAG突出显示元素的方式,这有点很难看,但是它表示文本“ Color Contrast example”没有足够的对比度。 现在,我将在同一屏幕上运行Google的工具:

Screenshot of Google finding contrast violations

It’s interesting to note that Google found 5 violations on 4 UI elements.

有趣的是,Google在4个UI元素上发现了5个违规行为。

Deque considers the second instance of “Color Contrast example” to be “incomplete”. But, by default, Google flags them both equally if they’re measured with a contrast ratio anywhere below 4.5:1. This threshold can be configured in the app’s settings.

Deque认为“色彩对比示例”的第二个实例是“不完整的”。 但是,默认情况下,如果使用低于4.5:1的对比度进行测量,则Google会均等地标记它们。 可以在应用程序的设置中配置此阈值。

Google flags the red text “Critical” also as a contrast violation. If you click the element, you’ll get a more detailed analysis:

Google还将红色文本“ Critical”标记为违反对比度。 如果单击该元素,将获得更详细的分析:

Screenshot of more details about a contrast violation

To me, this is much more helpful information than Deque provides. It gives the computed contrast ratio, as well as the specific colors it found in the view that it used to make the computation. It also provides a “Learn more” link with every violation so you can read very detailed information about why this is a problem, and what you can do to fix it. It even provides a link to a contrast ratio calculator so you can experiment easily:

对我来说,这比Deque提供的信息有用得多。 它给出了计算的对比度,以及在视图中用于计算的特定颜色。 它还为每个违规提供了“了解更多”链接,因此您可以阅读有关此问题原因以及如何解决此问题的非常详细的信息。 它甚至提供了一个对比度计算器的链接,因此您可以轻松进行实验:

Screenshot of contrast-ratio.com

Also on that screen, Google flagged the text “Reason it’s an issue” because it’s identical to another label below it on the same screen:

同样在该屏幕上,Google标记了文本“原因是问题”,因为该文本与同一屏幕上其下方的另一个标签相同:

Screenshot of a labeling violation

A possible solution here would be to number or otherwise label the items on the screen so a screen reader could more effectively announce them uniquely.

此处可能的解决方案是对屏幕上的项目进行编号或标记,以便屏幕阅读器可以更有效地唯一声明它们。

主动观看 (Active views)

On Deque’s Active Views test screen, it spots the staged violation of a button that doesn’t have a text label:

在Deque的Active Views测试屏幕上,发现分阶段违反了没有文本标签的按钮:

Screenshot of an active view without text violation

Google finds this as well:

Google也发现了这一点:

Screenshot of an active view without text violation

Again, clicking through to “Learn more” will give you some steps to take to understand and fix the issue.

同样,单击“了解更多信息”将为您提供一些步骤来理解和解决此问题。

其他特性 (Other features)

Both Google’s Accessibility Scanner and Deque’s Accessibility Engine have the ability to share results to other apps using Android’s sharing mechanism. But what really stands out about Google’s tool is the ability to record a session and spot accessibility problems the entire time. It also logs a history of violations so you can return to them at any time after recording.

Google的辅助功能扫描器和Deque的辅助功能引擎都可以使用Android的共享机制与其他应用共享结果。 但是,真正使Google工具脱颖而出的是能够记录会话并在整个过程中发现可访问性问题。 它还记录了违规记录,因此您可以在录制后随时返回。

All this considered, Google has the more polished and useful tool. However, Deque provides its ruleset engine as an open source library. My sense is that the app is mostly provided as a showcase for this rules engine. In fact, Microsoft’s Accessibility Insights for Android Service uses exactly this library.

考虑到所有这些,Google拥有更加完善和有用的工具。 但是,Deque将其规则集引擎作为开源库提供 。 我的感觉是,该应用主要是作为此规则引擎的展示而提供的。 实际上,Microsoft的Android服务的Accessibility Insights正是使用此库。

微软的辅助功能见解 (Microsoft’s Accessibility Insights)

Microsoft’s tool is not much like Google’s and Deque’s. It’s implemented as a desktop application, and requires installation of a headless service that you install on the Android device. The app connects to the device over an adb connection, and uses that to pull down accessibility data.

微软的工具与Google和Deque的工具不太相似。 它被实现为桌面应用程序,并且需要安装您在Android设备上安装的无头服务。 该应用程序通过adb连接连接到设备,并使用该应用程序下拉辅助功能数据。

The big downside to this scheme is that you must have Android development tools installed, and be able to work them from the command line. You also need to be able to configure both the computer and device for Android development. If you don’t already know how to do these things, you’re probably in for a bit of a slog to get it all to work. But once you’re comfortable with all that, the desktop app is relatively easy to use. It will scan a screen and show you details about violations, as well as some help to fix them.

这种方案的最大缺点是您必须安装Android开发工具,并且能够从命令行使用它们。 您还需要能够为Android开发配置计算机和设备。 如果您还不知道如何做这些事情,那么可能需要花些时间才能使所有工作正常进行。 但是,一旦您对所有这些都感到满意,则桌面应用程序就相对易于使用。 它将扫描屏幕,并向您显示有关违规的详细信息,以及一些有助于解决它们的帮助。

Screenshot of Microsoft’s accessibility tool

Since it’s using the same rules engine as Deque, it will find the exact same violations. What Microsoft’s tool adds, however, is some conveniences around reporting the violations using tools you might already know. Using the overflow menu at the bottom right of an issue, you can quickly file an issue on GitHub or Azure Boards. It essentially pre-populates the issue form with details. You can also export the data as HTML. What’s really disappointing here is that it doesn’t give you direct access to the screenshot it took, so the report itself is not very easy to work from. You would have to take a screenshot of the app window (as I did above) and get the screenshot out of there, and manually attach it to the issue.

由于它使用与Deque相同的规则引擎,因此它将发现完全相同的违规行为。 但是,Microsoft的工具增加了一些便利,可以使用您可能已经知道的工具来报告违规情况。 使用问题右下方的溢出菜单,可以快速在GitHub或Azure板上提交问题。 它实质上是使用详细信息预先填充问题表格。 您也可以将数据导出为HTML。 真正令人失望的是,它不能直接访问所拍摄的屏幕截图,因此报表本身并不是很容易使用。 您将需要截取应用程序窗口的屏幕截图(就像我在上面所做的那样),然后从屏幕截图中取出,然后手动将其附加到问题上。

你更喜欢哪个? (Which would you prefer?)

I suggest trying all three to find out which one works best for you. If you’re not an Android developer, I would skip the Microsoft tool entirely, as it has a lengthy and complicated setup, and it finds the same issues as Deque’s tool. Google’s app is easy to use, works smoothly, and offers very helpful advice for understanding and fixing accessibility issues.

我建议尝试全部三个,以找出最适合您的一个。 如果您不是Android开发人员,那么我将完全跳过Microsoft工具,因为它的安装过程冗长且复杂,并且会发现与Deque工具相同的问题。 Google的应用程序易于使用,运行顺畅,并为理解和修复可访问性问题提供了非常有用的建议。

翻译自: https://medium.com/mesmerhq/3-accessibility-testing-tools-for-android-15506d67206e

android辅助功能


http://www.ppmy.cn/news/901080.html

相关文章

Metasploit(MSF)基础超级详细版

MSF基础学习看这一篇就够了 Metasploit常见名词解释MSF简介MSF框架结构MSF配置数据库内网主机发现MSF命令查询常用命令数据库管理命令核心命令模块命令进程命令资源脚本命令后台数据库命令后端凭证命令开发者命令攻击载荷命令 MSF模块MSF辅助扫描模块 - auxiliaryMSF主机发现 M…

编程常用英语

1.Public [pʌblik] 公开 2.Static [sttik] 静态 3.void [vɔid] 无返回 4.main [main] 主要的,主方法 5.class [class] 类 6.system [sistəm] 系统 7.out [aut] 输出 8.print [print] 打印,输出 9.line [laɪn] 行号 10.problem [prɒbləm] 问题 11.O…

ADB的使用-简单命令

今天记录的是 Android Debug Bridge,安卓debug调试桥,它是一款测试/开发人员必不可少的利器。作为一名测试人员,今天主要了解它在测试中简单的应用命令。 ADB是一个C/S架构(默认端口号为:5037),…

Java基础测试题

第一章 Job1-1 1、【填空题】请列出Java程序的各种形态: 、、JSP/Servlet和JavaBean。(英文单词首字母应大写) 第一空: Application 第二空: Applet 2 【填空题】Sun公司于 1995 年正式对外公布Java语言。 3 【填空题】2007年11月,Google公司…

渗透测试面试题

转自HACK之道 乌雲安全 目录 渗透篇 前端篇 一、思路流程 二、问题 三、深信服一面 四、SQL注入防护 五、为什么参数化查询可以防止SQL注入 六、SQL头注入点 七、盲注是什么?怎么盲注? 八、宽字节注入产生原理以及根本原因 九、SQL如何写shell/单引被过…

2020渗透测试面试问题大全

转自HACK之道 乌雲安全 目录 渗透篇 前端篇 一、思路流程 二、问题 三、深信服一面 四、SQL注入防护 五、为什么参数化查询可以防止SQL注入 六、SQL头注入点 七、盲注是什么?怎么盲注? 八、宽字节注入产生原理以及根本原因 九、SQL如何写she…

几款Android 应用自动化测试工具

简述: 本文介绍几款流行的 Android应用自动化测试工具。 Monkey测试:随机测试,压力测试,运行在模拟器或实际设备中。 MonkeyRunner测试:操作简单,可录制测试脚本,可视化操作,主要生成…

Android 应用有哪些自动化测试工具

目录 简述: 1、Monkey 测试 2、 MonkeyRunner 测试 3、Robotium测试 4、Ronaorex测试 5、Appium测试 6、UI Automator 测试 7、TestBird 测试 简述: 本文介绍几款流行的 Android应用自动化测试工具。希望对你有帮助, Monkey测试&…