RFR: 8351881: Tidy complains about missing "alt" attribute
Jonathan Gibbons
jjg at openjdk.org
Wed Mar 12 18:46:57 UTC 2025
On Wed, 12 Mar 2025 18:08:24 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:
> Please review this change to add missing "alt" attributes to the left and right pointing angles used in the sidebar hide/show buttons and prevent `jdkCheckHtml.java` from failing.
>
> TIA.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TableOfContents.java line 114:
> 112: .put(HtmlAttr.SRC, writer.pathToRoot.resolve(DocPaths.RESOURCE_FILES)
> 113: .resolve(DocPaths.LEFT_SVG).getPath())
> 114: .put(HtmlAttr.ALT, writer.contents.hideSidebar.toString())));
It would be better to introduce and use a new factory method in HtmlTree
HtmlTree IMG(DocPath src, String alt)
so that the API makes any similar error less likely in future.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24016#discussion_r1992103888
More information about the javadoc-dev
mailing list