Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes accessibility issues with the member image partials in the File Manager #6962

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]}" }, {}) %>
Loading