Skip to content
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

Skip to search is moving to the area below the search form #1467

Open
dbranchini opened this issue Jan 8, 2025 · 3 comments
Open

Skip to search is moving to the area below the search form #1467

dbranchini opened this issue Jan 8, 2025 · 3 comments

Comments

@dbranchini
Copy link

Related to #1436. It seems that fix was implemented, but it's not moving to the correct place. It's just below the search form, which can be confusing to the user because it's the element they are moving to is hidden from view. Note that this is working correctly for Exhibits.

@thatbudakguy
Copy link
Member

The weirdest thing about this is that, from what I can tell, it only happens when you're on the search page. On item view pages and the homepage, it works correctly.

It also does focus the right element, but for some reason on the search page that scrolls it down somewhat. Maybe this has to do with the overall page length somehow?

@thatbudakguy
Copy link
Member

From an HTML point of view, there is an anchor link constructed that points to the correct element...not sure what else can be done here.

thatbudakguy added a commit to projectblacklight/blacklight that referenced this issue Jan 31, 2025
The anchor links in the skip links navigation cause the search
bar to be focused when activated, but in some cases the bar itself
is scrolled up and out of view, making it hard to interact with
after focusing.

This adds some styling to create an extra scroll margin so that
the search elements stay within view when focused using an anchor
link.

Ref sul-dlss/earthworks#1467
@thatbudakguy
Copy link
Member

It turns out that the newer CSS feature scroll-margin might help with this. Working on a fix in blacklight.

thatbudakguy added a commit to projectblacklight/blacklight that referenced this issue Jan 31, 2025
The anchor links in the skip links navigation cause the search
bar to be focused when activated, but in some cases the bar itself
is scrolled up and out of view, making it hard to interact with
after focusing.

This adds some styling to create an extra scroll margin so that
the search elements stay within view when focused using an anchor
link.

Ref sul-dlss/earthworks#1467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants