On Thu, 26 Mar 2026 10:41:15 GMT, Shruthi Acharya <[email protected]> wrote:

>> Addressed the Skip navigation links issue in API docs
>> The bug report for the same: https://bugs.openjdk.org/browse/JDK-8368445
>
> Shruthi Acharya has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Adding skip-nav id to main elelement
>   
>   Signed-off-by: Shruthi <[email protected]>

Please ignore the suggestion in my previous comment. The problem was that the 
`scroll-margin-top` CSS property required to position the element correctly was 
only set on descendants of the `<main>` element, not the `<main>` element 
itself. The solution is a simple addition to the stylesheet:


--- 
a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/stylesheet.css
+++ 
b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/stylesheet.css
@@ -187,7 +187,7 @@ body {
     height:100%;
     width:100%;
 }
-main [id] {
+main, main [id] {
     scroll-margin-top: calc(var(--nav-height) + 6px);
 }
 div.main-grid {

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

PR Comment: https://git.openjdk.org/jdk/pull/30068#issuecomment-4163336247

Reply via email to