changeset 7219:8a087879ffc5

[ACCESSIBILITY] Indeterminate ProgressIndicator should be reported as 'Indeterminate progress indicator' 'instead of 'buy indicator' by VoiceOver, The fix is to not specify the max value for AXProgressIndicator instead of using AXBusyIndicator.
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Mon, 09 Jun 2014 14:33:40 -0700
parents 570ce4be0938
children 9b0627dd3de8
files modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java
diffstat 1 files changed, 11 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java	Mon Jun 09 13:22:14 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/mac/MacAccessible.java	Mon Jun 09 14:33:40 2014 -0700
@@ -255,7 +255,6 @@
             null,
             null
         ),
-        /* ProgressIndicator can be either a ProgressIndicatorRole or a BusyIndicatorRole (Based on INDETERMINATE) */
         NSAccessibilityProgressIndicatorRole(Role.PROGRESS_INDICATOR,
             new MacAttribute[] {
                 MacAttribute.NSAccessibilityOrientationAttribute,
@@ -265,13 +264,6 @@
             },
             null
         ),
-        NSAccessibilityBusyIndicatorRole(Role.PROGRESS_INDICATOR,
-            new MacAttribute[] {
-                MacAttribute.NSAccessibilityOrientationAttribute,
-                MacAttribute.NSAccessibilityValueAttribute,
-            },
-            null
-        ),
         NSAccessibilityMenuBarRole(Role.MENU_BAR,
             new MacAttribute[] {
                 MacAttribute.NSAccessibilitySelectedChildrenAttribute,
@@ -922,14 +914,7 @@
                 return MacRole.NSAccessibilityPopUpButtonRole;
             }
         }
-        MacRole macRole = MacRole.getRole(role);
-        if (macRole == MacRole.NSAccessibilityProgressIndicatorRole) {
-            Boolean state = (Boolean)getAttribute(INDETERMINATE);
-            if (Boolean.TRUE.equals(state)) {
-                macRole = MacRole.NSAccessibilityBusyIndicatorRole;
-            }
-        }
-        return macRole;
+        return MacRole.getRole(role);
     }
 
     private Bounds flipBounds(Bounds bounds) {
@@ -1329,6 +1314,16 @@
                 result = flipBounds((Bounds)result);
                 break;
             }
+            case NSAccessibilityMaxValueAttribute: {
+                /* 
+                 * VoiceOver reports 'Indeterminate Progress Indicator' when
+                 * the max value is not specified.
+                 */
+                if (Boolean.TRUE.equals(getAttribute(INDETERMINATE))) {
+                    return null;
+                }
+                break;
+            }
             case NSAccessibilityTitleAttribute: {
                 /*
                  * Voice over sends title attributes in unexpected cases.