-
Notifications
You must be signed in to change notification settings - Fork 5
Keyboard a11y annotations #805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this out locally with https://yalemssa.aviaryplatform.com/iiif/028pc2tq0m/manifest. This is a big improvement! I had a few questions/observations:
-
Is there a way to navigate via tab past the annotations? If you tab into the annotations then shift+tab focuses the parent container, but tabbing from there will focus the last focused annotation and tab again will do nothing.
-
The select-only combobox example ARIA pattern gives some additional key interactions: Home, End, and Printable Characters. Is this the best pattern to be using for the dropdown? Have you thought about implementing these other interactions?
src/components/MarkersDisplay/Annotations/AnnotationSetSelect.js
Outdated
Show resolved
Hide resolved
src/components/MarkersDisplay/Annotations/AnnotationSetSelect.js
Outdated
Show resolved
Hide resolved
Yes, you are right. From looking at other websites it seems tab-order should be cyclic meaning it should wrap back into the browser tabs and to the top of the page eventually. I will take a look at this.
The dropdown menu keyboard implementation is a combination of checkbox and menu button which also has a similar set of keyboard interactions as select-only combobox. |
58ad610
to
540cd72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good and really close!
* Trap focus within the annotation to navigate through any links or buttons in the | ||
* annotation row display when Tab key is pressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this probably shouldn't trap but allow for tab cycling. Maybe it should cycle through only links and show more buttons without regard of the activated annotation? Or maybe only links? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, I need to figure out a way to join the natural tab order of the page once the user is done going through the annotations component.
With cyclical tabbing through all the links and buttons within the annotations component a user might get stuck in that component without a path out of the annotation component... 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjcolvar I don't have any clever ideas on how to implement this without trapping the keyboard navigation inside the annotations component forever. Let me know if you have any.
If it's hard to figure this out at this point, maybe we can circle back to this once we've done some testing on this?
In the comment where I mention trapping the focus within the annotation, it meant enable tab cycling within the focused annotation, but allow the user to get out of it when they press ArrowUp
or ArrowDown
keys.
Aviary and other similar applications with annotations or lists of text blocks within embedded links could be a reference point for this. |
I tested this in Aviary with the Manifest: https://tanyaclement.github.io/SGW-SI/john-wieners-at-sir-george-williams-university-the-poetry-series-8-october-1966/manifest.json. This Manifest has annotations with embedded anchor tags in the annotation text. |
Additionally I tested the same Manifest in AVAnnotate and it behaves in a similar manner as Aviary. I was able to focus on each link within annotation texts by pressing |
@Dananji I don't know if I have any helpful solutions to the things that are mentioned. What I noticed as problematic:
I think the other question was about getting trapped in the tab group, since tab takes you into the tab detail, so there is no way to get from the Annotations tab into the footer. Is that the problem? |
I think not announcing the instruction for activating a selected annotation is problematic. There is a difference between the HTML elements used in the DOM for transcript cues and annotation rows. I will create an issue for that. Once you are focused on the Annotations and the consecutive tab presses will move focus as follows;
|
@elynema I tested the Once the page loads and user is focused on the
|
Being able to navigate through the content of the Annotations tab is pretty important to accessibility, so this should be included with the Ramp 3.4.0 release. Sounds like a major remaining concern is the user getting trapped in a specific Annotation that has a link when using TAB. We could:
In the details tab, when the users hit TAB on the last link in the content, they are sent to the next link in the tab order, which is the footer in Avalon. I think it makes sense for the Annotations tab to work similarly. SHIFT + TAB seems to be working ok to me to help a user escape back up to the tab headers themselves. After navigating through the links within an annotation (using TAB), SHIFT+TAB once takes me back up to the annotations container, not to the previous link in the annotation set. @Dananji @joncameron @cjcolvar Should we talk about this at Swarm next week? |
A new issue can be created for the tab issue mentioned in the last comment. At this point we can probably merge this PR and then resolve the remaining questions and issues for Ramp release. We'll talk about this in the next Swarm meeting. |
Related issue: #781