Improve accessibility features
This commit is contained in:
parent
b138a0df21
commit
d5d951c8df
8 changed files with 112 additions and 48 deletions
|
@ -21,13 +21,13 @@
|
|||
<div class="header-bar">
|
||||
|
||||
<div class="header-bar__logo" aria-hidden="true">
|
||||
<a class="header-bar__logo-link" href="{{ site.homePage.url }}" target="_self" aria-label="Accéder à la page d'accueil de {{ site.title }}">
|
||||
<a class="header-bar__logo-link" href="{{ site.homePage.url }}" target="_self" aria-label="Accéder à la page d'accueil de {{ site.title }}" tabindex="-1">
|
||||
<h1 class="header-bar__logo-title">{{ site.title }}</h1>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<nav class="header-bar__nav" aria-label="Menu">
|
||||
<button class="header-bar__nav-button" tabindex="-1" aria-hidden="true">
|
||||
<button class="header-bar__nav-button" aria-hidden="true" tabindex="-1">
|
||||
<svg viewBox="0 0 48 48" fill="currentColor">
|
||||
<path d="M7.5 36Q6.85 36 6.425 35.575Q6 35.15 6 34.5Q6 33.85 6.425 33.425Q6.85 33 7.5 33H30.5Q31.15 33 31.575 33.425Q32 33.85 32 34.5Q32 35.15 31.575 35.575Q31.15 36 30.5 36ZM7.5 25.4Q6.85 25.4 6.425 24.975Q6 24.55 6 23.9Q6 23.25 6.425 22.825Q6.85 22.4 7.5 22.4H24.5Q25.15 22.4 25.575 22.825Q26 23.25 26 23.9Q26 24.55 25.575 24.975Q25.15 25.4 24.5 25.4ZM7.5 15Q6.85 15 6.425 14.575Q6 14.15 6 13.5Q6 12.85 6.425 12.425Q6.85 12 7.5 12H30.5Q31.15 12 31.575 12.425Q32 12.85 32 13.5Q32 14.15 31.575 14.575Q31.15 15 30.5 15ZM34.75 23.95 41 30.2Q41.45 30.65 41.425 31.25Q41.4 31.85 40.95 32.3Q40.5 32.75 39.875 32.75Q39.25 32.75 38.8 32.3L31.5 25Q31.05 24.55 31.05 23.95Q31.05 23.35 31.5 22.9L38.8 15.6Q39.25 15.15 39.875 15.15Q40.5 15.15 40.95 15.6Q41.4 16.05 41.4 16.675Q41.4 17.3 40.95 17.75Z"/>
|
||||
</svg>
|
||||
|
@ -35,40 +35,54 @@
|
|||
<path d="M24 26.1 13.5 36.6Q13.05 37.05 12.45 37.05Q11.85 37.05 11.4 36.6Q10.95 36.15 10.95 35.55Q10.95 34.95 11.4 34.5L21.9 24L11.4 13.5Q10.95 13.05 10.95 12.45Q10.95 11.85 11.4 11.4Q11.85 10.95 12.45 10.95Q13.05 10.95 13.5 11.4L24 21.9L34.5 11.4Q34.95 10.95 35.55 10.95Q36.15 10.95 36.6 11.4Q37.05 11.85 37.05 12.45Q37.05 13.05 36.6 13.5L26.1 24L36.6 34.5Q37.05 34.95 37.05 35.55Q37.05 36.15 36.6 36.6Q36.15 37.05 35.55 37.05Q34.95 37.05 34.5 36.6Z"/>
|
||||
</svg>
|
||||
</button>
|
||||
<ul class="header-bar__nav-menu">
|
||||
<ul class="header-bar__nav-menu" tabindex="-1">
|
||||
{% set headerNavItemNo = 1 %}
|
||||
{% if site.homePage.isActive %}
|
||||
<li class="header-bar__nav-item-{{ headerNavItemNo }} header-bar__nav-item--active">
|
||||
<a href="{{ site.homePage.url }}" target="_self">{{ site.homePage.title }}</a>
|
||||
<div>
|
||||
<a href="{{ site.homePage.url }}" target="_self" aria-current="page">{{ site.homePage.title }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="header-bar__nav-item-{{ headerNavItemNo }}">
|
||||
<a href="{{ site.homePage.url }}" target="_self">{{ site.homePage.title }}</a>
|
||||
<div>
|
||||
<a href="{{ site.homePage.url }}" target="_self">{{ site.homePage.title }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% set headerNavItemNo = headerNavItemNo + 1 %}
|
||||
{% if pages.template('biography').first.isActive %}
|
||||
<li class="header-bar__nav-item-{{ headerNavItemNo }} header-bar__nav-item--active">
|
||||
<a href="{{ pages.template('biography').first.url }}" target="_self">{{ pages.template('biography').first.title }}</a>
|
||||
<div>
|
||||
<a href="{{ pages.template('biography').first.url }}" target="_self" aria-current="page">{{ pages.template('biography').first.title }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="header-bar__nav-item-{{ headerNavItemNo }}">
|
||||
<a href="{{ pages.template('biography').first.url }}" target="_self">{{ pages.template('biography').first.title }}</a>
|
||||
<div>
|
||||
<a href="{{ pages.template('biography').first.url }}" target="_self">{{ pages.template('biography').first.title }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% set headerNavItemNo = headerNavItemNo + 1 %}
|
||||
<li class="header-bar__nav-item-{{ headerNavItemNo }}">
|
||||
<span>Galeries</span>
|
||||
<div>
|
||||
<span>Galeries</span>
|
||||
</div>
|
||||
<ul>
|
||||
{% for gallery in pages.template('gallery') %}
|
||||
{% set headerNavItemNo = headerNavItemNo + 1 %}
|
||||
{% if gallery.isActive %}
|
||||
<li class="header-bar__nav-item-{{ headerNavItemNo }} header-bar__nav-item--active">
|
||||
<a href="{{ gallery.url }}" target="_self">{{ gallery.title }}</a>
|
||||
<div>
|
||||
<a href="{{ gallery.url }}" target="_self" aria-current="page">{{ gallery.title }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="header-bar__nav-item-{{ headerNavItemNo }}">
|
||||
<a href="{{ gallery.url }}" target="_self">{{ gallery.title }}</a>
|
||||
<div>
|
||||
<a href="{{ gallery.url }}" target="_self">{{ gallery.title }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
{% block main %}
|
||||
<main>
|
||||
|
||||
<section class="home-section">
|
||||
<section class="home-section" aria-hidden="true">
|
||||
|
||||
<div class="home">
|
||||
<nav class="home__nav" aria-label="Menu">
|
||||
{% set navItemNo = 1 %}
|
||||
{% for gallery in pages.template('gallery') %}
|
||||
<div class="home__nav-item-{{ navItemNo }}">
|
||||
<a href="{{ gallery.url }}" target="_self" class="home__nav-link">{{ gallery.title }}</a>
|
||||
<a href="{{ gallery.url }}" target="_self" class="home__nav-link" tabindex="-1">{{ gallery.title }}</a>
|
||||
</div>
|
||||
{% set navItemNo = navItemNo + 1 %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue