On Tue, 5 Oct 2021 16:09:30 GMT, Hannes Wallnöfer <hann...@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. The example documentation looks nice. I wonder if we could eventually use `input type="search"` instead of our custom search field. ------------- PR: https://git.openjdk.java.net/jdk/pull/5825