7124293: [macosx] VoiceOver reads percentages rather than the actual values for sliders.
Reviewed-by: serb, kaddepalli
--- 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.