IAccessible、IAccessible2、UIAutomation 和 MSAA 之间有什么区别?

What is the difference between IAccessible, IAccessible2, UIAutomation and MSAA?

我正在着手研究可访问性,我对遇到的不同技术感到有点困惑。

IAccessible 和 IAccessible2 有什么区别?我原本以为IAccessible2可能是IAccessible的更新版本,但进一步研究看起来它实际上是由微软的竞争对手制作的。维基百科说 "It has been positioned as an alternative to Microsoft's new UI Automation API." MSAA 如何融入其中?

谁能澄清一下 IAccessible、IAccessible2、UI Automation API 和 MSAA 之间的区别?为什么一个可能比另一个更可取?

Microsoft Active Accessibility (MSAA) 是 Microsoft 的原始辅助功能 API; version 1 of MSAA was on add-on release for Windows 95. MSAA was limited with regard to the set of roles, names, values and states支持;这意味着可以将其可访问性元数据传递给辅助技术(例如屏幕阅读器)的图形组件集是有限的。

IAccessible 是 MSAA 的一部分:

The IAccessible interface is a collection of methods that expose the most common attributes and behaviors of a wide range of user interface (UI) elements. A UI element is a control, such as a menu or push button, that is part of the user interface. An accessible object is a UI element that has a meaningful IAccessible interface.

MSAA 的局限性拒绝了 IAccessible2 (originally at IBM), which was intended to fill the gaps in MSAA, such as "support text controls, tables, hyperlinks, and relations between accessible objects." It was harmonised with the Accessibility Toolkit (ATK) 在 Linux 上的开发(尤其是 Gnome)。 IAccessible2 是 MSAA 的补充,而不是替代品。

Microsoft UI Automation 是 Microsoft 自己的 MSAA 继任者。见 UI Automation and Active Accessibility:

Microsoft Active Accessibility is the legacy API that was introduced in Windows 95, and was designed to make Windows applications accessible. Microsoft UI Automation is the new accessibility model for Windows and is intended to address the needs of assistive technology products and automated testing tools. UI Automation offers many improvements over Microsoft Active Accessibility.

它为用户界面组件提供了一组更丰富的角色、状态和属性,可以与实现 API 的辅助技术进行通信。

这些较新的可访问性 API 至关重要的一个领域是对富 Internet 应用程序的可访问性支持。 W3C 的 WAI-ARIA 规范的开发人员审查了各种平台上存在的可访问性 API,并将可用的角色、状态和属性映射到他们在 WAI-ARIA 规范中提议的对应项。这涉及创建 mapping tables that can be found in the WAI-ARIA 1.0 User Implementation Guide. See also UI Automation for W3C Accessible Rich Internet Applications Specification in Microsoft's documentation. In Microsoft Edge, Microsoft transitioned from MSAA to UI Automation.