Skip to content
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

initial aria-live setup for search results + annotations #130

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

abaevbog
Copy link
Contributor

Sse aria-live field to announce annotations and search results when they are being switched between with keyboard.

Demo

@@ -192,6 +192,7 @@ const ReaderUI = React.forwardRef((props, ref) => {
{state.passwordPopup && <PasswordPopup params={state.passwordPopup} onEnterPassword={props.onEnterPassword}/>}
{state.printPopup && <PrintPopup params={state.printPopup}/>}
{state.errorMessage && <div className="error-bar" tabIndex={-1}>{state.errorMessage}</div>}
<div id="a11tyAnnouncement" aria-live='polite'></div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use double quotes for HTML attributes.

- added aria-live container to reader ui
- during keyboard navigation through annotations or
when going through search results, set a message
inside of the aria-live container to have screen readers
announce them
- this should satisfy vpat 75 and 78 issues

Addresses: zotero/zotero#4223
@abaevbog abaevbog marked this pull request as ready for review June 27, 2024 20:31
@abaevbog abaevbog merged commit 63fb611 into zotero:master Jun 27, 2024
1 check passed
abaevbog added a commit to abaevbog/zotero that referenced this pull request Jun 27, 2024
used to announce which annotation is selected during
keyboard navigation, as well as the index of the current
search result

Followup to zotero/reader#130
dstillman pushed a commit to zotero/zotero that referenced this pull request Jul 2, 2024
used to announce which annotation is selected during
keyboard navigation, as well as the index of the current
search result

Followup to zotero/reader#130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants