From bb2e2fa0a3f488adb6a8d9a7841c276850ae7cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 8 Nov 2020 15:59:34 +0100 Subject: [PATCH] Move main

tag inside main header A
tag is the natural place to have headings. Since we already had the logo there, IMHO it makes sense to merge both the

tag and the logo together. We were already doing so in the devise layout. From the sceen reader users' point of view, having a link with the text "CONSUL logo" is a bit confusing, since it seems to imply the link will get us to the CONSUL logo. Using the organization name as the text of the link makes more sense. One thing changes, though. Before this commit, the first thing on the page a screen reader user would hear about would be the organization name. Now the language selector and the top links are announced before the organization name is read. That's fine, since the actual first thing these users will hear is the content of the tag, which contains the organization name as well. --- app/views/layouts/_header.html.erb | 6 +++--- app/views/layouts/application.html.erb | 2 -- app/views/layouts/devise.html.erb | 2 +- config/locales/en/general.yml | 1 - config/locales/es/general.yml | 1 - 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index a65f1a8b0..ceba47231 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -20,11 +20,11 @@ <%= t("application.menu") %> </span> - <div class="top-bar-title"> + <h1 class="top-bar-title"> <%= link_to root_path, accesskey: "0" do %> - <%= image_tag(image_path_for("logo_header.png"), class: "float-left", alt: t("layouts.header.logo")) %> + <%= image_tag(image_path_for("logo_header.png"), class: "float-left", alt: setting["org_name"]) %> <% end %> - </div> + </h1> <div id="responsive-menu"> <div class="top-bar-right"> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 21cddf561..f8ec90b25 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -16,8 +16,6 @@ <body class="<%= yield (:body_class) %>"> <%= raw setting["html.per_page_code_body"] %> - <h1 class="show-for-sr"><%= setting["org_name"] %></h1> - <div class="wrapper <%= yield (:wrapper_class) %>"> <%= render "layouts/header", with_subnavigation: true %> diff --git a/app/views/layouts/devise.html.erb b/app/views/layouts/devise.html.erb index d5d6f902f..cf6753750 100644 --- a/app/views/layouts/devise.html.erb +++ b/app/views/layouts/devise.html.erb @@ -12,7 +12,7 @@ <div class="auth-image small-12 medium-3 column"> <h1 class="logo margin"> <%= link_to root_path do %> - <%= image_tag(image_path_for("logo_header.png"), class: "float-left", alt: t("layouts.header.logo")) %> + <%= image_tag(image_path_for("logo_header.png"), class: "float-left", alt: setting["org_name"]) %> <% end %> </h1> </div> diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index dd02281b4..293e3b4e7 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -233,7 +233,6 @@ en: collaborative_legislation: Collaborative legislation debates: Debates locale: "Language:" - logo: CONSUL logo management: Management moderation: Moderation valuation: Valuation diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index fa7bfaf29..660cc7835 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -233,7 +233,6 @@ es: collaborative_legislation: Legislación colaborativa debates: Debates locale: "Idioma:" - logo: Logo de CONSUL management: Gestión moderation: Moderar valuation: Evaluación