-
Notifications
You must be signed in to change notification settings - Fork 34
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
VPAT: aria edits #127
VPAT: aria edits #127
Conversation
1665550
to
326f913
Compare
@mrtcode these are my fixes to simpler accessibility issues within the reader brought up by VPAT reviewers. Let me know what you think! A few notes:
|
I think it's fine as it is. I don't have a strong opinion on whether we want to squash the commits or not.
That warning is a bit annoying, but I'll suppress it, so it's fine.
The reader gets its localized strings from Zotero with the Anyway, it looks good, and I think you can merge it. |
I added here a little tweak to make the annotation text focusable without it being editable. I think it achieves what we want: the screen readers being able to read the text without having to enable editing first through the menu.
Ok, gotcha! So before updating the reader submodule in the main repo, we should make sure to add the new lines to
That's great! It looks like I don't have write permissions to the reader repo though. So there's no "Merge" button on my end here. |
27304be
to
e2494a5
Compare
- vpat 60: added role=button and aria-label to X clear icon of search annotations - vpat 61: hide magnifying glass of search annotations field from screen readers - vpat 62: explicitly refocus search annotations input field on X click to not loose focus (possible with voiceover) - vpat 64: added aria labels to annotation preview inputs in sidebar - vpat 65: added title for context menu button - vpat 69: aria-description for "tags" button. It will always announce that this button can be clicked to manage tags regardless what the current label is. Note, there is a warning logged that aria-description in not a valid aria property - it is a bug in react 17. - vpat 71: properly announce annotations. Added listbox and option roles to help screen readers handle cursor movements. aria-labelledby of annotation points at header and aria-describedby points at the editable aria of the annotation so that the announcement is "Page ..." followed by the content of the annotation or the comment. - vpat:72 add tab semantics to the sidebar component vpat 72 states that we should have an audible announcement after a new tab was selected. This does not seem exactly correct per https://www.w3.org/WAI/WCAG21/Understanding/status-messages.html#excepted-examples, however the sidebar should still have proper tabbar semantics to help screen readers handle focus. That way, when a different tab is selected, the screen readers tend to repeat the title of the tab with a note that it is selected, so this should address that concern. - vpat 73: aria properties to announce thumbnails in the side bar - vpat 74: added description and state to tags. Added aria-description to tags to announce that this will filter annotations by this tag. Note that there is a warning logged that aria-description is not a valid aria property - it is a bug in react 17. Added role=checkbox and aria-checked state to tags to indicate which ones are toggled on - vpat 79: aria label for "Edit page number" input - make annotation text focusable without editing added tabstop parameter to ExpandableEditor that will add data-tabstop=1 and tabindex=-1 if annotation is focused regardless of readonly state. It allows us to focus the annotation text via tabbing without breaking existing behavior of making the annotation text focusable and editable only on double-click. Fixes: zotero/zotero#4220 Addresses: zotero/zotero#4222 Addresses: zotero/zotero#4223
e2494a5
to
e0e595a
Compare
- vpat 63: fix focus not being able to move forward on tab from "Search annotations" input in the sidebar if the search result is empty. Decide if the tabstop should be added to annotationsView based on filteredAnnotations.length instead of unfiltered props.annotations.length - vpat 73: fix NVDA not properly announcing the thumbnails view when it is selected. The "Show thumbnails" label of the view does not get announced, instead NVDA immediately announces page label of the selected thumbnail, which is a bit confusing. This happens because each time the selection changes, the view is re-added into the DOM, which tricks NVDA into thinking that there is a new component that appeared and it needs to be announced asap. Intead, render outline, annotations and thumbnails views and just hide views that are not selected. Also, added "Page" prefix to thumbnails aria labels to give it a bit more context. Followup to zotero#127
- vpat 63: fix focus not being able to move forward on tab from "Search annotations" input in the sidebar if the search result is empty. Decide if the tabstop should be added to annotationsView based on filteredAnnotations.length instead of unfiltered props.annotations.length - vpat 73: fix NVDA not properly announcing the thumbnails view when it is selected. The "Show thumbnails" label of the view does not get announced, instead NVDA immediately announces page label of the selected thumbnail, which is a bit confusing. This happens because each time the selection changes, the view is re-added into the DOM, which tricks NVDA into thinking that there is a new component that appeared and it needs to be announced asap. Intead, render outline, annotations and thumbnails views and just hide views that are not selected. Also, added "Page" prefix to thumbnails aria labels to give it a bit more context. Followup to #127
Address zotero/zotero#4220 and easier parts of zotero/zotero#4222
aria-labelledby
andaria-describedby
to the actual annotation. The first thing that will be announced is the header ("Page ...") followed by the editable area (comment or annotation text)after a new tab was selected. This does not seem exactly correct per https://www.w3.org/WAI/WCAG21/Understanding/status-messages.html#excepted-examples, however the sidebar should still have proper tabbar semantics to help screen readers handle focus. That way, when a different tab is selected, the screen readers tend to repeat the title of the tab with a note that it is selected, so this should address that concern.
aria-description
to tags in selector to make it clear that clicking on a tag will filter the annotations by it. Also, addedrole=checkbox
witharia-selected
to indicate which state each tag is in.