{"id":261,"date":"2021-12-13T12:38:56","date_gmt":"2021-12-13T20:38:56","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/?p=261"},"modified":"2021-12-13T12:38:56","modified_gmt":"2021-12-13T20:38:56","slug":"accessibility-insights-for-windows","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/accessibility-insights-for-windows\/","title":{"rendered":"Accessibility Insights for Windows"},"content":{"rendered":"<p>You may have already read about the suite of open-source Accessibility Insights products <a href=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/shifting-accessibility-left-with-accessibility-insights\/\">in Mark Reay\u2019s post from August<\/a>. In this blog post, we are going to talk about one of tools in the suite: <a href=\"https:\/\/accessibilityinsights.io\/docs\/en\/windows\/overview\">Accessibility Insights for Windows<\/a>, which enables users to inspect and test Windows applications to find and fix accessibility issues. The tool draws inspiration from <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winauto\/testing-tools#legacy-testing-tools\">legacy Windows accessibility testing tools<\/a> from Microsoft, building on their features to offer additional automated and assisted testing functionality wrapped up in a modern user interface. Unlike many of these earlier tools, Accessibility Insights for Windows is built in .NET Framework using WPF and leverages <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winauto\/entry-uiauto-win32\">Microsoft\u2019s UI Automation framework<\/a>.<\/p>\n<p>Let\u2019s dive into the core functionality of Accessibility Insights for Windows.<\/p>\n<h3>Inspect Mode<\/h3>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/1.-Inspect.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-275\" src=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/1.-Inspect.jpg\" alt=\"A screenshot showing Accessibility Insights for Windows in inspect mode on one side and Wildlife Manager, an example application, on the other side. An edit control is highlighted on the app. Accessibility Insights for Windows is displaying the element's properties. Notably, the edit control does not have a name property.\" width=\"1601\" height=\"794\" srcset=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/1.-Inspect.jpg 1601w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/1.-Inspect-300x149.jpg 300w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/1.-Inspect-1024x508.jpg 1024w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/1.-Inspect-768x381.jpg 768w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/1.-Inspect-1536x762.jpg 1536w\" sizes=\"(max-width: 1601px) 100vw, 1601px\" \/><\/a><\/p>\n<p><em>Inspect mode in Accessibility Insights for Windows<\/em><\/p>\n<p>When you want to better understand what raw accessibility information will be available to assistive technologies, Accessibility Insights for Windows\u2019s <strong>Inspect <\/strong>mode is the way to go. As you select elements using the mouse or keyboard, Accessibility Insights for Windows exposes the element\u2019s position in the <strong><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winauto\/uiauto-treeoverview\">UI Automation tree<\/a><\/strong> alongside its <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winauto\/uiauto-propertiesoverview\">properties<\/a> and <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winauto\/uiauto-controlpatternsoverview\">patterns<\/a>. As an example, imagine a screen reader is narrating something unexpected for a particular button on your application. If you open Accessibility Insights for Windows in <strong>Inspect <\/strong>mode, you can quickly view what text is associated with that button\u2019s <strong>UI Automation<\/strong> element, as well as information about neighboring elements. Since this is the same information a screen reader has access to, the data can be vital to diagnose and fix your issue.<\/p>\n<h3>FastPass: Automated Checks and Tab Stops<\/h3>\n<p><a href=\"https:\/\/accessibilityinsights.io\/docs\/en\/windows\/getstarted\/fastpass\/\">FastPass<\/a> is a lightweight, two-step process that helps developers identify common, high-impact accessibility issues in less than five minutes (also found in our Web and Android products). In the first step, users run <strong><a href=\"https:\/\/accessibilityinsights.io\/docs\/en\/windows\/getstarted\/automatedchecks\/\">Automated Checks<\/a><\/strong>, a test that checks compliance with dozens of accessibility rules, highlights results on a screenshot of the tested application, provides information on how to fix the issue, and links to sample code for potential fixes. You can find these code examples and more <a href=\"https:\/\/docs.microsoft.com\/en-us\/accessibility-tools-docs\/\">on Microsoft\u2019s technical documentation website<\/a>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/2.-Automated-Checks.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-276\" src=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/2.-Automated-Checks.jpg\" alt=\"A screenshot showing Accessibility Insights for Windows in Automated Checks mode on one side and a screenshot of Wildlife Manager on the other side. There are 12 failures in automated checks, including &quot;A button must not support both the Invoke and Toggle patterns&quot;. There are highlights on the screenshot around the elements with failures.\" width=\"1642\" height=\"810\" srcset=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/2.-Automated-Checks.jpg 1642w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/2.-Automated-Checks-300x148.jpg 300w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/2.-Automated-Checks-1024x505.jpg 1024w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/2.-Automated-Checks-768x379.jpg 768w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/2.-Automated-Checks-1536x758.jpg 1536w\" sizes=\"(max-width: 1642px) 100vw, 1642px\" \/><\/a><\/p>\n<p><em>Automated checks<\/em><\/p>\n<p>To better understand a particular result, users can navigate to a snapshot of the <strong>Inspect<\/strong> view at the time of scanning to view relevant <strong>UI Automation<\/strong> properties and patterns.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/3.-Inspect-Results.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-277\" src=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/3.-Inspect-Results.jpg\" alt=\"A screenshot showing Accessibility Insights for Windows in inspect mode on one side and a screenshot of Wildlife Manager on the other side. One particular button is highlighted, and Accessibility Insights for Windows is displaying information about the rule failures and how to fix them.\" width=\"1599\" height=\"787\" \/><\/a><\/p>\n<p><em>Inspected rule results and how-to-fix information<\/em><\/p>\n<p>The results from <strong>Automated Checks<\/strong> can be saved, shared, and loaded with a .a11ytest file, which includes <strong>Automated Checks<\/strong> results, the accompanying <strong>UI Automation<\/strong> snapshot data, and the screenshot of the tested application. You can file issues to either GitHub or Azure DevOps directly from Accessibility Insights for Windows. For both platforms, relevant information about the rule result is automatically populated in the issue. For Azure DevOps, we automatically attach a screenshot and .a11ytest file to the issue once it is created.<\/p>\n<p>The next step is the <a href=\"https:\/\/accessibilityinsights.io\/docs\/en\/windows\/reference\/tabstops\/\"><strong>Tab Stops<\/strong> assisted test<\/a>. As you navigate through your target application using the keyboard, Accessibility Insights for Windows highlights and lists any elements that receive focus\u2014it\u2019s able to access this information by <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/api\/uiautomationclient\/nf-uiautomationclient-iuiautomation-addfocuschangedeventhandler\">handling UI Automation <strong>FocusChanged<\/strong> events<\/a> just like a screen reader. Using this data, users can quickly identify accessibility issues such as missing elements from the tab order.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/4.-Tab-Stops.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-278\" src=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/4.-Tab-Stops.jpg\" alt=\"A screenshot showing Accessibility Insights for Windows in Tab Stops mode on one side and Wildlife Manager on the other side. There are 8 numbered circles over elements of Wildlife Manager. In Accessibility Insights for Windows, there is a corresponding number list displaying the names of these elements as well as instructions on how to test Tab Stops.\" width=\"1642\" height=\"818\" srcset=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/4.-Tab-Stops.jpg 1642w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/4.-Tab-Stops-300x149.jpg 300w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/4.-Tab-Stops-1024x510.jpg 1024w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/4.-Tab-Stops-768x383.jpg 768w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/4.-Tab-Stops-1536x765.jpg 1536w\" sizes=\"(max-width: 1642px) 100vw, 1642px\" \/><\/a><\/p>\n<p><em>Tab stops mode<\/em><\/p>\n<h3>Event Mode<\/h3>\n<p><strong>Inspect <\/strong>mode is great for viewing the same data from your application as assistive technologies (ATs). Often, though, this data only offers a partial view of what ATs access and report. For example, imagine you noticed during the Tab Stops test that a button didn\u2019t show up in the tab order despite visually receiving focus. Upon further investigation, you discover that a screen reader doesn\u2019t seem to realize that there is a button at all. In that situation, Event mode might help you find answers. With Event mode, you can monitor and inspect the same <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winauto\/uiauto-eventsoverview\"><strong>UI Automation<\/strong> events<\/a> that ATs observe. In this button-missing scenario, listening to events on the button could reveal that no UI Automation <strong>FocusChanged<\/strong> event occurs when the button appears to receive focus. If the screen reader can\u2019t observe this event, it won\u2019t attempt to read the element, regardless of how well populated its properties and patterns are. Similar to Automated Checks, Accessibility Insights for Windows allows users to save, share, and load recorded events and their accompanying <strong>UI Automation<\/strong> data in .a11yevent files.<\/p>\n<h3>Color Contrast Analyzer<\/h3>\n<p>Accessibility Insights for Windows offers <strong><a href=\"https:\/\/accessibilityinsights.io\/docs\/en\/windows\/getstarted\/colorcontrast\/\">Color Contrast Analyzer <\/a><\/strong><a href=\"https:\/\/accessibilityinsights.io\/docs\/en\/windows\/getstarted\/colorcontrast\/\">mode<\/a> to allow users to manually test for color contrast accessibility issues. In this mode, users can select any two colors on screen using an eyedropper tool or manually via hex code and color palette and view their color contrast ratio alongside information about whether that ratio meets WCAG color contrast requirements.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/5.-Color-Contrast.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-279\" src=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/5.-Color-Contrast.jpg\" alt=\"A screenshot showing Accessibility Insights for Windows in Color Contrast Analyzer mode on one side and Wildlife Manager, an example application, on the other side. An eyedropper window being used to select the color of text in Wildlife Manager. In Accessibility Insights for Windows, the selected colors' contrast ratio is shown failing for regular text but passing for large text.\" width=\"1601\" height=\"790\" srcset=\"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/5.-Color-Contrast.jpg 1601w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/5.-Color-Contrast-300x148.jpg 300w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/5.-Color-Contrast-1024x505.jpg 1024w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/5.-Color-Contrast-768x379.jpg 768w, https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-content\/uploads\/sites\/72\/2021\/12\/5.-Color-Contrast-1536x758.jpg 1536w\" sizes=\"(max-width: 1601px) 100vw, 1601px\" \/><\/a><\/p>\n<p><em>Using Color contrast analyzer<\/em><\/p>\n<h3>Axe.Windows<\/h3>\n<p>Now that we\u2019ve covered Accessibility Insights for Windows\u2019s main features, let\u2019s take a moment to highlight an interesting element behind the scenes: <a href=\"https:\/\/www.nuget.org\/packages\/Axe.Windows\/\">Axe.Windows<\/a>, available as a NuGet package, takes the data provided by <strong>UI Automation<\/strong> and compares it to a set of rules which identify cases where the given data would create issues for users of the assistive technologies. These rules consider data such as an element\u2019s properties, patterns, and other elements in the <strong>UI Automation<\/strong> tree. The results of these rules are then displayed in the <strong>Automated Checks<\/strong> section of Accessibility Insights for Windows. In its initial iteration, what is now Axe.Windows was a part of Accessibility Insights for Windows. Once Axe.Windows was separated into its own package, we developed a command-line interface which enables you to run our rules as a part of their own tests and CI\/CD pipelines.<\/p>\n<p>With that, we wrap up our introduction to Accessibility Insights for Windows! You can learn more and download the tool at <a href=\"https:\/\/accessibilityinsights.io\">https:\/\/accessibilityinsights.io<\/a> or check out its repo on GitHub at <a href=\"https:\/\/github.com\/Microsoft\/accessibility-insights-windows\">https:\/\/github.com\/Microsoft\/accessibility-insights-windows<\/a>. Stay tuned for more posts about our Accessibility Insights tools for Android and Web in the next few months!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, John Alkire walks through the features of Accessibility Insights for Windows, which enables users to inspect and test Windows applications to find and fix accessibility issues.<\/p>\n","protected":false},"author":78545,"featured_media":113,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[4,5,21,22],"class_list":["post-261","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineering-at-microsoft","tag-1es","tag-accessibility","tag-ally","tag-windows"],"acf":[],"blog_post_summary":"<p>In this post, John Alkire walks through the features of Accessibility Insights for Windows, which enables users to inspect and test Windows applications to find and fix accessibility issues.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/users\/78545"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/media\/113"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/engineering-at-microsoft\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}