Add an ARIA label to site customization images fields

This way it'll be easier for people using screen readers to know which
field they're on.
This commit is contained in:
Javi Martín
2024-10-10 23:47:32 +02:00
parent 331228cb2a
commit 5ca65a787f
2 changed files with 7 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
<%= form_for([:admin, image], html: { id: "edit_#{dom_id(image)}" }) do |f| %>
<div>
<%= image_tag image.image if image.persisted_attachment? %>
<%= f.file_field :image, label: false %>
<%= f.file_field :image, label: false, "aria-label": image.name %>
</div>
<%= f.submit(t("admin.site_customization.images.index.update"), class: "button hollow") %>