Integrated: JDK-8274625: Search field placeholder behavior
Hannes Wallnöfer
hannesw at openjdk.java.net
Wed Oct 6 09:32:09 UTC 2021
On Tue, 5 Oct 2021 16:09:30 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
> Please review a change to use the HTML `placeholder` attribute in the javadoc search input instead of an actual input value. This revives the fix I originally created for JDK-8221366 but forwent back then because of insufficient support by the Microsoft IE and Edge browsers. MS Edge has since been updated and supports the placeholder attribute well now.
>
> Example pages generated with this change can be viewed here (top level pages only):
> http://cr.openjdk.java.net/~hannesw/8274625/api.00/
>
> I changed the color of the placeholder to a lighter grey than we used for our own solution because the placeholder attribute works in a slightly different way. While we removed the placeholder text when the user clicked on the input field, the standard placeholder is still visible right until the user starts entering text. Because of this, using a darker color for the placeholder is confusing because it can easily be mistaken for actual input. The lighter grey is also closer to the default value for most browsers and web frameworks such as bootstrap.
>
> I also changed the HTML for the search input to not have an initial value of "search" which had then to be cleared by the search script. Furthermore, the `disabled` attributes now come in HTML5 value-less boolean format, i.e. `disabled` instead of `disabled="disabled"`.
>
> In addition to most significant desktop browsers I tested the generated docs on various mobile browsers on Android and iOS devices.
This pull request has now been integrated.
Changeset: cdf89304
Author: Hannes Wallnöfer <hannesw at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/cdf89304eafce58e66127d4e277f5fcaf07c9954
Stats: 45 lines in 9 files changed: 8 ins; 22 del; 15 mod
8274625: Search field placeholder behavior
Reviewed-by: prappo
-------------
PR: https://git.openjdk.java.net/jdk/pull/5825
More information about the javadoc-dev
mailing list