microsoft / axe-windows

Automated accessibility testing engine for Windows applications
MIT License
134 stars 62 forks source link

feat(logical-size): Implement the LogicalSize property in Axe.Windows #1020

Closed codeofdusk closed 3 months ago

codeofdusk commented 4 months ago

Details

This PR adds a "pseudo-property", LogicalSize, a normalized size based on an element's BoundingRectangle to aid in touch size calculations.

Motivation

Part of Feature 2152841 (internal access required to view).

Pull request checklist

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 62.71186% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 72.13%. Comparing base (4fc19c3) to head (af0df06). Report is 384 commits behind head on main.

:exclamation: Current head af0df06 differs from pull request most recent head fa8be9f

Please upload reports for the commit fa8be9f to get more accurate results.

Files Patch % Lines
src/Win32/Win32Helper.cs 50.00% 10 Missing and 2 partials :warning:
src/Core/Misc/ExtensionMethods.cs 0.00% 4 Missing :warning:
src/Core/Bases/A11yElement.cs 0.00% 3 Missing :warning:
...top/UIAutomation/DesktopElementExtensionMethods.cs 85.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1020 +/- ## ========================================== - Coverage 73.70% 72.13% -1.57% ========================================== Files 398 424 +26 Lines 12046 13216 +1170 Branches 0 1420 +1420 ========================================== + Hits 8878 9534 +656 - Misses 3168 3265 +97 - Partials 0 417 +417 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codeofdusk commented 3 months ago

I've added a unit test for the ToString logic. At some point, it might be worth: