These links provide a target for accessibility or vimium users to set
focus on the post overlay image gallery, allowing one to scroll the
overlay, not the timeline, without a mouse click and scrollwheel or
touchscreen.
---
Additionally, there's a chance to add meaningful information onto the
link fragments for each entry, like a random or canonical id string, or
just ascending intergers. Perhaps Instagram has similar functionlity we
can match. I don't know enough pug or of the data structure to
implement this myself.
src/site/pug/includes/post.pug | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/site/pug/includes/post.pug b/src/site/pug/includes/post.pug
index 69e3acf..91ae68d 100644
--- a/src/site/pug/includes/post.pug+++ b/src/site/pug/includes/post.pug
@@ -43,11 +43,12 @@ mixin post(post, headerWithNavigation)
section.images-gallery
for entry in post.children
- if entry.isVideo()- video(src=entry.getVideoUrlP() controls preload="auto" width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-video- else- img(src=entry.getDisplayUrlP() alt=entry.getAlt() width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-image- if willDisplayAltInGallery- - let caption = entry.data.accessibility_caption- if caption- p.description.alt-in-gallery= caption+ a(href=`#`)+ if entry.isVideo()+ video(src=entry.getVideoUrlP() controls preload="auto" width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-video+ else+ img(src=entry.getDisplayUrlP() alt=entry.getAlt() width=entry.data.dimensions.width height=entry.data.dimensions.height).sized-image+ if willDisplayAltInGallery+ - let caption = entry.data.accessibility_caption+ if caption+ p.description.alt-in-gallery= caption
--
2.32.0
> These links provide a target for accessibility or vimium users to set> focus on the post overlay image gallery, allowing one to scroll the> overlay, not the timeline, without a mouse click and scrollwheel or> touchscreen.
Thanks for the explanation!
Rather than merge this patch right away, I implemented some focus
handling through JavaScript, which is now live on bibliogram.art. Can
you tell me if this solves your problem?
When opening a post, the focus is set to the post overlay. When
closing a post, focus is restored.
If this doesn't work for you, I'll consider your patch again, but for
right now I'd prefer not to add ugly # links around the page, which
can jump the scroll position if mistakenly clicked.