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

Investigate options and evaluate effort to replace blacklight_heatmaps gem #2611

Open
corylown opened this issue Oct 18, 2024 · 1 comment
Open
Assignees

Comments

@corylown
Copy link
Contributor

corylown commented Oct 18, 2024

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 taylor-steve self-assigned this Nov 5, 2024
@taylor-steve
Copy link
Contributor

taylor-steve commented Nov 6, 2024

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:

  • It seems to have the bones of what we want
  • Might be useful in the Blacklight world if it was up to date?

Cons:

  • So out of date it's difficult to evaluate. If all the leaflet integration still works and all it needs is Blacklight/Rails updates it might be only a moderate amount of work.

Write an Exhibits specific solution with Leaflet.markercluster

Pros:

  • All our data seems to be good to go (e.g., can be reduced to centroid points). We could skip all the abstraction and use it directly in its most simple form, which could be the fastest to implement, if we don't mind the high level of coupling.

Cons:

  • Would be less flexible/extensible when future needs change
  • It looks like we'd be fine today with our current exhibits, but if somebody adds an exhibit with 100K+ geo points, I've found it struggles on slower systems. I'm assuming a somewhat direct/naive solution here, otherwise we'd be fixing one of the above?
  • It may require more design because we don't have as many constraints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants