Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
fix a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
ilaborie committed Jan 25, 2019
1 parent 1e3badd commit a919eee
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 31 deletions.
14 changes: 12 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
<header>{{ i18n "footer_share" }}</header>
<ul>
{{ range .Site.Data.footer.share }}
<li><a class="social-{{ .name }}" title="{{ .name }}" href="{{ .url }}" target="_blank"></a></li>
<li>
<a class="social-{{ .name }}"
title="{{ .name }}"
href="{{ .url }}"
rel="noreferrer"
target="_blank"></a></li>
{{ end }}
</ul>
</div>
Expand All @@ -18,7 +23,11 @@
<header>{{ i18n "footer_follow_us" }}</header>
<ul>
{{ range .Site.Data.footer.follow }}
<li><a class="social-{{ .name }}" title="{{ .name }}" href="{{ .url }}" target="_blank"></a></li>
<li><a class="social-{{ .name }}"
title="{{ .name }}"
href="{{ .url }}"
rel="noreferrer"
target="_blank"></a></li>
{{ end }}
</ul>
</div>
Expand Down Expand Up @@ -55,6 +64,7 @@
<section class="subscribe">
{{ i18n "subscribe_notice" }}
<a class="btn"
rel="noreferrer"
target="_blank"
href="{{ .Site.Params.subscriptionUrl }}">{{ i18n "subscribe_action" }}</a>
</section>
Expand Down
7 changes: 1 addition & 6 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="Description" content="{{ .Site.Params.description }}">

{{/* NOTE: These Hugo Internal Templates can be found starting at
https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
Expand All @@ -17,13 +18,7 @@
{{ end }}

{{ .Hugo.Generator }}

{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}

<title>{{ block "title" . }}{{ .Site.Title }} {{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}</title>

Expand Down
14 changes: 8 additions & 6 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@
<img src="{{ .Site.Params.logos.header }}" alt="logo {{ .Site.Title }}">
</a>
</div>

<input type="checkbox" id="menu-burger" class="visually-hidden"/>
</l>
<input type="checkbox" id="menu-burger" class="visually-hidden" aria-label="Menu"/>

<label for="menu-burger"></label>

<nav>
<ul class="menu">
{{- $currentPage := . -}}
{{ range .Site.Menus.main }}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}" >
{{ if (hasPrefix .URL "http") }}
<a class="external" target="_blank" href="{{ .URL }}">{{ .Name }}</a>
<a class="external" rel="noreferrer" target="_blank" href="{{ .URL }}">{{ .Name }}</a>
{{ else }}
<a class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
{{ end }}
<a href="{{ .URL | absLangURL }}">{{ .Name }}</a>
{{ end }}
</li>
{{ end }}
</ul>

Expand All @@ -27,7 +29,7 @@
<a class="lang {{ if eq .Language $.Site.Home.Language }}active{{ end}}"
title="{{ .Language.LanguageName }}"
href="{{ .Permalink }}">
{{ emojify (printf ":%s:" .Language.LanguageName) }}
{{ emojify (printf ":%s:" .Language.LanguageName) }}
</a>
</li>
{{ end }}
Expand Down
8 changes: 7 additions & 1 deletion layouts/partials/team.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ <h3>{{ .Title }}</h3>
<h4>{{ .Params.subtitle }}</h4>
<ul class="socials">
{{ range .Params.socials }}
<li><a class="social-{{ lower .name }}" title="{{ .name }}" href="{{ .link }}" target="_blank"></a></li>
<li>
<a class="social-{{ lower .name }}"
title="{{ .name }}"
rel="noreferrer"
href="{{ .link }}"
target="_blank"></a>
</li>
{{ end }}
</ul>
</div>
5 changes: 4 additions & 1 deletion layouts/partials/ticket.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
{{ if .soldOut }}
<span class="btn" aria-disabled="true">{{ i18n "home_tickets_soldout" }}</span>
{{ else }}
<a class="btn primary" target="_blank" href="{{ .url }}">{{ i18n "home_tickets_action" }}</a>
<a class="btn primary"
rel="noreferrer"
target="_blank"
href="{{ .url }}">{{ i18n "home_tickets_action" }}</a>
{{ end }}
</div>
5 changes: 4 additions & 1 deletion layouts/sessions/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ <h1 class="text">{{ .Title }}</h1>
{{ end }}

{{ if .Params.presentation }}
<a class="social-slides" href="{{ .Params.presentation }}" target="_blank">Voir les slides</a>
<a class="social-slides"
href="{{ .Params.presentation }}"
rel="noreferrer"
target="_blank">Voir les slides</a>
{{ end }}

</div>
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/home-location.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<a class="btn btn-icon-only icon-direction"
target="_blank"
rel="noreferrer"
aria-label="{{ i18n "home_location_direction" }}"
href="https://www.google.com/maps/dir/?api=1&destination={{ .Get "latitude" }},{{ .Get "longitude" }}"></a>

Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/home-subscribe.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<section class="subscribe primary">
<div class="inner">{{ .Inner }}</div>
<a class="btn primary icon-subscribe"
rel="noreferrer"
target="_blank"
href="{{ .Site.Params.subscriptionUrl }}">{{ i18n "subscribe_action" }}</a>
</section>
5 changes: 4 additions & 1 deletion layouts/shortcodes/ticket.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{{ if .Get "soldOut" }}
<span class="btn" aria-disabled="true">{{ i18n "home_tickets_soldout" }}</span>
{{ else }}
<a class="btn primary icon-ticket" target="_blank" href="{{ .Get "url" }}">{{ i18n "home_tickets_action" }}</a>
<a class="btn primary icon-ticket"
rel="noreferrer"
target="_blank"
href="{{ .Get "url" }}">{{ i18n "home_tickets_action" }}</a>
{{ end }}
</div>
5 changes: 4 additions & 1 deletion layouts/speakers/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ <h1>{{ .Page.Params.name }}</h1>
<ul class="socials">
{{ range .Page.Params.socials }}
<li>
<a class="social-{{ .icon }}" href="{{ .link }}" target="_blank">{{ .name }}</a>
<a class="social-{{ .icon }}"
href="{{ .link }}"
rel="noreferrer"
target="_blank">{{ .name }}</a>
</li>
{{ end }}
</ul>
Expand Down
3 changes: 2 additions & 1 deletion src/style/_root.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

--base: #FFF;
--base-text: #424242;
--base-secondary-text: #757575;
--base-secondary-text: #636363;
--link-secondary-text: #525252;

--darken-1: rgba(0, 0, 0, .125);
--darken-2: rgba(0, 0, 0, .25);
Expand Down
3 changes: 2 additions & 1 deletion src/style/partials/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ body > footer {
display: flex;
flex-direction: column;

a {
a.btn {
align-self: flex-start;
color: var(--link-secondary-text);
}
}

Expand Down
21 changes: 12 additions & 9 deletions src/style/partials/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,31 @@ body > header {
list-style: none;
}

li {
opacity: .6;
transition: all var(--animation);
border-bottom: medium solid transparent;
border-radius: 5%;

&.active {
opacity: 1;
border-bottom-color: currentColor;
}
}

a {
display: block;
text-transform: uppercase;
padding: 0 var(--space-3);
text-decoration: none;
line-height: calc(var(--toolbar-height) - (4 * var(--space-2)));;
color: inherit;
opacity: .5;
font-weight: 200;
transition: all var(--animation);
border-bottom: medium solid transparent;
border-radius: 5%;

&:focus, &:hover {
text-shadow: var(--extruded-dark);
opacity: .75;
}

&.active {
opacity: 1;
border-bottom-color: currentColor;
}
}

.languages a.active {
Expand Down
2 changes: 1 addition & 1 deletion static/theme.css

Large diffs are not rendered by default.

0 comments on commit a919eee

Please sign in to comment.