Skip to content

Commit

Permalink
Merge pull request #6962 from samvera/issues-6812_6813
Browse files Browse the repository at this point in the history
Fixes accessibility issues with the member image partials in the File Manager
  • Loading branch information
dlpierce authored Nov 6, 2024
2 parents 153d573 + bdf986e commit 83413b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions app/views/hyrax/base/_file_manager_member.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
<%= simple_form_for [main_app, node], remote: true, html: {'data-type': 'json'} do |f| %>
<div class="card-header">
<div class="order-title">
<%= f.input :title, as: :string, input_html: { name: "#{f.object.model_name.singular}[title][]", class: "title" }, value: node.to_s, label: false, hint: false %>
<label class="sr-only" id='<%= "edit_#{f.object.model_name.singular}_title" %>'>Edit title</label>
<%= 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 %>
</div>
<div class="file-set-link float-right">
<%= link_to contextual_path(node, @presenter), title: "Edit file" do %>
<span class="fa fa-pencil" aria-hidden="true"></span>
<% end %>
</div>
<% if node.respond_to?(:label) %>
<div class="order-filename">
<em title="<%= node.page_title %>">(<%= truncate(node.label, length: 29) %>)</em>
</div>
<% unless node.label.nil? %>
<div class="order-filename" >
<em title="<%= node.page_title %>">(<%= truncate(node.label, length: 29) %>)</em>
</div>
<% end %>
<% end %>
</div>
<div class="card-body">
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/base/_file_manager_thumbnail.html.erb
Original file line number Diff line number Diff line change
@@ -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]}" }, {}) %>

0 comments on commit 83413b6

Please sign in to comment.