Skip to content

Commit

Permalink
GC-Subway: fixing skip link hrefà
Browse files Browse the repository at this point in the history
  • Loading branch information
Garneauma committed Nov 30, 2023
1 parent 74b26eb commit 7c22b49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion components/gc-subway/_screen-md-min.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

border-color: transparent;
display: none;
margin-top: 0;
padding-top: 2em;

.wb-disable & {
display: block;
Expand All @@ -23,7 +25,7 @@
hgroup {
left: -.5em;
position: absolute;
top: -2em;
top: 0;

h1 {
clip: rect(1px, 1px, 1px, 1px);
Expand Down
3 changes: 1 addition & 2 deletions components/gc-subway/gc-subway.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ var $document = wb.doc,

// Add skip link to sections list
if ( $navH1 ) {
$navH1.id = $navH1.id || wb.getId(); // Ensure the element has an ID
wb.addSkipLink( wb.i18n( "skip-prefix" ) + " " + $navH1.text(), { href: "#" + $navH1.id } );
wb.addSkipLink( wb.i18n( "skip-prefix" ) + " " + $navH1.text(), { href: "#" + elm.id } );
}

// Wrap all content until it hits either: ".pagedetails", or "".gc-subway-support"
Expand Down

0 comments on commit 7c22b49

Please sign in to comment.