Accessibility: Update heading structure
This ticket populated with info supplied by Harvard.
Issue Description - WCAG standard
Spotlight is not generating the appropriate heading level. The exhibit name in the header is correctly rendered as an H1, the page title is also an H1 and should be an H2, headings within the page are H2s and should be H3s, and headings within a widget's text are H3s and should be H4s.
The true fix is submitting an update to spotlight core.
Method of discovery
Siteimprove, Wave, keyboard navigation, VoiceOver etc.
Steps to Reproduce
Suggested solution
Harvard's notes from their Github ticket are below. They report their solution has been implemented locally.
Below are the files where heading structures may need to be updated. Once they are contributed to core, we can remove our local css heading overrides.
Keeping track of h1’s and h2’s // h1's to h2's // spotlight/dashboards/show.html.erb // spotlight/pages/show.html.erb // spotlight/browse/show.html.erb // spotlight/browse/index.html.erb *added in an h2
// h2's to h3's // _page_activity.html.erb // _reindexing_activity.html.erb // _solr_document_activity.html.erb // _heading_block.html.erb
// _site_sidebar.html.erb changed from h4 to h2
// .blacklight-catalog-show
// h3's to h4's (haven't tested these out, but probably the spots that need updating based on a search&find of h3 in the spotlight repo) // _oembed_block.html.erb // _solr_documents_block.html.erb // _solr_documents_embed_block.html.erb // _solr_documents_grid_block.html.erb
Left nav on Curated Features
The items in the sidebar are probably best created as a list of links with nesting, rather than using headings. We could do an override, but would be best to do this at the core spotlight level.
Related ticket: Github issue #86 (Harvard's repo)
This is related to/overlaps with https://github.com/projectblacklight/spotlight/issues/3473. Issue https://github.com/projectblacklight/spotlight/issues/3473 suggests that resolving this problem may not be as straightforward as adjusting the heading levels. My understanding is that exhibit creators have flexibility to create layouts where we cannot predict what the correct heading within any given widget should be.