Skip to content

Commit c5c6310

Browse files
authored
Merge pull request #192 from BeAPI/feature/menu-fast-access
Feature/menu fast access
2 parents b19f317 + ee48632 commit c5c6310

File tree

7 files changed

+40
-3
lines changed

7 files changed

+40
-3
lines changed

footer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
</main>
2+
<footer id="footer" class="footer" role="contentinfo" aria-label="Pied de page"></footer>
13
<?php wp_footer(); ?>
24
</body>
35
</html>

header.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,17 @@
1919
<?php wp_head(); ?>
2020
</head>
2121
<body <?php body_class(); ?>>
22+
<ul class="skip-links skip-links--hidden" aria-label="Liens d'évitement">
23+
<li>
24+
<a href="#content">Contenu principal</a>
25+
</li>
26+
<li>
27+
<a href="#footer">Pied de page</a>
28+
</li>
29+
</ul>
30+
31+
<header id="header" class="header" role="banner" aria-label="Entête de page"></header>
32+
33+
<main id="content" role="main" tabindex="-1" aria-label="Zone de contenus">
2234
<?php
2335
wp_body_open();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "beapi-frontend-framework",
33
"version": "5.0.0",
4-
"author": "BeAPI",
4+
"author": "Be API",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/BeAPI/beapi-frontend-framework"

src/scss/patterns/_footer.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
.footer {
66
$el: &;
77

8-
padding-bottom: $base-spacing;
98
text-align: center;
109
}

src/scss/patterns/_header.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
*/
44

55
.header {
6+
position: fixed;
7+
top: 0;
8+
right: 0;
9+
left: 0;
610
padding-top: $base-spacing;
711
padding-bottom: $base-spacing;
8-
background-color: $primary-color;
912

1013
&__logo-link {
1114
display: block;

src/scss/patterns/_skip-links.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.skip-links {
2+
position: absolute;
3+
top: 0;
4+
left: 0;
5+
z-index: 10;
6+
display: flex;
7+
padding: .5rem 1rem;
8+
color: $secondary-color;
9+
background-color: $primary-color;
10+
transition: transform .3s ease-in-out;
11+
transform: translate3d(0, -100%, 0);
12+
13+
&:focus-within {
14+
transform: translate3d(0, 0, 0);
15+
}
16+
17+
li:not(:last-of-type) {
18+
margin-right: 1rem;
19+
}
20+
}

src/scss/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ $entry-file-name: "style";
3333
@import "patterns/menu";
3434
@import "patterns/hero";
3535
@import "patterns/searchform";
36+
@import "patterns/skip-links";
3637

3738
// Wordpress
3839

0 commit comments

Comments
 (0)