Windows 的 Accessibility Insights 中的 ControlType 是什么?它如何映射到 HTML 元素?
What is the ControlType in Accessibility Insights for Windows and how does it map to HTML elements?
Windows 的 Accessibility Insights 显示以下 属性:
ControlType Group(50026)
当我将鼠标悬停在作为 <input />
html 标记的搜索框上时。
我用了 Google Chrome Version 80.0.3987.87 (Official Build) (64-bit)
.
AI4W如何判断html标签的控制类型?
accessibility insights doc says the control type is a concept from the Microsoft UI automation accessibility framework. You can look up the 50026
id for Group
on this reference page.
我还不清楚 AI4W 是如何确定确切的控制类型的。我怀疑 Chrome 实现了 Client-Side (Proxy) UI Automation Provider 但我不确定。如果是,实现如何推断控件类型?
相关问题:
- How to know the ControlType of a UI Element from CurrentControlType property
- Does Microsoft UI Automation Framework work with Chrome, Python and Java Apps?
如本Chrome accessibility page, Chrome exposes HTML and ARIA control types/roles through an accessibility API called IAccessible2所述。
自 Windows 10.0.1903 起,Windows 将 IAccessible2 转换为 UIA。我找不到任何专门描述 IAccessible 和 IAccessible2 角色到 UIA 控件类型的映射的文档,但它可能非常接近 the mapping recommended by the W3C.
Accessibility Insights 在 Windows 将 IAccessible2 数据转换为 UIA 后显示 UIA 控件类型。
添加到:
确定浏览器使用的确切辅助功能提供程序:
- 开始 Windows 的辅助功能洞察。
- Select
live inspect
并指向感兴趣的元素。
- 将工具设置为始终显示以下属性:
FrameworkId
和 ProviderDescription
(使用包含 Properties
table 的窗格右上角的齿轮)。
- 观察数值。
例如,这个:
FrameworkId: Chrome
ProviderDescription: [pid:33748,providerId:0x0 Main(parent link):Microsoft: MSAA Proxy (IAccessible2) (unmanaged:UIAutomationCore.DLL)]
表示 UIA 正在将 Chrome 公开的数据转换为其格式 IAccessible2
,如 UI Automation: An Incomplete Guide for UI builders – Part 1 中所述。即使使用相同的浏览器,也有更多可能的 UIA 提供程序 。了解正确的 UIA 提供程序对于导致 UIA 层次结构问题的根源是必需的。有关详细信息,请参阅链接文章。
此外,accessibility APIs links to UI Automation for W3C Accessible Rich Internet Applications Specification which explains specified ControlTypes
for given ARIA roles, which are defined in this spec (v1.1) 上的 HTML Accessibility API Mappings 1.0
规范部分。
一篇为本次讨论提供额外背景的好文章:https://sarahmhigley.com/writing/roles-and-relationships/
Windows 的 Accessibility Insights 显示以下 属性:
ControlType Group(50026)
当我将鼠标悬停在作为 <input />
html 标记的搜索框上时。
我用了 Google Chrome Version 80.0.3987.87 (Official Build) (64-bit)
.
AI4W如何判断html标签的控制类型?
accessibility insights doc says the control type is a concept from the Microsoft UI automation accessibility framework. You can look up the 50026
id for Group
on this reference page.
我还不清楚 AI4W 是如何确定确切的控制类型的。我怀疑 Chrome 实现了 Client-Side (Proxy) UI Automation Provider 但我不确定。如果是,实现如何推断控件类型?
相关问题:
- How to know the ControlType of a UI Element from CurrentControlType property
- Does Microsoft UI Automation Framework work with Chrome, Python and Java Apps?
如本Chrome accessibility page, Chrome exposes HTML and ARIA control types/roles through an accessibility API called IAccessible2所述。
自 Windows 10.0.1903 起,Windows 将 IAccessible2 转换为 UIA。我找不到任何专门描述 IAccessible 和 IAccessible2 角色到 UIA 控件类型的映射的文档,但它可能非常接近 the mapping recommended by the W3C.
Accessibility Insights 在 Windows 将 IAccessible2 数据转换为 UIA 后显示 UIA 控件类型。
添加到
确定浏览器使用的确切辅助功能提供程序:
- 开始 Windows 的辅助功能洞察。
- Select
live inspect
并指向感兴趣的元素。 - 将工具设置为始终显示以下属性:
FrameworkId
和ProviderDescription
(使用包含Properties
table 的窗格右上角的齿轮)。 - 观察数值。
例如,这个:
FrameworkId: Chrome
ProviderDescription: [pid:33748,providerId:0x0 Main(parent link):Microsoft: MSAA Proxy (IAccessible2) (unmanaged:UIAutomationCore.DLL)]
表示 UIA 正在将 Chrome 公开的数据转换为其格式 IAccessible2
,如 UI Automation: An Incomplete Guide for UI builders – Part 1 中所述。即使使用相同的浏览器,也有更多可能的 UIA 提供程序 。了解正确的 UIA 提供程序对于导致 UIA 层次结构问题的根源是必需的。有关详细信息,请参阅链接文章。
此外,accessibility APIs links to UI Automation for W3C Accessible Rich Internet Applications Specification which explains specified ControlTypes
for given ARIA roles, which are defined in this spec (v1.1) 上的 HTML Accessibility API Mappings 1.0
规范部分。
一篇为本次讨论提供额外背景的好文章:https://sarahmhigley.com/writing/roles-and-relationships/