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 skiplink target so it doesn't take up space and cause overflow #415

Merged
merged 5 commits into from
May 22, 2019
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
9 changes: 0 additions & 9 deletions core/dist/css/decanter.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/src/scss/components/skiplinks/_skiplinks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// <a href="#main-content" class="su-skiplinks">Skip to main content</a>
// </header>
// <main>
// <h2 id="main-content" class="su-sr-only-text" tabindex="-1">Main Content</h2>
// <h2 id="main-content" class="su-sr-only-element" tabindex="-1">Main Content</h2>
// </main>
//
//
Expand Down
5 changes: 0 additions & 5 deletions core/src/scss/core/helpers/_sr-only-element.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,4 @@
//
.su-sr-only-element {
@include hide-visually;

&:active,
&:focus {
@include hide-visually("unhide");
}
}
4 changes: 3 additions & 1 deletion core/src/scss/core/helpers/_sr-only-text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
//
// Screen Reader Only Text
//
// Hides the text in an element, commonly used to show an image instead.
// Use this helper only for text that describes an image but should be hidden visually. For other use cases where
// text needs to be hidden visually (e.g., skip link targets), use the .su-sr-only-element helper class instead.
//
// Some elements will need block-level styles applied.
//
// Style guide: Core.Helpers.sr-only
Expand Down
2 changes: 1 addition & 1 deletion core/src/templates/components/skiplinks/target.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
* skiplink - defaults to 'Main Content'
*/
#}
<h2 {{ attributes }} id="{{ target_id|default('su-main-content-1891') }}" class="su-sr-only-text {{ modifier_class }}" tabindex="-1">{{ target_text|default('Main Content') }}</h2>
<h2 {{ attributes }} id="{{ target_id|default('su-main-content-1891') }}" class="su-sr-only-element {{ modifier_class }}" tabindex="-1">{{ target_text|default('Main Content') }}</h2>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.