-
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 - Narrator is not announcing more information about control #1911
Comments
@merriemcgaw the fix implemented in #2090 implies changing MonthCalendar accessible control type to calendar like this is in WPF. One exception is the case when the label is added to the form just before MonthCalendar control (as a title for calendar): in this particular scenario, I've found out that if calendar control type is used here, Narrator does not announce the custom name of the control defined by this label, so for this specific case I'm keeping the MonthCalendar control type as table. It seems to me that this is acceptable and does not break things as table accessible control type was used before my changes. |
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
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. |
Repro Steps:
Actual:
Narrator is not announcing the more information about Month Calendar.
Expected:
When narrator focus shifts on Month Calendar narrator should announce the selected date in proper format like dd/mm/yy.
User Impact:
Screen reader users will face difficulty understand the month calendar properties.
The text was updated successfully, but these errors were encountered: