-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#### Details As called out in #836, the `ChromiumContentShouldUseWebScanner` has caused a lot of confusion. This PR aims to reduce that confusion. It does the following: - The `ChromiumContentShouldUseWebScanner` rule will now trigger _only_ on Chromium-generated `Document` elements - Other rules are disabled on elements that are Chromium-generated `Document` elements or any of their descendants - Future rules default to being disabled on elements that are Chromium-generated `Documents` or any of their descendants. The default behavior can easily be overridden - Where needed for unit tests with strict `mock`s, provide test constructors that allow unit tests to isolate the class under test from the Chromium suppression ##### Motivation Address #836, make the `ChromiumContentShouldUseWebScanner` rule less intrusive ##### Attachments [BeforeAndAfter.zip](https://github.com/microsoft/axe-windows/files/12101240/BeforeAndAfter.zip) contains 2 `a11ytest` files - `Before.a11ytest` contains scan results from Edge before this change - `After.a11ytest` contains scan results from Edge after this change Here are how the numbers line up Message | Count before | Count after | Count of Chromium elements --- | --- | --- | --- An element must not have the same Name and LocalizedControlType as its parent | 7 | 0 | 7 An element of the given ControlType must not support the Invoke pattern | 1 | 1 | 0 An element of the given ControlType must support the Text pattern | 1 | 0 | 1 An on-screen element must not have a null BoundingRectangle property | 5 | 5 | 0 Chromium components should be scanned with a web-based scanner | 63 | 2 | 63 The Name must not include the same text as the LocalizedControlType | 2 | 2 | 0 The Name property must not include the element's control type | 2 | 2 | 0 Things to note on this table: - There are 2 Chromium documents on the page--one for the HTML content and one for the search button. This is an implementation detail of the search button - Only the 2 Chromium documents are counted in "Count after". The 61 omitted elements are children of one of the two Chromium documents - For all other columns. "Count before" - "Count after" = "Count of Chromium elements". This is as expected If you open `After.a11ytest` and inspect the children of the Chromium documents, the UIA properties are reported but no tests were run. That's exactly what this change was intended to do. ##### Screenshots Here are visual representations of the test results with all test results displaying. Notice the difference in the HTML document space: File | Snapshot (click to enlarge) | Test Results (click to enlarge) --- | --- | --- Before | ![image](https://github.com/microsoft/axe-windows/assets/45672944/3e70661f-6981-451d-b1fe-3314decb276c) | ![image](https://github.com/microsoft/axe-windows/assets/45672944/eb03f67e-2e2f-467d-8dd5-666b44aa2a1b) After | ![image](https://github.com/microsoft/axe-windows/assets/45672944/aa08a6ca-4d81-4ee2-b300-fe7de70a4ef6) | ![image](https://github.com/microsoft/axe-windows/assets/45672944/9519e8b9-9b90-48b6-ab9e-46c19b18c4c4) ##### Context <!-- Are there any parts that you've intentionally left out-of-scope for a later PR to handle? --> <!-- Were there any alternative approaches you considered? What tradeoffs did you consider? --> #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [x] Addresses an existing issue: #836
- Loading branch information
Showing
25 changed files
with
150 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.