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: Accessibility: Add setting to increase scrollbar and other small control sizes #11627

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Jan 11, 2025

Summary

Goal: Allow users to make scrollbars meet WCAG 2.2 SC 2.5.8: Content Size (Minimum) by adding a setting to allow increasing their minimum dimension to 24px.

Note: An alternate approach — a setting that switches to system scrollbars is implemented here. However, I haven't found a simple way to increase the size of the OS scrollbars used in Joplin from system settings. For example, this Windows thread links to an article that suggests editing the registry.

Screenshots

The setting (small/7px):
screenshot: scrollbar size: dropdown Small, configures the size of scrollbars used in the app

Medium (12px):
screenshot: scrollbar size: dropdown Medium, configures the size of scrollbars used in the app

Large (24px):
screenshot: scrollbar size: dropdown Large, configures the size of scrollbars used in the app

Sidebar, note list, Markdown editor and viewer visible (setting enabled):
a long note is open in the editor, the scrollbar is roughly four characters wide

Rich Text Editor (setting enabled):
the Rich Text Editor's scrollbar is also resized

Revision viewer (setting enabled):
image

Notes

  • Changing the scrollbar styles: The StyleSheetContainer component was renamed to AppStyles. In addition to adding style sheets to each Joplin window, the component now adds a -large-controls CSS class to the :root element when the large controls setting is enabled.
    • The .-large-controls class is used in main.scss to set the scrollbar and default checkbox size.
    • Scrollbar styling is done by packages/renderer for rendered Markdown.
  • Refactoring changes: The revision viewer was refactored to use the same useMarkupToHtml hook for rendering as the NoteEditor. This change was intended to simplify passing the increaseControlsSize setting to the renderer.
    • To use the hook, NoteRevisionViewer was converted from a class to a function component.

To-do

  • (Optional) This pull request refactors parts of packages/renderer and packages/app-desktop. To these changes easier to review, it may make sense to move them to a separate pull request.

Testing plan

Fedora 41:

  1. Start Joplin
  2. Verify that scrollbars in the note viewer, editor, Rich Text editor, and revision viewer are small.
  3. Change the "scrollbar size" setting to "medium".
  4. Verify that scrollbars in settings, the sidebar, the note list, the Rich Text editor, the Markdown viewer, and the revision viewer are all larger.
  5. Open a note in a new window.
  6. Repeat step 4.
  7. Repeat steps 4-6 for "large".

@tomasz1986
Copy link

tomasz1986 commented Jan 11, 2025

I would like to suggest having an option to set it to narrow (the current version), normal, and wide. The reason is that the default scrollbars in Joplin are too narrow (thus difficult to click and see), but these are just way too huge to be useful in most cases (except for those that need such large elements due to severe eyesight or motion issues).

For example, I am shortsighted, but setting scrollbars to 10px with custom CSS is more than enough for me to see them with no issues. The default ones, I can barely see.

@personalizedrefrigerator
Copy link
Collaborator Author

I would like to suggest having an option to set it to narrow (the current version), normal, and wide. The reason is that the default scrollbars in Joplin are too narrow (thus difficult to click and see), but these are just way too huge to be useful in most cases (except for those that need such large elements due to severe eyesight or motion issues).

Good idea! I've converted the setting to a dropdown and updated the screenshots in the pull request description. The medium scrollbars have a width of 12px:
screenshot: Notebook list, note list, note editor, and note viewer, all have scrollbars wider than the default

@personalizedrefrigerator personalizedrefrigerator marked this pull request as ready for review January 12, 2025 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants