hypothesis / hypothesis/support-legacy

Web text content hidden from user in page is visible in Hypothesis sidebar

Open
#212 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Per user report https://app.hubspot.com/contacts/6291320/ticket/448202145/

While annotating a page at https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4384082 the user noticed that the text displayed in the Hypothesis sidebar did not match the selected on the page.

![Screen Shot 2021-06-25 at 10 09 17 AM](https://user-images.githubusercontent.com/71603629/123437844-1c395300-d59e-11eb-8d84-8d27199642d5.png)

By looking at the HTML we can see that there is content on the page which is styled as `display:none`, so as not to be visible to a reader. Here is an example element from that page:
`{"type":"entrez-nucleotide","attrs":{"text":"JX501334","term_id":"961791677","term_text":"JX501334"}}JX501334`

However, when this text is selected for annotation Hypothesis shows all the content selected, regardless of its styled visibility.

This is unexpected to a user, and can be confusing or appear that there is something wrong.

Further internal discussion https://hypothes-is.slack.com/archives/C2BLQDKHA/p1623787905253900

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the report on the NCBI page linked in the issue and inspect the provided display:none HTML example during text selection. Trace the annotation selection behavior from the affected page and verify that hidden text is excluded from the sidebar while visible selected text remains available.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.