diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityUtilities.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityUtilities.m index 9745798fd93f..8094f7faa633 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityUtilities.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/JavaAccessibilityUtilities.m @@ -481,7 +481,7 @@ void initializeRoles() [sRoles setObject:JavaAccessibilityIgnore forKey:@"frame"]; [sRoles setObject:JavaAccessibilityIgnore forKey:@"glasspane"]; [sRoles setObject:NSAccessibilityGroupRole forKey:@"groupbox"]; - [sRoles setObject:NSAccessibilityStaticTextRole forKey:@"hyperlink"]; //maybe a group? + [sRoles setObject:NSAccessibilityLinkRole forKey:@"hyperlink"]; [sRoles setObject:NSAccessibilityImageRole forKey:@"icon"]; [sRoles setObject:NSAccessibilityGroupRole forKey:@"internalframe"]; [sRoles setObject:NSAccessibilityStaticTextRole forKey:@"label"]; diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/StaticTextAccessibility.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/StaticTextAccessibility.m index b54a32be5eba..007744f5ecdd 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/StaticTextAccessibility.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/StaticTextAccessibility.m @@ -29,6 +29,9 @@ @implementation StaticTextAccessibility - (NSAccessibilityRole _Nonnull)accessibilityRole { + if ([fJavaRole isEqualToString:@"hyperlink"]) { + return NSAccessibilityLinkRole; + } return NSAccessibilityStaticTextRole; }