Maintaining CAccessibility

Jeremy Wood mickleness at gmail.com
Thu Feb 12 08:49:05 UTC 2026


If I open a PR to clean up CAccessibility.java: is there any interest in 
code reviewing it?

Just tonight I think I’ve identified three topics to explore:

A. The native method `roleKey(AccessibleRole)` looks redundant compared 
to `AWTAccessor.getAccessibleBundleAccessor().getKey(AccessibleRole)`. I 
think we can remove one. (Or at least better document when to use each.)

B. There’s an if statement: `if (“label”.equals(…`. This looks like it 
will break if the Locale is not English. However it (mostly) doesn’t, 
because…

C. The method getAccessibleRoleForLabel also appears mostly redundant 
compared to AccessibleJLabel#getAccessibleRole. (See 2021 commit 
70bad89b012eb200ca1e76f384a6e5fb307cf26d for 8277497 ).

I could submit a PR to clean these up, but I know sometime’s it's hard 
to justify maintenance work without a customer-facing issue.

Any thoughts?

Regards,
  - Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/client-libs-dev/attachments/20260212/01ccb161/attachment.htm>


More information about the client-libs-dev mailing list