sul-dlss / exhibits

Stanford University Libraries online exhibits showcase
https://exhibits.stanford.edu
Other
20 stars 7 forks source link

Investigate options and evaluate effort to replace blacklight_heatmaps gem #2611

Open corylown opened 1 month ago

corylown commented 1 month ago

The existing blacklight_heatmaps gem has both accessibility issues and an accumulation of feature requests/suggestions:

Would need significant accessibility design and technical work to improve the gem. Nick pointed out more recent plugins that could be swapped in.

From Alan's notes:

Discussion with EarthWorks team and SODA:

Feedback from Nick: “Heatmaps are a contested feature of GBL, I think – the big ten geo portal at https://geo.btaa.org/ notably uses clustering (which is similar) for its map, but I’m not sure if any other institutions do. Some of the work that the GBL UX committee did touches on heatmaps too, iirc.” https://github.com/Leaflet/Leaflet.markercluster

Current heatmap example: https://exhibits.stanford.edu/virtual-tribunals/catalog?q=&search_field=search&view=heatmaps

Possible solutions: If the map view were keyboard navigable (i.e., panning and zooming), we could add an auto-updating filtered list alongside the map (or, update the filter in the other view options List view, Gallery view, etc. to correspond to the selected map region). This would satisfy map a11y requirements without necessarily needing to make the heatmap zones themselves keyboard navigable.

Replace the heatmap with a marker/cluster map that is keyboard navigable: https://github.com/Leaflet/Leaflet.markercluster

See for example: https://geo.btaa.org/.

The goal of this issue is to investigate these options, evalute pros/cons and level of effort.

taylor-steve commented 2 weeks ago

I think this is difficult to fully evaluate in terms of effort until we have a design for what an accessible results list looks like, and possibly how that interacts with the map. I think that's the initial key factor here.

Here's a summary of my understanding of #490: Problem Suggestion
The map seems small vertically Resize the map
The clickable heatmap cells feel disconnected from the results list. E.g., if two cells are in the same view, clicking one or the other may not alter the results displayed. Associate the displayed results more closely with the heatmap cell being interacted with in some way
The results list obscures the much of the map, including results that are hidden behind the list
The results list does not clearly indicate how many items are in the list Add a scrollbar to the list
The map is initially displayed with a large zoom level, even if the items are isolated to a specific area
Listing titles only in the results list is limiting Incorporate images, possibly via hover over

I think #504 is out of scope for this issue because it only pertains to the item level view?

The tricky a11y concerns from #1813 are all about the search results list. As Jack pointed out, leaflet has keyboard navigation. I think the concerns are clearly listed in that issue, so I won't duplicate them here.

Existing Solutions

Blacklight Heatmaps

https://github.com/sul-dlss/blacklight_heatmaps

Pros:

Cons:

Blacklight::Maps

https://github.com/projectblacklight/blacklight-maps

Pros:

Cons:

Write an Exhibits specific solution with Leaflet.markercluster

Pros:

Cons: