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

Fix skip link display during keyboard navigation. Fixes TD-1412. #491

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<%# TRLN override. Remove Bootstrap 4 sr-only classes. This override can be removed with the next release of Blacklight, as
as they've been removed on the main branch. %>
<%# TRLN override. Remove Bootstrap 4 sr-only classes. This override can be removed in BL9 -%>
<%# https://github.com/projectblacklight/blacklight/blob/release-8.x/app/components/blacklight/skip_link_component.html.erb -%>
<nav id="skip-link" role="navigation" class="visually-hidden-focusable" aria-label="<%= t('blacklight.skip_links.label') %>">
<div class="container-xl">
<%= link_to_search %>
<%= link_to_main %>
<%= link_to_search %>
<%= content %>
</div>
</nav>
</nav>
6 changes: 6 additions & 0 deletions app/components/trln_argon/skip_link_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

module TrlnArgon
class SkipLinkComponent < Blacklight::SkipLinkComponent
end
end
3 changes: 3 additions & 0 deletions lib/trln_argon/controller_override.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ module ControllerOverride
# https://github.com/projectblacklight/blacklight/issues/3154
config.search_state_fields << %i[id debug doc_ids]

# TRLN custom skip link display.
config.skip_link_component = TrlnArgon::SkipLinkComponent

# Sets the sidebar component for the index view in the TrlnArgon configuration.
config.index.sidebar_component = TrlnArgon::Search::SidebarComponent
config.index.document_component = TrlnArgon::DocumentComponent
Expand Down
Loading