diff --git a/app/javascript/entrypoints/main.css b/app/javascript/entrypoints/main.css index f2ac351d2..5a3d2f066 100644 --- a/app/javascript/entrypoints/main.css +++ b/app/javascript/entrypoints/main.css @@ -29,3 +29,4 @@ @import '@gouvfr/dsfr/dist/component/search/search.css'; @import '@gouvfr/dsfr/dist/component/translate/translate.css'; @import '@gouvfr/dsfr/dist/component/pagination/pagination.css'; +@import '@gouvfr/dsfr/dist/component/skiplink/skiplink.css'; diff --git a/app/views/layouts/_skiplinks.html.haml b/app/views/layouts/_skiplinks.html.haml new file mode 100644 index 000000000..b7ad3fb9c --- /dev/null +++ b/app/views/layouts/_skiplinks.html.haml @@ -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 diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index afc4783da..da732a03e 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -36,6 +36,7 @@ = yield(:invisible_captcha_styles) %body{ id: content_for(:page_id), class: browser.platform.ios? ? 'ios' : nil } + = render partial: 'layouts/skiplinks' .page-wrapper = render partial: "layouts/outdated_browser_banner" = render partial: 'layouts/pre_maintenance' @@ -45,7 +46,7 @@ Env Test = render partial: "layouts/header" - %main{ role: :main } + %main#contenu{ role: :main } = render partial: "layouts/flash_messages" = content_for?(:content) ? yield(:content) : yield