7124293: [macosx] VoiceOver reads percentages rather than the actual values for sliders.
authorsveerabhadra
Thu, 01 Nov 2018 18:13:25 +0530
changeset 52534 356e75119d31
parent 52533 7d99b410be1b
child 52535 45a5c4d812d9
7124293: [macosx] VoiceOver reads percentages rather than the actual values for sliders. Reviewed-by: serb, kaddepalli
src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m	Wed Oct 31 16:58:37 2018 -0700
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaComponentAccessibility.m	Thu Nov 01 18:13:25 2018 +0530
@@ -465,8 +465,9 @@
     }
 
     // if it's a pagetab / radiobutton, it has a value but no min/max value.
+    // if it is a slider, supplying only the value makes it to voice out the value instead of percentages
     BOOL hasAxValue = attributeStatesArray[2];
-    if ([javaRole isEqualToString:@"pagetab"] || [javaRole isEqualToString:@"radiobutton"]) {
+    if ([javaRole isEqualToString:@"pagetab"] || [javaRole isEqualToString:@"radiobutton"] || [javaRole isEqualToString:@"slider"]) {
         [attributeNames addObject:NSAccessibilityValueAttribute];
     } else {
         // if not a pagetab/radio button, and it has a value, it has a min/max/current value.