On Mac OS this will identify an accessible role as "heading" instead of 
"header".

"heading" has a special semantic meaning to VoiceOver (and probably other 
technologies), and "header" is a Java construct that has no specific meaning in 
Apple's accessibility models.

This PR is resubmitting the same branch used for 
https://github.com/openjdk/jdk/pull/30251 with an additional commit.

The previous PR failed because `NSAccessibilityHeadingRole` triggered a 
compiler error on older Mac OS's. This PR manually defines that constant if 
necessary. I think "AXHeading" was introduced in Mac OS 10.13, so if we're not 
at least on macOS 10.13: the user will see the less helpful/generic "header" 
role announced.

Warning: I do not have an older Mac to test this against, so this is an 
educated guess.

(I'm also fine with just closing this PR and unassigning myself from the 
OpenJDK ticket if folks prefer someone more experienced tackle this someday.)

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - 8379953: trying to resolve build failures on older Macs
 - Merge remote-tracking branch 'origin/master' into 8379953
 - Revert "8379953: reverting previous fix"
 - 8379953: use NSAccessibilityHeadingRole for "header"
 - 8379953: use NSAccessibilityHeadingRole for "header"
 - 8379953: reverting previous fix
 - Merge branch 'master' into 8379953
 - 8377938: use NSAccessibilityHeadingRole for AccessibleRole.HEADER

Changes: https://git.openjdk.org/jdk/pull/31005/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31005&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8379953
  Stats: 91 lines in 2 files changed: 91 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/31005.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31005/head:pull/31005

PR: https://git.openjdk.org/jdk/pull/31005

Reply via email to