RFR: 8359024: Accessibility bugs in API documentation

Hannes Wallnöfer hannesw at openjdk.org
Tue Jun 10 10:11:07 UTC 2025


Please review a change to fix a couple of accessibility errors in JDK API documentation as detected by our accessibility testing. 

 - Contrast between link and normal text colors was below 3 and therefore would have required other styling (such as underlining). This was fixed by slightly darkening text color (our text color isn't black but dark-gray).
    Resulting colors: https://webaim.org/resources/linkcontrastchecker/?fcolor=181818&bcolor=FFFFFF&lcolor=437291

 - Links in the headings of inherited member summaries used the wrong color and contrast to background color was below 4.5. This is fixed by removing a bogus `.expanded` selector that shouldn't have been there in the first place.
    Resulting colors: https://webaim.org/resources/linkcontrastchecker/?fcolor=181818&bcolor=DEE3E9&lcolor=47688A

- Remove the `role="tablist"` and `aria-orientation="horizontal"` attributes from table captions if they do not contain tabs. This is the only code change, and the only change that comes with a test change (I guess the CSS changes are `noreg-hard` as we don't have a way to do automatic accessibility testing).

All changes are invisible or so subtle that they are practically impossible to spot in normal browsing, so I spare myself the task of uploading demo docs.

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

Commit messages:
 - JDK-8359024: Accessibility bugs in API documentation

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

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


More information about the javadoc-dev mailing list