Add aria-label to markers in admin map settings

We forgot to do so in commit b896fc4bb. Back then, we said:

> Note that we aren't providing a proper aria-label for markers on the
> map we use in the form to create a proposal or an investment. Adding
> one isn't trivial given the current code, and keyboard users can't add
> a marker in the first place. We'll have to revisit this issue when we
> add keyboard support for this.

However, in the admin section, the marker is already there, so it should
have a label. In this case, we're using the coordinates as label because
it's the most relevant text for the marker in the context of a form. We
could also use "Default map location" instead, but that information is
already present on the page.

Axe was reporting the same accessibility error we mentioned in commit
b896fc4bb in this situation.
This commit is contained in:
Javi Martín
2025-11-17 01:08:22 +01:00
parent 1693aa5d9c
commit 99696cb302
5 changed files with 58 additions and 1 deletions

View File

@@ -328,6 +328,7 @@ en:
tags_placeholder: "Enter the tags you would like to use, separated by commas (',')"
map_location: "Map location"
map_location_instructions: "Navigate the map to the location and place the marker."
map_marker_coordinates: "Latitude: %{latitude}. Longitude: %{longitude}"
map_remove_marker: "Remove map marker"
index:
featured_proposals: Featured

View File

@@ -328,6 +328,7 @@ es:
tags_placeholder: "Escribe las etiquetas que desees separadas por coma (',')"
map_location: "Ubicación en el mapa"
map_location_instructions: "Navega por el mapa hasta la ubicación y coloca el marcador."
map_marker_coordinates: "Latitud: %{latitude}. Longitud: %{longitude}"
map_remove_marker: "Eliminar el marcador"
index:
featured_proposals: Destacadas