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

Desktop: Resolves #11741: Accessibility: Add screen reader announcements when toggling the note list and/or sidebar #11776

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Feb 4, 2025

Summary

This pull request announces when the sidebar and note list are toggled. Previously, screen reader users had no indication that pressing F10 or F11 changed the app layout.

Related to #10795. Resolves #11741.

To-do

  • Refactoring — Currently, this pull request works by adding a method to shim.. However, this method is currently only used on desktop (and unimplemented on web). A different approach (e.g. with a React context) might be better.
    • Feedback on this is welcome!

@personalizedrefrigerator personalizedrefrigerator changed the title Desktop: Accessibility: Add screen reader announcements when toggling the note list and/or sidebar Desktop: Resolves #11741: Accessibility: Add screen reader announcements when toggling the note list and/or sidebar Feb 4, 2025
Comment on lines +409 to +410
void window.webContents.executeJavaScript(`(() => {
const announcer = document.createElement('div');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  • I don't like this .executeJavaScript approach — if feasible, switch to a different approach for creating announcements.

@personalizedrefrigerator personalizedrefrigerator added desktop All desktop platforms accessibility Related to accessibility labels Feb 4, 2025
Comment on lines +34 to +36
shim.announceForAccessibility = (message) => {
AccessibilityInfo.announceForAccessibility(message);
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Currently, this implements shim.announceForAccessibility on Android and iOS, but not the web version of the mobile app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Related to accessibility desktop All desktop platforms
Projects
None yet
1 participant