-
Notifications
You must be signed in to change notification settings - Fork 6
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
Tabbing highlights #177
Tabbing highlights #177
Changes from all commits
e22b20c
65c8f6a
a81e719
ff315f2
011b8cc
8d124d6
beb76fb
a645d7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,14 @@ | |
outline-color: color("primary-vivid"); | ||
outline-width: 8px; | ||
} | ||
&:focus-visible { | ||
@include u-bg("transparent"); | ||
outline-style: solid; | ||
outline-color: color("primary-vivid"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the right color? To be consistent with the others? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. may also want to try There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there's probably some variable settings you can use here:
Ref: default settings There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah this is the right color, I copied the exact styling that is already there for the original hover for the other buttons There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
outline-width: 8px; | ||
outline-offset: units(0.5); | ||
|
||
} | ||
|
||
a { | ||
@include u-margin(0); | ||
|
@@ -129,6 +137,10 @@ | |
@include u-bg("transparent"); | ||
text-decoration: none; | ||
} | ||
&:focus-visible { | ||
@include u-bg("transparent"); | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
.usa-button { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,7 +110,7 @@ <h3 class="twoline">Mentorship and <br class="display-none tablet:display-inline | |
|
||
<!-- impact --> | ||
<div class="grid-row"> | ||
<div class="grid-col box-pane-button home-opportunity"> | ||
<div class="grid-col box-pane-button home-opportunity" tabindex="0"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems odd to need to force There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for divs you need to add tabindex in order for focus to work because by default, it is for elements such as , < button>, or anything that is usually interactive with the user. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yah, I think I remember struggling with this as it's not a standard HTML element. we do have the <a class="usa-button" href="{{site.baseurl}}/opportunity/"> There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this does fix the double tabbing however the div isn't redirecting to the other page because it is not the link element. |
||
<a class="usa-button" href="{{site.baseurl}}/opportunity/"> | ||
<div class="box-pane"> | ||
<h2>The Opportunity</h2> | ||
|
@@ -124,7 +124,7 @@ <h2>The Opportunity</h2> | |
|
||
<!-- mission and values --> | ||
<div class="grid-row"> | ||
<div class="grid-col box-pane-button home-about"> | ||
<div class="grid-col box-pane-button home-about" tabindex="0"> | ||
<a class="usa-button" href="{{site.baseurl}}/about/"> | ||
<div class="box-pane"> | ||
<h2>Who we are</h2> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly sure what's causing it, but there seems to be an extra tab action (two per box) that is weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll look into this