hypothesis / support-legacy

a place for tracking support-related work and projects
3 stars 0 forks source link

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

Open mattdricker opened 3 years ago

mattdricker commented 3 years ago

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

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: <span class="tag-json" style="display:none">{"type":"entrez-nucleotide","attrs":{"text":"JX501334","term_id":"961791677","term_text":"JX501334"}}</span>JX501334</a>

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