From 8ac01e04819458c0178b1cd971a55d99ec65eb0c Mon Sep 17 00:00:00 2001 From: Randall Floyd Date: Tue, 5 Nov 2024 13:07:28 -0500 Subject: [PATCH 1/2] Adds text alternatives to image thumbnails in the File Manager --- app/views/hyrax/base/_file_manager_thumbnail.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/hyrax/base/_file_manager_thumbnail.html.erb b/app/views/hyrax/base/_file_manager_thumbnail.html.erb index 164d3fc118..0a6024b7a3 100644 --- a/app/views/hyrax/base/_file_manager_thumbnail.html.erb +++ b/app/views/hyrax/base/_file_manager_thumbnail.html.erb @@ -1 +1 @@ -<%= document_presenter(node)&.thumbnail&.thumbnail_tag({ class: 'thumbnail-inner mw-100' }, {}) %> +<%= document_presenter(node)&.thumbnail&.thumbnail_tag({ class: 'thumbnail-inner mw-100', 'alt': "Thumbnail image for #{node.title[0]}" }, {}) %> From bdf986e149a93ebd7cca9ced353ae98749c25aa5 Mon Sep 17 00:00:00 2001 From: Randall Floyd Date: Tue, 5 Nov 2024 13:08:18 -0500 Subject: [PATCH 2/2] Adds labels to the edit title form fields in the File Manager --- app/views/hyrax/base/_file_manager_member.html.erb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/views/hyrax/base/_file_manager_member.html.erb b/app/views/hyrax/base/_file_manager_member.html.erb index 68f3b6605c..a3c3af2da4 100644 --- a/app/views/hyrax/base/_file_manager_member.html.erb +++ b/app/views/hyrax/base/_file_manager_member.html.erb @@ -3,7 +3,8 @@ <%= simple_form_for [main_app, node], remote: true, html: {'data-type': 'json'} do |f| %>
- <%= f.input :title, as: :string, input_html: { name: "#{f.object.model_name.singular}[title][]", class: "title" }, value: node.to_s, label: false, hint: false %> + + <%= f.input :title, as: :string, input_html: { name: "#{f.object.model_name.singular}[title][]", class: "title", 'aria-labelledby': "edit_#{f.object.model_name.singular}_title" }, value: node.to_s, label: false, hint: false %>
<% if node.respond_to?(:label) %> -
- (<%= truncate(node.label, length: 29) %>) -
+ <% unless node.label.nil? %> +
+ (<%= truncate(node.label, length: 29) %>) +
+ <% end %> <% end %>