RFR: 8366278: Form control element <select> has no associated label
Pasam Soujanya
duke at openjdk.org
Mon Sep 8 13:52:16 UTC 2025
On Mon, 8 Sep 2025 13:23:29 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
>> Associating a meaningful label with every UI control allows the browser and assistive technology to expose and announce the control to a user. Associating a visible label also provides a larger clickable area.
>>
>> `<select id="search-modules">` should contain a label or title to describe it's purpose.
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchWriter.java line 111:
>
>> 109: var select = HtmlTree.of(HtmlTag.SELECT)
>> 110: .setId(HtmlId.of("search-modules"))
>> 111: .put(HtmlAttr.TITLE, "search in modules")
>
> Should there be an `aria-label` attribute in addition to (or instead of) the `title` attribute?
>
> The value of the attribute shoudl be localized, using `contents.getContent("doclet...")` with an appropriate new entry in `standard.properties`.
Sure, will make the changes as suggested. Thank you.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26982#discussion_r2330316123
More information about the javadoc-dev
mailing list