zotero / reader

PDF/EPUB/HTML reader for Zotero
Other
129 stars 30 forks source link

VPAT: aria edits #127

Closed abaevbog closed 5 months ago

abaevbog commented 5 months ago

Address https://github.com/zotero/zotero/issues/4220 and easier parts of https://github.com/zotero/zotero/issues/4222

abaevbog commented 5 months ago

@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:

mrtcode commented 5 months ago

I kept these as a single PR so that it's possible to squash all commits into one before merging to keep the commit history somewhat clean. But correct me if I should break these into individual PRs so that it's easier to review?

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.

There is a glitch in react 17 that logs a warning as if aria-description is not a valid aria property: https://github.com/facebook/react/issues/21035. It should be gone in react 18.

That warning is a bit annoying, but I'll suppress it, so it's fine.

To add these accessibility fixes, I had to add some new localized strings. I don't fully understand how the localization workflow happens with the reader but I added each of the new strings that we would want into en-us.strings.js for reference. But to get them to be actually announced, I had to add those strings into zotero.properties of the main repo. Is there somewhere else I should place the new strings?

The reader gets its localized strings from Zotero with the pdfReader and general prefixes. Even though we are now mostly using zotero.ftl, the reader can only use strings from zotero.properties. When using the reader in the browser, it falls back to using en-us.strings.js.

Anyway, it looks good, and I think you can merge it.

abaevbog commented 5 months ago

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.

Even though we are now mostly using zotero.ftl, the reader can only use strings from zotero.properties

Ok, gotcha! So before updating the reader submodule in the main repo, we should make sure to add the new lines to zotero.properties:

pdfReader.annotationComment = Annotation comment
pdfReader.annotationText = Annotation text
pdfReader.manageTags = Click to manage tags
pdfReader.openMenu = Open menu
pdfReader.thumbnails = Thumbnails
pdfReader.tagSelectorMessage = Filter annotations by this tag

Anyway, it looks good, and I think you can merge it.

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.