Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: ui/accessibility/platform/ax_platform_node_mac.mm

Issue 2937003002: MacViews a11y: Get simple field editing plaing nice with VoiceOver.
Patch Set: not quite right :/ Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/platform/ax_platform_node_mac.mm
diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibility/platform/ax_platform_node_mac.mm
index 240240e6180bc11f40e56de4fa36fdafd9e65b81..b188b66f0aced9e298ecc82e2c6b3c84b7a1849c 100644
--- a/ui/accessibility/platform/ax_platform_node_mac.mm
+++ b/ui/accessibility/platform/ax_platform_node_mac.mm
@@ -221,8 +221,19 @@ EventMap BuildEventMap() {
}
void NotifyMacEvent(AXPlatformNodeCocoa* target, ui::AXEvent event_type) {
- NSAccessibilityPostNotification(
- target, [AXPlatformNodeCocoa nativeNotificationFromAXEvent:event_type]);
+ if (event_type == ui::AX_EVENT_VALUE_CHANGED) {
+ // VoiceOver stopped responding correctly to
+ // NSAccessibilityValueChangedNotification for text fields in 10.11. But
+ // notifying the element as destroyed and subsequently focused elicits good
+ // behavior from VoiceOver for simple text fields.
+ NSAccessibilityPostNotification(
+ target, NSAccessibilityUIElementDestroyedNotification);
+ NSAccessibilityPostNotification(
+ target, NSAccessibilityFocusedUIElementChangedNotification);
+ } else {
+ NSAccessibilityPostNotification(
+ target, [AXPlatformNodeCocoa nativeNotificationFromAXEvent:event_type]);
+ }
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698