[英]how can ensure that a Python qt application is screen readable on all operating systems
I am developing a text with Python and Qt that can be used by blind and visually impaired people.我正在开发一个带有 Python 和 ZE8801102A40AD89DDCFDCAEBF008D25Z 的文本,可供盲人和视障人士使用。 The text editor should be suitable for screen readers.
文本编辑器应该适合屏幕阅读器。 I do tests with the screen readers NVDA (Windows) and Orca (Ubuntu).
我使用屏幕阅读器 NVDA (Windows) 和 Orca (Ubuntu) 进行测试。
Texts for screen readers should actually be saved in the "AccessibleDescription" property.屏幕阅读器的文本实际上应该保存在“AccessibleDescription”属性中。 The NVDA screen reader does not read the "AccessibleDescription" property.
NVDA 屏幕阅读器不会读取“AccessibleDescription”属性。 AccessibleName property only.
仅限 AccessibleName 属性。 The Orca screen reader reads the "AccessibleDescription" property.
Orca 屏幕阅读器读取“AccessibleDescription”属性。
Question: What can I do so that my application is screen-readable on all operating systems?问题:我可以怎样做才能使我的应用程序在所有操作系统上都是屏幕可读的?
Sadly, there's probably no magic solution here.可悲的是,这里可能没有神奇的解决方案。 The only reasonnable answer is just trying and testing a maximum of different combinations of OS, screen readers, GUI toolkits and components, as much as you can.
唯一合理的答案就是尽可能多地尝试和测试操作系统、屏幕阅读器、GUI 工具包和组件的不同组合。 That's the only way to discover what works well for your particular scope, and what doesn't.
这是发现什么对您的特定 scope 有效,什么无效的唯一方法。 There is no uniformity at all between OS, screen readers and GUI toolkits, and probably no combination working everywhere in all cases.
操作系统、屏幕阅读器和 GUI 工具包之间根本没有统一性,而且可能没有任何组合在所有情况下都适用。
This isn't a peasure to give this answer but in fact, if you want to make sure your app is 100% screen reader accessible, your only way is basicly to stop using GUI toolkits and exclusively use the native components offered by the OS for which accessibility is well documented;给出这个答案并不是一件容易的事,但事实上,如果您想确保您的应用程序可以 100% 访问屏幕阅读器,您唯一的方法基本上是停止使用 GUI 工具包并专门使用操作系统提供的本机组件哪些可访问性有据可查; and therefore of course develop as many different apps as OS you intent to support.
因此,当然可以开发与您打算支持的操作系统一样多的不同应用程序。 As soon as you are using a GUI toolkit, you are adding a layer, and may lose some accessibility (and often more than less) in the process.
一旦您使用 GUI 工具包,您就添加了一个层,并且在此过程中可能会失去一些可访问性(而且通常多于少)。
The gap between the features offered by the native OS components and those proposed in the toolkit is often closed by emulation, and some of the emulations aren't made accessible, or simply can't be made accessible for various (more or less excusable) reasons.本机操作系统组件提供的功能与工具包中提出的功能之间的差距通常通过仿真来弥补,并且某些仿真无法访问,或者根本无法使各种(或多或少可以原谅)原因。 That's why some components are accessible while some others aren't;
这就是为什么有些组件可以访问而有些则不能访问的原因。 why a given component can be accessible under one OS but not at all under another;
为什么一个给定的组件可以在一个操作系统下访问,但在另一个操作系统下根本不能访问; and why a component can be accessible in version N of the toolkit but not the same component in version N+1.
以及为什么一个组件可以在工具包的版本 N 中访问,但在版本 N+1 中不能访问相同的组件。 In short, you have understood, accessibility is extremely fragile.
简而言之,您已经了解,可访问性是极其脆弱的。
Sadly, GUI toolkits rarely well document accessibility of their components under the different OS they support.遗憾的是,GUI 工具包很少能很好地记录其组件在它们支持的不同操作系统下的可访问性。 That's really a shame.
这真是一种耻辱。 It has to be addressed.
它必须得到解决。 Additionally, accessibility is often presented as being expert compicated features.
此外,可访问性通常表现为专家级的复杂功能。 It shouldn't be so.
不应该这样。 It should be easy for app developers to make accessible apps.
应用程序开发人员应该很容易制作可访问的应用程序。
So, wwell, since there is often no documentation about accessibility, your only way is to try and test.所以,好吧,因为通常没有关于可访问性的文档,你唯一的方法就是尝试和测试。 That's a lot of work, and there is no alternative.
工作量很大,而且别无选择。 Try and test.
尝试和测试。 That's all.
就这样。
There's generally two foundamental ways to design a GUI toolkit, and depending on which has been chosen, this has a dramatic impact on natural accessibility, and what kind of accessibility the toolkit can hope to achieve.通常有两种设计 GUI 工具包的基本方法,根据选择的方式,这会对自然可访问性以及工具包希望实现的可访问性产生巨大影响。
As the vaste majority of GUI toolkits I know of, QT is part of the first group, but isn't playing that bad in accessibility (at least under windows) if the app developer is also aware of accessibility.作为我所知道的绝大多数 GUI 工具包,QT 是第一组的一部分,但如果应用程序开发人员也意识到可访问性,那么在可访问性方面(至少在 Windows 下)并没有那么糟糕。 In the second group, you have WXWidgets for example.
在第二组中,例如,您有 WXWidgets。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.