-
Notifications
You must be signed in to change notification settings - Fork 1k
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
MonthCalendar control should support Grid and Table patterns accordingly to table control type #1909
Labels
tenet-accessibility
MAS violation, UIA issue; problems with accessibility standards
Comments
M-Lipin
pushed a commit
that referenced
this issue
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
RussKie
pushed a commit
that referenced
this issue
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
Resolving this issue as the fixing PR #2090 is merged to release/3.1. |
Verified with latest .NET Core 3.1 3.1.100-GA-014700 build, this issue is fixed. The controlType of MonthCalendar is table once there is a label in front of it, otherwise, it will be calendar. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue Details
Element path: table 'MonthCalendar'
This accessibility issue was found using Accessibility Insights for Windows, a tool that helps debug and find accessibility issues earlier. Get more information & download this tool at https://accessibilityinsights.io/
DevDiv issue: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/956702
The text was updated successfully, but these errors were encountered: