Make annotation cards focusable #7339
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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