Merge pull request #8080 from tchak/dsfr-skiplinks

feat(a11y): add dsfr skiplinks
This commit is contained in:
Paul Chavard 2022-11-22 12:37:05 +01:00 committed by GitHub
commit b185614c87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -29,3 +29,4 @@
@import '@gouvfr/dsfr/dist/component/search/search.css'; @import '@gouvfr/dsfr/dist/component/search/search.css';
@import '@gouvfr/dsfr/dist/component/translate/translate.css'; @import '@gouvfr/dsfr/dist/component/translate/translate.css';
@import '@gouvfr/dsfr/dist/component/pagination/pagination.css'; @import '@gouvfr/dsfr/dist/component/pagination/pagination.css';
@import '@gouvfr/dsfr/dist/component/skiplink/skiplink.css';

View file

@ -0,0 +1,5 @@
.fr-skiplinks
%nav.fr-container{ role: "navigation", 'aria-label': "Accès rapide" }
%ul.fr-skiplinks__list
%li
%a.fr-link{ href: "#contenu" } Contenu

View file

@ -36,6 +36,7 @@
= yield(:invisible_captcha_styles) = yield(:invisible_captcha_styles)
%body{ id: content_for(:page_id), class: browser.platform.ios? ? 'ios' : nil } %body{ id: content_for(:page_id), class: browser.platform.ios? ? 'ios' : nil }
= render partial: 'layouts/skiplinks'
.page-wrapper .page-wrapper
= render partial: "layouts/outdated_browser_banner" = render partial: "layouts/outdated_browser_banner"
= render partial: 'layouts/pre_maintenance' = render partial: 'layouts/pre_maintenance'
@ -45,7 +46,7 @@
Env Test Env Test
= render partial: "layouts/header" = render partial: "layouts/header"
%main{ role: :main } %main#contenu{ role: :main }
= render partial: "layouts/flash_messages" = render partial: "layouts/flash_messages"
= content_for?(:content) ? yield(:content) : yield = content_for?(:content) ? yield(:content) : yield