diff --git a/app/assets/javascripts/context_navigation.js.erb b/app/assets/javascripts/context_navigation.js.erb index 71b8e58..df2b090 100644 --- a/app/assets/javascripts/context_navigation.js.erb +++ b/app/assets/javascripts/context_navigation.js.erb @@ -63,19 +63,19 @@ class ExpandButton { constructor(data) { var collapseIcon = `collapse'>`; var expandIcon = `expand'>`; - + // Find Siblings count var siblingCount = ` 999 `; this.collapseText = collapseIcon + `Hide`+ siblingCount + data.collapse; this.expandText = expandIcon + `Show` + siblingCount + data.expand; - + this.$el = $(``); this.handleClick = this.handleClick.bind(this); this.$el.click(this.handleClick); } - + } /** @@ -187,11 +187,12 @@ class ContextNavigation { const $span = $(''); $span.addClass('divider'); $span.attr('text-position', 'left'); + $span.attr('role', 'listitem'); $ul.append($span); const button = new ExpandButton(this.data); $span.append(button.$el); - + return $ul; } @@ -268,7 +269,7 @@ class ContextNavigation { prevParentList.append(renderedBeforeDocs); - + } else { renderedBeforeDocs = beforeDocs.map(newDoc => newDoc.render()).join(''); } @@ -276,7 +277,7 @@ class ContextNavigation { // Silly but works for now this.ul.append(prevParentList || renderedBeforeDocs); - + let itemDoc = newDocs.slice(newDocIndex, newDocIndex + 1); let renderedItemDoc = itemDoc.map(doc => doc.render()).join(''); @@ -370,7 +371,7 @@ class ContextNavigation { var srOnly = $('h2[data-sr-enable-me]'); toEnable.removeClass('disabled'); toEnable.text(srOnly.data('hasContents')); - srOnly.text(srOnly.data('hasContents')); + srOnly.text(srOnly.data('hasContents')); } showSiblingCount(){ @@ -409,5 +410,5 @@ Blacklight.onLoad(function () { ); contextNavigation.getData(); }); - + }); diff --git a/app/assets/stylesheets/iu-branding.scss b/app/assets/stylesheets/iu-branding.scss index 9cac6b3..f2822db 100644 --- a/app/assets/stylesheets/iu-branding.scss +++ b/app/assets/stylesheets/iu-branding.scss @@ -177,3 +177,14 @@ li.al-collection-context .al-online-content-icon svg, .toggle-delete:hover { text-decoration: none; } + +// Increase contrast ratios for accessibility +.text-muted { + color: #34373a !important; +} + +.facet-values { + .remove { + color: #34373a !important; + } +} diff --git a/app/views/catalog/_index_collection_context_default.html.erb b/app/views/catalog/_index_collection_context_default.html.erb index 6dfe51c..990fe8a 100644 --- a/app/views/catalog/_index_collection_context_default.html.erb +++ b/app/views/catalog/_index_collection_context_default.html.erb @@ -11,7 +11,7 @@ <%= link_to( "##{document.id}-collapsible-hierarchy", class: "al-toggle-view-children #{!show_expanded?(document) ? 'collapsed' : ''}", - 'aria-label': "Toggle children", + 'aria-label': "Children of #{document.level} #{document.normalized_title} #{document.number_of_children}", data: { toggle: 'collapse' } diff --git a/app/views/catalog/_show_collection.html.erb b/app/views/catalog/_show_collection.html.erb new file mode 100644 index 0000000..f7d4d02 --- /dev/null +++ b/app/views/catalog/_show_collection.html.erb @@ -0,0 +1,66 @@ +<% parents = Arclight::Parents.from_solr_document(document).as_parents %> +
+
+ <% if document.digital_objects.present? %> + <%= content_tag :p, class: "media breadcrumb-item breadcrumb-item-#{parents.length + 3}" do %> + + + <%= t('arclight.views.show.online_content_upper') %> + + <%= render_document_partial(document, 'arclight_viewer') %> + <% end %> + <% end %> + + +
+
+ <%= render 'collection_context' %> +
+
+ <%= render 'collection_contents' %> +
+ <% if document.online_content? %> +
+ <%= render partial: 'collection_online_contents', locals: { document: document } %> +
+ <% end %> +
+

<%= t 'arclight.views.show.access' %>

+ <% unless blacklight_config.show.context_access_tab_items.nil? %> + <% items = blacklight_config.show.context_access_tab_items.select { |i| fields_have_content?(@document, i) } %> + <% items.each_with_index do |item, index| %> + <%= render partial: 'access_contents', locals: { document: @document, field_accessor: item, card_index: index} %> + <% end %> + <% end %> +
+
+
+ +
diff --git a/app/views/viewers/_universal_viewer.html.erb b/app/views/viewers/_universal_viewer.html.erb index 625cff0..6c46903 100644 --- a/app/views/viewers/_universal_viewer.html.erb +++ b/app/views/viewers/_universal_viewer.html.erb @@ -3,7 +3,7 @@