-
Notifications
You must be signed in to change notification settings - Fork 443
feat: added skip to main content links to toc #4078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces navigation improvements by adding skip-to-main-content links and updating the active table of contents scrolling behavior.
- Added a new constant and logic to handle skip-to-main-content links in the navigation loader.
- Changed the scrolling target in the navbar button to the toc link within an active toc part.
Reviewed Changes
Copilot reviewed 3 out of 8 changed files in this pull request and generated no comments.
File | Description |
---|---|
dokka-subprojects/plugin-base/src/main/resources/dokka/scripts/navigation-loader.js | Adds new skip link functionality by introducing the TOC_SKIP_LINK_CLASS and applying event listeners to the corresponding elements. |
dokka-subprojects/plugin-base-frontend/src/main/ui-kit/navbar-button/index.ts | Updates the scroll behavior to target the active toc link rather than the overall active toc part. |
Files not reviewed (5)
- dokka-subprojects/plugin-base-frontend/src/main/ui-kit/toc-tree/styles.scss: Language not supported
- dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationPage.kt: Language not supported
- dokka-subprojects/plugin-base/src/main/resources/dokka/templates/base.ftl: Language not supported
- dokka-subprojects/plugin-base/src/main/resources/dokka/ui-kit/ui-kit.css: Language not supported
- dokka-subprojects/plugin-base/src/main/resources/dokka/ui-kit/ui-kit.min.css: Language not supported
Comments suppressed due to low confidence (1)
dokka-subprojects/plugin-base-frontend/src/main/ui-kit/navbar-button/index.ts:42
- Scrolling the inner '.toc--link' element instead of the parent '.toc--part' may lead to unexpected positioning; please confirm that this change aligns with the intended behavior.
const activePart = document.querySelector('.toc--part[data-active="true"]')?.querySelector('.toc--link');
ec24698
to
22faf40
Compare
* fix: prevent unwanted dropdown list scroll * fix: include dropdown toggle into focus trap * fix: smooth keyboard navigation for toc and dropdowns * feat: added skip to main content links to toc (#4078) * fix: proper scroll into view in the toc modal * feat: implemented skip to main content link * fix: accessibility for toc and navbar * fix: footer button outline * fix: improved accessibility in header and toc * refactor: review fixes
* feat: preserve toc scroll position * test: updated html output tests * UI fixes for table of contents (#4077) * fix: prevent unwanted dropdown list scroll * fix: include dropdown toggle into focus trap * fix: smooth keyboard navigation for toc and dropdowns * feat: added skip to main content links to toc (#4078) * fix: proper scroll into view in the toc modal * feat: implemented skip to main content link * fix: accessibility for toc and navbar * fix: footer button outline * fix: improved accessibility in header and toc * refactor: review fixes
* feat: preserve toc scroll position * test: updated html output tests * UI fixes for table of contents (#4077) * fix: prevent unwanted dropdown list scroll * fix: include dropdown toggle into focus trap * fix: smooth keyboard navigation for toc and dropdowns * feat: added skip to main content links to toc (#4078) * fix: proper scroll into view in the toc modal * feat: implemented skip to main content link * fix: accessibility for toc and navbar * fix: footer button outline * fix: improved accessibility in header and toc * refactor: review fixes
* feat: preserve toc scroll position * test: updated html output tests * UI fixes for table of contents (#4077) * fix: prevent unwanted dropdown list scroll * fix: include dropdown toggle into focus trap * fix: smooth keyboard navigation for toc and dropdowns * feat: added skip to main content links to toc (#4078) * fix: proper scroll into view in the toc modal * feat: implemented skip to main content link * fix: accessibility for toc and navbar * fix: footer button outline * fix: improved accessibility in header and toc * refactor: review fixes
* fix: version button layout * fix: not active tag style in firefox * fix: removed unused assets copies * fix: proper hover for platform tags * fix: outline position for header elements * fix: dropdown list edge cases * fix: selected option style in dropdown * fix: misc outline and focus fixes * fix: toc icons positioning * feat: added sidebar resize (#4031) * fix: search modal positioning * chore: updated deps * fix: fix scroll for left column and main area * chore: enable strict mode for react and fix warnings * fix: controls states * feat: preserve toc expanded/collapsed state (#4063) * feat: preserve toc scroll position * test: updated html output tests * UI fixes for table of contents (#4077) * fix: prevent unwanted dropdown list scroll * fix: include dropdown toggle into focus trap * fix: smooth keyboard navigation for toc and dropdowns * feat: added skip to main content links to toc (#4078) * fix: proper scroll into view in the toc modal * feat: implemented skip to main content link * fix: accessibility for toc and navbar * fix: footer button outline * fix: improved accessibility in header and toc * refactor: review fixes * fix: proper background * chore: fix tests and linting errors * feat: added collapse search button,improved search * chore: updated tests snapshots * fix: returned fix for navigation loading in safari
No description provided.