-
Notifications
You must be signed in to change notification settings - Fork 172
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
[macOS] Announce DatePickerController
changes in VoiceOver
#2134
base: main
Are you sure you want to change the base?
Conversation
Demos/FluentUIDemo_macOS/FluentUITestViewControllers/TestDatePickerController.swift
Outdated
Show resolved
Hide resolved
NSAccessibility.NotificationUserInfoKey.announcement: newMonthYearValue, | ||
NSAccessibility.NotificationUserInfoKey.priority: NSAccessibilityPriorityLevel.medium.rawValue | ||
]) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this usually happen because of direct user interaction? In which case we shouldn't need an announcement? Or is there a case where it's happening indirectly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole control is a bit of an accessibility mess. The bandaid here is because the header title is never announced anywhere, in any context. A VoiceOver user can still infer what's happening by reading the individual dates in the calendar, but there's no way to know what's happening when the calendar changes months.
There are two longer-term fixes possible here that are outside the scope of this targeted fix:
- Rethink the entire accessibility hierarchy and behavior of this control, along with a variety of minor visibility and usability problems.
- Deprecate the control and work with partners to remove and replace it with the standard macOS date picker.
I have a preference, and it's not #1 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about just making the header title accessible so it's announced it a user moves focus to it? Or is that not trivial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It already is, but that's not sufficiently accessible. We need an actual announcement when the value changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still a bit concerned - that feels like it would solve the letter of the law of accessibility compliance but maybe not actually be better for the user? I think Apple has a general assumption that the user knows what they are focused on when they activate a button so announcing additional info beyond their activation being successful seems like it may add noise rather than resolve confusion.
Another way to put it - if the user is in a situation where they are focused on the "next month" button and don't know or can't easily infer which month that will take them to, we have already failed them?
Platforms Impacted
Description of changes
NSAccessibility
announcement when the visible month in theDatePickerController
changes.TestDatePickerController
so popover-hosted picker works as expected.Binary change
n/a, no Mac size testing
Verification
Pull request checklist
This PR has considered:
Microsoft Reviewers: Open in CodeFlow