zotero / zotero-connectors

Chrome, Firefox, Edge, and Safari extensions for Zotero
https://www.zotero.org/download/connectors
Other
530 stars 124 forks source link

accessibility localization tweaks #473

Closed abaevbog closed 6 months ago

abaevbog commented 6 months ago

Fixes: #472

dstillman commented 6 months ago

I haven't tested without this PR, so probably not from this specifically, but can we do anything about the backwards order here (collection before "Saving to")? Maybe it's correct, in the weird logic of screen readers, because it's telling you the current value before giving you the context?

Screenshot 2024-05-16 at 7 18 13 AM

Can we do anything to announce the dialog closing? I'm finding it keeping the VO selection in place even after the dialog closes, with no announcement that that happened.

abaevbog commented 6 months ago

I haven't tested without this PR, so probably not from this specifically, but can we do anything about the backwards order here (collection before "Saving to")? Maybe it's correct, in the weird logic of screen readers, because it's telling you the current value before giving you the context?

The exact way of how the elements' announcements are put together based on the DOM and aria properties is something that's specific for each screen reader. Voiceover is particularly odd about it - it always says value first and label after. On the contrary, JAWS and NVDA both say "Saving to combobox '{Selected collection}'" for that dropdown. So I don't think this is something we can or should try to change, since this way of announcing things seems specific to voiceover and users are likely accustomed to and expect it...

Somewhat related to this is that voiceover often decides to immediately announce the focused menupopup and skip the explicit "Saving to {collection}" alert that fires right as soon as the popup opens. This would have helped to clarify things a bit. In general, I've noticed that voiceover may unfortunately skip some aria-live announcements depending on what else is going on.

Can we do anything to announce the dialog closing? I'm finding it keeping the VO selection in place even after the dialog closes, with no announcement that that happened.

That is a great point! I added a new progressWindowIframe.willHide message that fires when all saving is done, so it will add an additional message before the dialog closes. Let me know if the phrasing should be tweaked. I went with "Saving is complete. The dialog will close now." as a start.

Also, I added a special alert that the items have already been saved on re-opening of the dialog. That way, it doesn't say "Saving to ..." because then it does make it seem like it's saving duplicate items, which is not true.

New announcements video

abaevbog commented 6 months ago

A somewhat bigger issue I noticed with voiceover is that it does not announce anything at all if the focus/cursor is not in the actual web page. That means that if you tab into the "Save to zotero" extension button in browser's toolbar and press "Enter", nothing gets announced because (I think) the focus is on the toolbar. Since NVDA and JAWS do not have this issue, it seems like just another oddity of voiceover that I'll try to workaround somehow.

Edit: I suppose it's not as big of an issue as I thought. It is annoying that if you tab onto the extension button, click Enter and don't see the focus move into the iframe. But for chrome and firefox, one can add shortcuts to extensions, so if one mainly relies on keyboard navigation, that would likely be the way to go. In that case, as long as the focus beings on the actual webpage, extension shortcuts do have the announcements go through as expected.

adomasven commented 6 months ago

Merging as this is an improvement over the current state and we want to release it and we can refine further if need be.