From 30a463b368e4ddded81eff0f83297f5929c0554b Mon Sep 17 00:00:00 2001 From: Marwin Hochfelsner <50826859+hlfan@users.noreply.github.com> Date: Thu, 6 Aug 2026 18:18:26 +0000 Subject: [PATCH] Force SVG images to have accessible text --- .herb.yml | 2 ++ app/views/directions/show.html.erb | 2 +- app/views/layouts/_markers.html.erb | 2 +- app/views/layouts/_search.html.erb | 2 ++ app/views/notes/index.html.erb | 3 ++- config/locales/en.yml | 2 ++ 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.herb.yml b/.herb.yml index 94d7b9c46..0ca28cad0 100644 --- a/.herb.yml +++ b/.herb.yml @@ -2,6 +2,8 @@ version: 0.10.3 linter: rules: + a11y-svg-has-accessible-text: + enabled: true actionview-no-silent-helper: enabled: false erb-no-unused-expressions: diff --git a/app/views/directions/show.html.erb b/app/views/directions/show.html.erb index 53ea12a19..92c0dac55 100644 --- a/app/views/directions/show.html.erb +++ b/app/views/directions/show.html.erb @@ -1,6 +1,6 @@ <% content_for(:content_class) { "overlay-sidebar" } %> - +
+ <%= t("site.search.marker_from") %> @@ -61,6 +62,7 @@
+ <%= t("site.search.marker_to") %> diff --git a/app/views/notes/index.html.erb b/app/views/notes/index.html.erb index 50e98e5fa..78fb0bee1 100644 --- a/app/views/notes/index.html.erb +++ b/app/views/notes/index.html.erb @@ -49,7 +49,8 @@ else { :alt_text => ".open", :icon => "cross", :color => "var(--marker-red)" } end %> - + + <%= t note_marker[:alt_text] %> <%= tag.use :href => "#pin-#{note_marker[:icon]}", :color => note_marker[:color] %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 4c5fd8d89..fd58ca1ff 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2735,6 +2735,8 @@ en: get_directions_title: "Find directions between two points" from: "From" to: "To" + marker_from: "Route start marker" + marker_to: "Route end marker" where_am_i: "Where is this?" where_am_i_title: Describe the current location using the search engine submit_text: "Go" -- 2.47.3