-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add alt text to thumbnails * Add text to alt description * Distinguish alt text from link text
- Loading branch information
Showing
7 changed files
with
144 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<%# [hyc-override] https://github.com/samvera/hyrax/blob/hyrax-v4.0.0/app/views/catalog/_thumbnail_list_collection.html.erb %> | ||
<%# [hyc-override] Add alt text for thumbnails @todo can be removed when fixed upstream %> | ||
<div class="col-md-3"> | ||
<%= document_presenter(document)&.thumbnail&.thumbnail_tag({ alt: "Thumbnail for #{document.title_or_label}" }, { suppress_link: true }) %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<%# [hyc-override] https://github.com/samvera/hyrax/blob/hyrax-v4.0.0/app/views/catalog/_thumbnail_list_default.html.erb %> | ||
<%# [hyc-override] Add alt text for thumbnails @todo can be removed when fixed upstream %> | ||
<% model = document.hydra_model %> | ||
<div class="col-md-3"> | ||
<% if model == Hyrax::PcdmCollection || model < Hyrax::PcdmCollection %> | ||
<%= document_presenter(document)&.thumbnail&.thumbnail_tag({ alt: "Thumbnail for #{document.title_or_label}"}, suppress_link: true) %> | ||
<% else %> | ||
<div class="list-thumbnail"> | ||
<%= document_presenter(document)&.thumbnail&.thumbnail_tag({ alt: "Thumbnail for #{document.title_or_label }" }) %> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<%# https://github.com/samvera/hyrax/blob/hyrax-v4.0.0/app/views/hyrax/admin/admin_sets/show.html.erb %> | ||
<%# [hyc-override] Add alt text for thumbnails @todo can be removed when fixed upstream %> | ||
<% provide :page_header do %> | ||
<h1><span class="fa fa-sitemap" aria-hidden="true"></span> <%= t('.header') %></h1> | ||
<% end %> | ||
|
||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="card"> | ||
<%= render 'show_actions', presenter: @presenter %> | ||
|
||
<div class="card-body admin-set row"> | ||
<div class="col-md-2"> | ||
<% if has_thumbnail? @presenter.solr_document %> | ||
<div class="document-thumbnail"> | ||
<%= render_thumbnail_tag(@presenter.solr_document, { alt: 'thumbnail' }, { suppress_link: true }) %> | ||
</div> | ||
<% else %> | ||
<span class="fa fa-sitemap collection-icon-search" aria-hidden="true"></span> | ||
<% end %> | ||
</div> | ||
<div class="col-md-10"> | ||
<%= render 'collection_description', presenter: @presenter %> | ||
<%= render 'show_descriptions' %> | ||
</div> | ||
</div> | ||
|
||
<div class="card-body admin-set-members"> | ||
<h3><%= t '.item_list_header' %></h3> | ||
<%= render 'sort_and_per_page', collection: @presenter %> | ||
|
||
<%= render_document_index @member_docs %> | ||
|
||
<%= render 'paginate' %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<%# https://github.com/samvera/hyrax/blob/hyrax-v4.0.0/app/views/hyrax/base/_file_manager_thumbnail.html.erb %> | ||
<%# [hyc-override] Add alt text for thumbnails @todo can be removed when fixed upstream %> | ||
<%= document_presenter(node)&.thumbnail&.thumbnail_tag({ alt: 'thumbnail', class: 'thumbnail-inner mw-100' }, {}) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<%# https://github.com/samvera/hyrax/blob/hyrax-v4.0.0/app/views/hyrax/collections/_list_works.html.erb %> | ||
<%# [hyc-override] Add alt text for thumbnails @todo can be removed when fixed upstream %> | ||
<tr id="document_<%= document.id %>"> | ||
|
||
<td> | ||
<label for="batch_document_<%= document.id %>" class="sr-only"><%= t("hyrax.dashboard.my.sr.batch_checkbox") %></label> | ||
<%= render 'hyrax/batch_select/add_button', document: document %> | ||
</td> | ||
|
||
<td> | ||
<div class='media'> | ||
<%= link_to [main_app, document], class: 'media-left', 'aria-hidden' => true do %> | ||
<%= document_presenter(document)&.thumbnail&.thumbnail_tag( | ||
{ alt: "Thumbnail for #{document.title_or_label}", class: 'd-none d-md-block file_listing_thumbnail' }, { suppress_link: true } | ||
) %> | ||
<% end %> | ||
|
||
<div class='media-body'> | ||
<div class='media-heading'> | ||
|
||
<%= link_to [main_app, document], id: "src_copy_link#{document.id}", class: 'document-title' do %> | ||
<span class="sr-only"> | ||
<%= t("hyrax.dashboard.my.sr.show_label") %> | ||
</span> | ||
<%= document.title_or_label %> | ||
<% end %> | ||
|
||
<br /> | ||
<%= render_collection_links(document) %> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</td> | ||
|
||
<td class="date"><%= document.date_uploaded %></td> | ||
<td class='text-center'> | ||
<span class="fa <%= current_user.trophies.where(work_id: document.id).exists? ? 'fa-star highlighted-work' : 'fa-star-o trophy-off' %>" aria-hidden="true"></span></td> | ||
<td><%= render_visibility_link document %></td> | ||
</tr> |
44 changes: 44 additions & 0 deletions
44
app/views/hyrax/dashboard/collections/_list_works.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<%# https://github.com/samvera/hyrax/blob/hyrax-v4.0.0/app/views/hyrax/dashboard/collections/_list_works.html.erb %> | ||
<%# [hyc-override] Add alt text for thumbnails @todo can be removed when fixed upstream %> | ||
<tr id="document_<%= document.id %>"> | ||
|
||
<td> | ||
<label for="batch_document_<%= document.id %>" class="sr-only"><%= t("hyrax.dashboard.my.sr.batch_checkbox") %></label> | ||
<%= render 'hyrax/batch_select/add_button', document: document %> | ||
</td> | ||
|
||
<td> | ||
<div class='media'> | ||
<%= link_to [main_app, document], class: 'media-left', 'aria-hidden': true do %> | ||
<%= document_presenter(document)&.thumbnail&.thumbnail_tag( | ||
{ class: 'd-none d-md-block file_listing_thumbnail', alt: "Thumbnail for #{document.title_or_label}" }, { suppress_link: true } | ||
) %> | ||
<% end %> | ||
|
||
<div class='media-body'> | ||
<div class='media-heading'> | ||
|
||
<%= link_to [main_app, document], id: "src_copy_link#{document.id}", class: 'document-title' do %> | ||
<span class="sr-only"> | ||
<%= t("hyrax.dashboard.my.sr.show_label") %> | ||
</span> | ||
<%= document.title_or_label %> | ||
<% end %> | ||
|
||
<br /> | ||
<%= render_collection_links(document) %> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</td> | ||
|
||
<td class="date"><%= document.date_uploaded %></td> | ||
<td class='text-center'> | ||
<span class="fa <%= current_user.trophies.where(work_id: document.id).exists? ? 'fa-star highlighted-work' : 'fa-star-o trophy-off' %>" aria-hidden="true"></span></td> | ||
<td><%= render_visibility_link document %></td> | ||
|
||
<td> | ||
<%= render 'work_action_menu', document: document %> | ||
</td> | ||
</tr> |