Jump Links: ideas for improvement #1926
bennypowers
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
Paging Drs @wesruv @kylebuch8 @dcaryll @coreyvickery |
Beta Was this translation helpful? Give feedback.
0 replies
-
RE:
While I like this in theory, it would be hard to implement in a CMS environment. We need to make sure we have a very specific way to define sections that should be scanned for headings that are used to build the nav. The rest I don't really have strong feelings about. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Well hi there!
Today I spent some time working on integrating pfe-jump-links into the rhds (11ty) website.
<pfe-jump-links-nav>
<pfe-jump-links-panel>
sThis gave me some markup that looks like this:
Which LGTM, but is not working with jump-links
I've identified a few issues that are preventing easy integration:
sub-nav
,has-sub-section
, etc). it would be better to not require these, and use the DOM to determine which list items have list childrenThose two are (AFAICT) hard blockers to integrating jump links on ux dot (unless, of course, PEBCAK, which is always a possibility). Even if a workaround is found (or intended APIs discovered and used), I still recommend loosening the API requirements here in accordance with the principle "be liberal with what you accept, conservative with what you produce"
Asides from those hard blockers there are a few other things I noticed, and some ideas I'd like to float for improvements:
!important
<pfe-jump-links-panel>
element. We should be able to link directly to headings, and calculate the scroll-spy boundaries via the DOMfor
attribute on<pfe-jump-links-nav>
similarly would let us target specific DOM nodes to scrollspy. this would essentially be the inverse ofscrolltarget
Beta Was this translation helpful? Give feedback.
All reactions