Comments (3)
We already have a "Show" button that appears in the toolbar when already-highlighted text is selected, so one possibility is that when this button is triggered, we not only filter annotations in the sidebar (as we do now), but also transfer keyboard focus to the sidebar and to the annotation card for the first annotation in the selected set. Assuming the user has a way to select text with the keyboard, this provides a keyboard-only way to navigate from the highlight to the annotation in the sidebar.
In addition to focus transfer when clicking "Show", we'd also need to announce the "Show" shortcut. Perhaps the solution we land on for #4742 can be extended to include this.
A closely related thing we need to think about is how the user gets back to where they were in the document after they jump to the sidebar. My current thought is that we'll have some shortcut in the sidebar that returns focus back to the host/guest frame where focus was previously, and focuses the highlight that the user jumped from.
from client.
One issue I ran into while implementing this is that the client is currently a bit trigger happy when it comes to selecting annotations. The selection in the sidebar is changed not only when clicking on highlighted text, but also whenever the cursor is released inside a highlight. The "Show" action in the toolbar currently just triggers an update of the selection. If we're going to make it also move focus to the sidebar, we need to make sure that doesn't happen when eg. making a text selection that happens to end inside a highlight.
from client.
We already have a "Show" button that appears in the toolbar when already-highlighted text is selected, so one possibility is that when this button is triggered, we not only filter annotations in the sidebar (as we do now), but also transfer keyboard focus to the sidebar and to the annotation card for the first annotation in the selected set
I have this working locally. It works as intended in Chrome and Firefox. In Safari there is a complication that the sidebar cannot request focus until the user has interacted with it at least once since the top-level frame loaded. Prior to that window.focus()
calls inside the sidebar are ignored, and if the host frame attempts to call focus()
on the iframe element, the frame element is focused, but not the window it contains.
from client.
Related Issues (20)
- Update clustered-highlights prototype to account for accessibility of "hidden" highlights HOT 1
- Error when saving if 32-char prefix/suffix of quote selector ends mid-way through a unicode surrogate pair HOT 2
- Chapter titles are duplicated in VitalSource PDF-based books HOT 2
- Poor text selection of some lines in VitalSource book HOT 1
- DOM changes to insert highlights around text blocked in Notion HOT 2
- PDF text selection rect can be confusing in Safari HOT 2
- [Annotator] DOI HTTP URL saved in place of DOI URI
- Abstraction of the "backend work" of /h to "IPFS and the client" HOT 1
- Codecov npm dependency is depreacted. Migrate to a maintained alternative
- Share annotations copy button is not working in Safari HOT 3
- Create proof of concept of ImageTextLayer-based text layer in PDF.js
- Unable to annotate pages with non-Unicode encoded URLs HOT 5
- Prototype an URL-addressable app view for managing user preferences
- Notebook is showing only ~250 of 2000+ annotations in a group HOT 5
- Provide a way for users to edit annotation URLs
- Open pdf in Firefox, annotations disappear when zooming in/out HOT 1
- Annotations can fail to anchor on client-rendered pages if content is slow to load HOT 1
- Visual regression: search input not "closing" fully in some cases
- Add scroll-hint affordance to long `FilterList`s, `GroupMenu` HOT 2
- Decouple `FilterList` from its position in the UI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from client.