Move main <h1> tag inside main header

A <header> tag is the natural place to have headings.

Since we already had the logo there, IMHO it makes sense to merge both
the <h1> 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 <title> tag, which contains
the organization name as well.
This commit is contained in:
Javi Martín
2020-11-08 15:59:34 +01:00
parent 18813c8f2a
commit bb2e2fa0a3
5 changed files with 4 additions and 8 deletions

View File

@@ -20,11 +20,11 @@
<%= t("application.menu") %> <%= t("application.menu") %>
</span> </span>
<div class="top-bar-title"> <h1 class="top-bar-title">
<%= link_to root_path, accesskey: "0" do %> <%= 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 %> <% end %>
</div> </h1>
<div id="responsive-menu"> <div id="responsive-menu">
<div class="top-bar-right"> <div class="top-bar-right">

View File

@@ -16,8 +16,6 @@
<body class="<%= yield (:body_class) %>"> <body class="<%= yield (:body_class) %>">
<%= raw setting["html.per_page_code_body"] %> <%= raw setting["html.per_page_code_body"] %>
<h1 class="show-for-sr"><%= setting["org_name"] %></h1>
<div class="wrapper <%= yield (:wrapper_class) %>"> <div class="wrapper <%= yield (:wrapper_class) %>">
<%= render "layouts/header", with_subnavigation: true %> <%= render "layouts/header", with_subnavigation: true %>

View File

@@ -12,7 +12,7 @@
<div class="auth-image small-12 medium-3 column"> <div class="auth-image small-12 medium-3 column">
<h1 class="logo margin"> <h1 class="logo margin">
<%= link_to root_path do %> <%= 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 %> <% end %>
</h1> </h1>
</div> </div>

View File

@@ -233,7 +233,6 @@ en:
collaborative_legislation: Collaborative legislation collaborative_legislation: Collaborative legislation
debates: Debates debates: Debates
locale: "Language:" locale: "Language:"
logo: CONSUL logo
management: Management management: Management
moderation: Moderation moderation: Moderation
valuation: Valuation valuation: Valuation

View File

@@ -233,7 +233,6 @@ es:
collaborative_legislation: Legislación colaborativa collaborative_legislation: Legislación colaborativa
debates: Debates debates: Debates
locale: "Idioma:" locale: "Idioma:"
logo: Logo de CONSUL
management: Gestión management: Gestión
moderation: Moderar moderation: Moderar
valuation: Evaluación valuation: Evaluación