On Thu, 18 Jun 2026 04:48:00 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 >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Shruthi Acharya has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains seven commits: > > - Merge branch 'master' into 8368445 > - Add the testcase fix > > Signed-off-by: Shruthi <[email protected]> > - Resolve the conflict > > Signed-off-by: Shruthi <[email protected]> > - Resolve the conflict > > Signed-off-by: Shruthi <[email protected]> > - Skip Navigation Links fix > > Signed-off-by: Shruthi <[email protected]> > - Adding skip-nav id to main elelement > > Signed-off-by: Shruthi <[email protected]> > - 8368445: Skip navigation links in API docs don't work > > Signed-off-by: Shruthi <[email protected]> Thanks, @shruacha1234, this looks good, works as it should, and passes all the test. Apart from adding the bug ID to the tests, there is one other thing I'm still not happy with, and that is that the anchor name "skip-navbar-top" is now used on the `<main>` element of javadoc pages. I know this was my suggestion, so sorry for that. The thing is that `<main>` is probably the most central element of a page and may be addressed for many reasons, and "skip-navbar-top" describes a very specific and narrow case. So I think the `<main>` element should get a more generic ID name, such as `main-content`. On the other hand, with a more generic ID there is greater risk for confilct with IDs in the user-provided content of the page, so maybe something like `javadoc-main-content` or `main-doc-content` would be safer. I think we should take some time to think this through before settling for an ID for the `<main>` element. It should be descriptive of its role and at the same time reasonably safe from collisions with other IDs. test/langtools/jdk/javadoc/doclet/AccessSkipNav/AccessSkipNav.java line 26: > 24: /* > 25: * @test > 26: * @bug 4638136 7198273 8025633 8081854 8182765 8258659 8261976 You should add the bug id 8368445 to the `@bug` tag above to link it to this test. Same for the `TestAnchorNames` test. ------------- Changes requested by hannesw (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/30068#pullrequestreview-5535827747 PR Review Comment: https://git.openjdk.org/jdk/pull/30068#discussion_r4285112295
