Skip to content

Conversation

@acelaya
Copy link
Contributor

@acelaya acelaya commented Sep 26, 2025

Closes #6306

This PR brings back the changes from #5539 and #5570, that we then had to roll back because of the issues reported in https://github.com/hypothesis/support/issues/31

However, by implementing this again I cannot reproduce any of those issues anymore. Since the event handler ignores events not targeting the card itself, it should not be triggered while editing an annotation or interacting with other child controls.

Considerations

I checked what is the role that other apps set in cards for similar use cases.
Bluesky sets link, which I think is not right for us, since our cards do not link anywhere when clicked.
Twitter sets article, which is what I set here, as it seems appropriate.
In previous attempts at fixing this issue, we set button, but I was never convinced that was the right one.

TODO

  • Add tests.

@acelaya acelaya marked this pull request as draft September 26, 2025 09:48
@acelaya acelaya mentioned this pull request Sep 26, 2025
3 tasks
@codecov
Copy link

codecov bot commented Sep 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.51%. Comparing base (808c294) to head (8abe5b9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7339   +/-   ##
=======================================
  Coverage   99.51%   99.51%           
=======================================
  Files         271      271           
  Lines       10977    10983    +6     
  Branches     2621     2625    +4     
=======================================
+ Hits        10924    10930    +6     
  Misses         53       53           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@acelaya acelaya force-pushed the focusable-cards branch 3 times, most recently from 1f6ced3 to bd9abd4 Compare September 30, 2025 09:49
@acelaya acelaya marked this pull request as ready for review September 30, 2025 09:54
@acelaya acelaya merged commit fdfb8ef into main Oct 1, 2025
4 checks passed
@acelaya acelaya deleted the focusable-cards branch October 1, 2025 08:47
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

Successfully merging this pull request may close these issues.

Annotation cards can be interacted with the mouse but not with the keyboard

2 participants