From 9da0fa5ecbff8adc5e6e91c7cf22546755a91f77 Mon Sep 17 00:00:00 2001
From: Tom Hughes
Date: Thu, 20 Aug 2026 22:17:36 +0100
Subject: [PATCH] Add labels to nav elements and enable
html-navigation-has-label (#7336)
---
.herb.yml | 2 ++
app/views/application/_pagination.html.erb | 2 +-
app/views/dashboards/_contact.html.erb | 2 +-
app/views/dashboards/show.html.erb | 4 ++--
app/views/diary_entries/_diary_entry.html.erb | 2 +-
app/views/diary_entries/_navigation.html.erb | 2 +-
app/views/elements/show.html.erb | 2 +-
app/views/issues/show.html.erb | 2 +-
app/views/layouts/_header.html.erb | 2 +-
.../moderation_zones/_navigation.html.erb | 2 +-
app/views/notes/_notes_paging_nav.html.erb | 2 +-
app/views/old_elements/_actions.html.erb | 2 +-
app/views/old_elements/index.html.erb | 2 +-
app/views/traces/_trace.html.erb | 2 +-
app/views/traces/index.html.erb | 2 +-
app/views/users/show.html.erb | 4 ++--
config/locales/en.yml | 20 +++++++++++++++++++
17 files changed, 39 insertions(+), 17 deletions(-)
diff --git a/.herb.yml b/.herb.yml
index 43d0f7e92..4ed90c978 100644
--- a/.herb.yml
+++ b/.herb.yml
@@ -28,6 +28,8 @@ linter:
enabled: false
erb-strict-locals-required:
enabled: true
+ html-navigation-has-label:
+ enabled: true
html-no-space-in-tag:
enabled: true
html-no-title-attribute:
diff --git a/app/views/application/_pagination.html.erb b/app/views/application/_pagination.html.erb
index 6b827708b..5c0a3d6a7 100644
--- a/app/views/application/_pagination.html.erb
+++ b/app/views/application/_pagination.html.erb
@@ -3,7 +3,7 @@
<% if paginator.older_items_cursor || paginator.newer_items_cursor %>
<% translation_scope ||= "application.pagination.#{controller.controller_name}" %>
-
-
+ ">
- <%= link_to t("users.show.send message"), new_message_path(contact) %>
-
diff --git a/app/views/dashboards/show.html.erb b/app/views/dashboards/show.html.erb
index ba45237b0..9ecfc7cd6 100644
--- a/app/views/dashboards/show.html.erb
+++ b/app/views/dashboards/show.html.erb
@@ -29,7 +29,7 @@
<% if @followings.empty? %>
<%= t ".no followings" %>
<% else %>
-
+ ">
- <%= link_to t(".followed_changesets"), friend_changesets_path %>
- <%= link_to t(".followed_diaries"), friends_diary_entries_path %>
@@ -47,7 +47,7 @@
<% if @nearby_users.empty? %>
<%= t ".no nearby users" %>
<% else %>
-
+ ">
- <%= link_to t(".nearby_changesets"), nearby_changesets_path %>
- <%= link_to t(".nearby_diaries"), nearby_diary_entries_path %>
diff --git a/app/views/diary_entries/_diary_entry.html.erb b/app/views/diary_entries/_diary_entry.html.erb
index b7c046ddd..bac11e553 100644
--- a/app/views/diary_entries/_diary_entry.html.erb
+++ b/app/views/diary_entries/_diary_entry.html.erb
@@ -19,7 +19,7 @@
<%= render :partial => "location", :object => diary_entry %>
<% end %>
-
+ ">
<% if params[:action] == 'index' %>
- <%= link_to t(".comment_link"), diary_entry_path(diary_entry.user, diary_entry, :anchor => "newcomment") %>
diff --git a/app/views/diary_entries/_navigation.html.erb b/app/views/diary_entries/_navigation.html.erb
index 1e1162438..3e92cb875 100644
--- a/app/views/diary_entries/_navigation.html.erb
+++ b/app/views/diary_entries/_navigation.html.erb
@@ -1,6 +1,6 @@
<%# locals: (user:, languages: []) %>
-
+">
<% unless params[:friends] or params[:nearby] -%>
- <%= rss_link_to :action => "rss", :language => params[:language] %>
diff --git a/app/views/elements/show.html.erb b/app/views/elements/show.html.erb
index cfbf0f71d..57fe3089b 100644
--- a/app/views/elements/show.html.erb
+++ b/app/views/elements/show.html.erb
@@ -14,7 +14,7 @@
<% end %>
-
+">
-
<%= tag.span t(@type, :scope => "browse.versions_navigation"), :class => "py-1 px-2 rounded bg-body-secondary" %>
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 0c92e140f..adae73d60 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -25,7 +25,7 @@
<% end %>
-
+">
<% if @issue.may_resolve? %>
- <%= link_to t(".resolve"), resolve_issue_url(@issue), :method => :post %>
diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb
index a4dc94c85..3be1a06bb 100644
--- a/app/views/layouts/_header.html.erb
+++ b/app/views/layouts/_header.html.erb
@@ -13,7 +13,7 @@