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

remove usa-skipnav from touchpoints-skipnav #597

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
27 changes: 12 additions & 15 deletions _sass/touchpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3431,7 +3431,7 @@ img {
padding-left: 4rem;
}

#fba-modal-dialog .usa-skipnav {
#fba-modal-dialog .touchpoints-skipnav {
font-family: Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
font-size: 1.06rem;
line-height: 1.5;
Expand All @@ -3446,15 +3446,15 @@ img {
z-index: 100;
}

#fba-modal-dialog .usa-skipnav:hover {
#fba-modal-dialog .touchpoints-skipnav:hover {
color: #1a4480;
}

#fba-modal-dialog .usa-skipnav:active {
#fba-modal-dialog .touchpoints-skipnav:active {
color: #162e51;
}

#fba-modal-dialog .usa-skipnav:focus {
#fba-modal-dialog .touchpoints-skipnav:focus {
outline: 0.25rem solid #2491ff;
outline-offset: 0;
background: white;
Expand All @@ -3464,7 +3464,7 @@ img {
transition: 0.2s ease-in-out;
}

#fba-modal-dialog .usa-skipnav:visited {
#fba-modal-dialog .touchpoints-skipnav:visited {
color: #54278f;
}

Expand Down Expand Up @@ -4263,7 +4263,7 @@ img {
border-bottom-right-radius: 0
}

.usa-skipnav.touchpoints-skipnav {
.touchpoints-skipnav {
font-family: Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
font-size: 1.06rem;
line-height: 1.5;
Expand All @@ -4278,24 +4278,21 @@ img {
z-index: 100;
}

.usa-skipnav.touchpoints-skipnav:hover {
.touchpoints-skipnav:hover {
color: #1a4480;
}

.usa-skipnav.touchpoints-skipnav:active {
.touchpoints-skipnav:active {
color: #162e51;
}

.usa-skipnav.touchpoints-skipnav:focus {
outline: 0.25rem solid #2491ff;
outline-offset: 0;
}

.usa-skipnav.touchpoints-skipnav:visited {
.touchpoints-skipnav:visited {
color: #54278f;
}

.usa-skipnav.touchpoints-skipnav:focus {
.touchpoints-skipnav:focus {
outline: 0.25rem solid #2491ff;
outline-offset: 0;
background: white;
left: 0;
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/touchpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ function FBAform(d, N) {
},
loadFeebackSkipLink: function () {
this.skipLink = document.createElement("a");
this.skipLink.setAttribute("class", "usa-skipnav touchpoints-skipnav");
Copy link
Collaborator

@emyl3 emyl3 Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if instead of removing it from this file... in the sr-touchpoints.js file we remove the usa-skipnav class

const feedbackSkipLink = document.querySelector(".touchpoints-skipnav");
feedbackSkipLink.classList.remove("usa-skipnav");

so it is easier to maintain in the future? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense. The comment on top of the file says it was just copied from a different place. It would be possible that it just gets deleted here by accident.

/**
 * Script taken from our touchpoints configuration here: https://touchpoints.app.cloud.gov/touchpoints/2a6e9509.js
 * NOTE: When updating script ensure sr-touchpoints.js works as intended
 */

this.skipLink.setAttribute("class", "touchpoints-skipnav");
this.skipLink.setAttribute("href", "#fba-button");
this.skipLink.addEventListener("click", function () {
document.querySelector("#fba-button").focus();
Expand Down