Skip to content

Commit

Permalink
Merge pull request #4364 from sul-dlss/remove-obsolete-fix
Browse files Browse the repository at this point in the history
Remove an obsolete fix for skip to nav links
  • Loading branch information
corylown authored Aug 13, 2024
2 parents 19d7708 + c49dc11 commit 56f0f16
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 53 deletions.
5 changes: 2 additions & 3 deletions app/javascript/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ import "./preview-content";
import "./recent-selections";
import "./select-all";
import "./sfx-panel";
import "./skip-to-nav";
import "./tooltip";
import "./truncate";
import "./update-hidden-inputs-by-checkbox";

// TODO: Remove this whole method when we upgrade to Blacklight 8, provided that
// TODO: Remove this whole method when we upgrade to Blacklight 8, provided that
// https://github.com/projectblacklight/blacklight/pull/3133 is merged
//
// Add the passed in contents to the modal and display it.
Expand Down Expand Up @@ -97,4 +96,4 @@ document.addEventListener("turbo:before-cache", function () {
});

import "./controllers"
import "./controllers/external"
import "./controllers/external"
36 changes: 0 additions & 36 deletions app/javascript/skip-to-nav.js

This file was deleted.

14 changes: 0 additions & 14 deletions spec/features/skip_to_nav_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,6 @@
end
end

scenario 'places focus on traditionally non-focusable elements', :js do
visit root_path

body_element = page.find("body")
body_element.native.send_keys(:tab)
body_element.native.send_keys(:tab)

within '#skip-link' do
click_link 'Skip to main content'
active_element = page.evaluate_script('$(document.activeElement).attr("id")')
expect(active_element).to eq 'main-container'
end
end

scenario "has skip-to navigation links to search field, main container and records in record view page" do
visit solr_document_path 20

Expand Down

0 comments on commit 56f0f16

Please sign in to comment.