Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Accessibility]: Adding MonthCalendar control UI Automation providers to improve calendar control accessibility #2090

Merged
merged 1 commit into from
Nov 5, 2019

Conversation

M-Lipin
Copy link
Contributor

@M-Lipin M-Lipin commented Oct 15, 2019

Fixes #1908
Fixes #1909
Fixes #1910
Fixes #1911

Proposed changes

  • Adding MonthCalendar control UIA providers as accessibility implementation;
  • Adding fragment navigation (Narrator caps navigation and announcing for each child);
  • Adding Grid and Table providers for calendar body;
  • Reworked accessibility implementation, hierarchy and overall accessibility providing patterns for control;
  • Temporarily disabled legacy accessibility providers for control (will restore in next commits).

Customer Impact

  • Customers will be able to navigate, listen to correct announcement and fully interact with the calendar control using desktop assistive technologies and apps.

Regression?

  • No

Risk

  • Minimal (need to perform manual and automation verification to be sure that accessibility is correct for calendar control)

Screenshots

Before

  • Accessibility is provided only for the container (name) without navigation and no more info provided.

After

image

Test methodology

  • Manual testing.
  • Automation UI and accessibility test.
  • Unit tests.

Accessibility testing

  • Need to perform tests including verification of accessible names, navigation and patterns provided correctly. Assistive technologies and accessibility client apps should work correctly with new accessibility.

Test environment(s)

.NET Core SDK (reflecting any global.json):
Version: 3.1.100-preview1-014044
Commit: dca04e7030

Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.100-preview1-014044\

Host (useful for support):
Version: 3.1.0-preview1.19463.3
Commit: 1e35b022cb

.NET Core SDKs installed:
2.1.700-preview-009601 [C:\Program Files\dotnet\sdk]
2.1.801 [C:\Program Files\dotnet\sdk]
3.0.100-preview8-012929 [C:\Program Files\dotnet\sdk]
3.0.100-preview9-014004 [C:\Program Files\dotnet\sdk]
3.1.100-preview1-014044 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview8.19351.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview9.19424.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-rc2.19462.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview8-27907-09 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview9-19423-09 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0-preview1.19463.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview8-27907-09 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.0.0-preview9-19423-09 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.0-preview1.19463.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft Reviewers: Open in CodeFlow

@M-Lipin M-Lipin requested a review from a team as a code owner October 15, 2019 22:19
@M-Lipin M-Lipin added the 🚧 work in progress Work that is current in progress label Oct 15, 2019
@codecov
Copy link

codecov bot commented Oct 16, 2019

Codecov Report

Merging #2090 into release/3.1 will decrease coverage by 0.04724%.
The diff coverage is 0%.

@@                  Coverage Diff                  @@
##           release/3.1       #2090         +/-   ##
=====================================================
- Coverage     26.51476%   26.46751%   -0.04725%     
=====================================================
  Files              804         805          +1     
  Lines           268062      268635        +573     
  Branches         38066       38113         +47     
=====================================================
+ Hits             71076       71101         +25     
- Misses          191907      192461        +554     
+ Partials          5079        5073          -6
Flag Coverage Δ
#Debug 26.46751% <0%> (-0.04725%) ⬇️
#production 26.46751% <0%> (-0.04725%) ⬇️
#test 100% <ø> (ø) ⬆️

@codecov
Copy link

codecov bot commented Oct 16, 2019

Codecov Report

Merging #2090 into release/3.1 will decrease coverage by 0.12528%.
The diff coverage is 0.11947%.

@@                  Coverage Diff                  @@
##           release/3.1       #2090         +/-   ##
=====================================================
- Coverage     26.52264%   26.39736%   -0.12528%     
=====================================================
  Files              806         818         +12     
  Lines           268186      268811        +625     
  Branches         38086       38145         +59     
=====================================================
- Hits             71130       70959        -171     
- Misses          191983      192771        +788     
- Partials          5073        5081          +8
Flag Coverage Δ
#Debug 26.39736% <0.11947%> (-0.12529%) ⬇️
#production 26.39736% <0.11947%> (-0.12529%) ⬇️

@merriemcgaw
Copy link
Member

Business case approved. Add servicing-consider when you've got this ready for Tactics. Tactics note - fixing this will close the final 4 outstanding issues being tracked centrally for accessibility compliance.

@ghost ghost added waiting-author-feedback The team requires more information from the author and removed waiting-author-feedback The team requires more information from the author labels Oct 21, 2019
Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non blocking comments

RussKie
RussKie previously approved these changes Oct 31, 2019
@RussKie RussKie added 📫 waiting-approval and removed 🚧 work in progress Work that is current in progress labels Oct 31, 2019
@merriemcgaw
Copy link
Member

@Vino-Wang has your team tested these changes yet? Can you double check the calendar control still passes Accessibility Insights?

@RussKie RussKie added the waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) label Oct 31, 2019
@M-Lipin M-Lipin force-pushed the dev/v-milipi/MonthCalendar_UIAutomation branch from b67edee to 9875455 Compare November 1, 2019 07:17
@M-Lipin
Copy link
Contributor Author

M-Lipin commented Nov 1, 2019

Found one more issue and fixed it: Narrator users are available to navigate across MonthCalendar child items using CAPS+Arrow keys and now available to call default action for navigated element using CAPS+Enter.

JuditRose
JuditRose previously approved these changes Nov 4, 2019
Copy link
Contributor

@JuditRose JuditRose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good besides the minor comments above

@M-Lipin
Copy link
Contributor Author

M-Lipin commented Nov 5, 2019

I and QA team have performed additional verification iteration and the results are good - no regressions, Accessibility Insights do not report issues with MonthCalendar control, automation tests passed.

@RussKie RussKie removed waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) 📫 waiting-approval labels Nov 5, 2019
Proposed changes:
* Added UI Automation server providers to MonthCalendar and switched the
accessibility model from MSAA-provided to UIA.
* Added/moved from combined Safe/Unsafe NativeMethods native structure
definitions and constants: MCGIF, MCGIP, MCGRIDINFO, MCHITTESTINFO,
MCHT, MCM, MCS, MCSC, POINT, SYSTEMTIME, MOUSEEVENTF. Description for all definitions can be found in Windows API reference. Some managed-code definitions for structures were moved with changing the class-defined to structure-defined, so changed corresponding native methods to pass corresponding objects by ref.
* Implemented wrappers for native method calls to fetch month calendar
control inf (bounding rectangles, dates, texts). Implemented marshaling for accessible names/texts with passing strings of defined length. Passing string or pointer with length which does not correspond to passed length of text may lead to heap corruption. Passing null will lead to protected memory write violation. Adding required resources for month calendar elements which text/name cannot be fetched from Windows API calls.
* Implemented the hierarchy of MonthCalendar control accessibility
children with navigation in all directions using FragmentNavigation (UIA
server provided navigation - UIA providers support should be set to
true), implemented navigation for all calendar view types (dates,
months, years, decades).
* Added Table and Grid providers for the root element (but not for the
calendar body to prevent announcing "table exit" when navigating to
calendar header or today button. Added TableItem and GridItem providers
for calendar items (date/months/years/decades). Note: getting number of
rows and number of columns is little tricky as there is no documented API for that, so getting these basing on the dimensions and coordinates of cells and container calendar body.
* Added Runtime IDs to elements to correctly associate navigated element
and its properties in Inspect tree tab and properties tab.
* Implemented accessibility hit test to allow getting month calendar child accessible element by specific coordinates.
* Implemented accessibility default action invoke (trigger mouse click
on the coordinates of specific child element to invoke its native click
handler) - same as in client providers.
* Improved Narrator support: allowing CAPS+Arrow/Arrow navigation
accompanied with blue rectangle emphasizing, correct and detailed
announcement for cells, headers, buttons and other MonthCalendar UI elements. Allowed triggering default action/click for MonthCalendar child element using CAPS+Enter.
* Changed accessible control type from table to calendar except the case
when there is a label before the MonthCalendar control with custom name
for below MonthCalendar control.
* Fixed AccessibilityInsights issues.

Resolves #1908
Resolves #1909
Resolves #1910
Resolves #1911
@M-Lipin M-Lipin force-pushed the dev/v-milipi/MonthCalendar_UIAutomation branch from ac3eeb6 to b862078 Compare November 5, 2019 12:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
servicing-approved .NET Shiproom approved the PR for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants