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

fixing header ids #412

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion public/css/styles-srl.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/js/scripts.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/scripts.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/scripts.min.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
footer_base:
height_variant: 'big'
background_variant: 'inverted'
background_variant: 'inverted'
links:
- text: Nested section 1
links:
- text: Navigation link 1
href: "#"
- text: Navigation link 2
href: "#"
- text: Navigation link 3
href: "#"
- text: Navigation link 4
href: "#"
- text: A very long navigation link that goes onto two lines
href: "#"
href: "#"
- text: Nested section 2
links:
- text: Navigation link 5
href: "#"
- text: Navigation link 6
href: "#"
- text: Navigation link 7
href: "#"
- text: Navigation link 8
href: "#"
- text: Simple link 1
href: "#"
16 changes: 16 additions & 0 deletions source/_patterns/03-organisms/global/header-base/_header-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@
@include u-padding-left(0);
}

.usa-nav__secondary {
.jcc-nav-secondary__group {
@include at-media(desktop) {
height: auto;
}
}
}

.jcc-nav-secondary__menu {
@include at-media(desktop) {
right: 2rem;
Expand Down Expand Up @@ -236,3 +244,11 @@
top: $jcc-navbar-offset;
}
}

.usa-skipnav {
@include u-display(none);

&:focus {
@include u-display(block);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
{% if header_base.nav_secondary.accordion_button %}
<ul class="jcc-translate usa-accordion">
<li>
<button class="usa-accordion__button usa-accordion__button--has-icon usa-accordion__button--no-toggle usa-nav__link" aria-expanded="false" aria-controls="extended-nav-section-two">
<button class="usa-accordion__button usa-accordion__button--has-icon usa-accordion__button--no-toggle usa-nav__link" aria-expanded="false" aria-controls="{{ header_base.nav_secondary.accordion_button.id }}">
<span class="usa-accordion-button__icon">
{% include '@atoms/icons/icon.twig' with {
icon: header_base.nav_secondary.accordion_button.icon
} %}
</span>
<span class="label">{{ header_base.nav_secondary.accordion_button.label }}</span>
</button>
<ul id="extended-nav-section-two" class="usa-nav__submenu" hidden="">
<ul id="{{ header_base.nav_secondary.accordion_button.id }}" class="usa-nav__submenu" hidden="">
{% for link in header_base.nav_secondary.accordion_button.links %}
<li class="usa-nav__submenu-item"><a href="{{ link.href }}">{{ link.title }}</a></li>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ header_base:
height_variant: 'extended'
background_variant: 'inverted'
primary_nav:
mega: true
mega: true
links:
- text: Current section 2
id: nav-section-three
nav_secondary:
accordion_button:
id: 'extended-nav-section-four'
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
header_base:
height_variant: 'extended'
background_variant: 'inverted'
background_variant: 'inverted'
primary_nav:
links:
- text: Current section 2
id: nav-section-five
nav_secondary:
accordion_button:
id: 'extended-nav-section-six'
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
header_base:
height_variant: 'extended'
primary_nav:
mega: true
mega: true
links:
- text: Current section 2
id: nav-section-seven
nav_secondary:
accordion_button:
id: 'extended-nav-section-eight'
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
header_base:
height_variant: 'extended'
height_variant: 'extended'
primary_nav:
links:
- text: Current section 2
id: nav-section-nine
nav_secondary:
accordion_button:
id: 'extended-nav-section-ten'
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
header_base:
background_variant: 'inverted'
primary_nav:
mega: true
mega: true
links:
- text: Current section 2
id: nav-section-eleven
nav_secondary:
accordion_button:
id: 'extended-nav-section-twelve'
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
header_base:
background_variant: 'inverted'
background_variant: 'inverted'
primary_nav:
links:
- text: Current section 2
id: nav-section-thirteen
nav_secondary:
accordion_button:
id: 'extended-nav-section-fourteen'
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
header_base:
primary_nav:
mega: true
mega: true
links:
- text: Current section 2
id: nav-section-fifteen
nav_secondary:
accordion_button:
id: 'extended-nav-section-sixteen'