-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Mobile: Accessibility: Comply with WCAG 2.2 #11661
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
Comments
Regarding this point, I gave it a go adding the https://www.npmjs.com/package/react-native-external-keyboard dependency and replacing the usage of the TextInput component to be a KeyboardExtendedInput component. Out of the box this change alone does fix the issue on Android (I have not tested on IOS) so that you can tab or use the arrow keys on an external keyboard to switch between all the settings options without getting blocked by the TextInput - I also tested it with Talkback and it correctly reads the value. Note that the styling of the TextInput does require a bit of tinkering though to match the existing styling for a TextInput, as by default the width of the input contracts to the size of the input value instead of being fixed. Also note that when the KeyboardExtendedInput is in focus via the tab or arrows keys, you have to press the space bar first, in order to allow changing the value. If you press the field with your finger or mouse click though, it will immediately be in edit mode and you can start typing the value. Also there looks to be an additional accessibility issue when using an external keyboard. You can open up a dropdown field by pressing enter when it is in focus, however it is not possible to change the selected value in the dropdown using an external keyboard, as far as I can tell, as the dropdown items are no selectable with the arrow keys. FYI this is just for informational purposes. I don't think I will be investing further effort to implement these changes for a PR. |
Thank you for checking! |
It might be fixed upstream! From an upstream commit message:
Based on this, upgrading to React Native >= 0.79 may fix the issue. |
Summary
See #10795 for more information about this task.
Status:
Notes
Some accessibility work and issues from before starting this project: #10122, #10253, #8715
General notes:
react-native-ama
's documentation includes accessibility checklists specific to React Native that might be helpful.TextInput
blocks focus (Keyboard accessibility issues on Android (TextInput but also beyond) facebook/react-native#45801)Uncategorized issues:
navigation
/main
/... regions with React Native — the supported accessibilityrole
s seem much more limited than what's available on web. This might be possible with an external dependency.Note
For now, most of this evaluation focuses on mobile/Android. For keyboard accessibility (unless TalkBack is enabled), React Native has focus issues with its built-in
TextInput
component.Checklist
1.1. Text alternatives
1.1.1. Non-text Content (A)
@react-native-community/slider
(based on the list of props in its README & an attempt to setaccessibilityHint
/accessibilityLabeledBy
).react-native-popup-menu
(related issue).1.2.1 - 1.2.3. Audio and Video (A)
Note: §1.2.4-1.2.9 are all related to audio/video recordings/streams, which is not included in Joplin mobile by default.
1.3.1. Info and Relationships (A)
Note
If it's not possible to convey certain relationships/structure with React Native, it may be permissible to describe the structure in text:
accessibilityRole="heading"
to identify headings.accessibilityLabelledBy
is Android-only. However, it's still possible to useaccessibilityHint
to describe inputs to screen reader users.accessibilityRole="search"
on search fields (tags dialog search, global search, ...)Important
After adding/updating
accessbilityRole
s, be sure to check that the change improves screen reader accessibility on at least one platform and doesn't degrade screen reader support on other platforms.Other structure information:
accessibilityState
is ignored on web) -- Mobile: Accessibility: Improve note list accessibility #114191.3.2. Meaningful sequence (A)
Note: There are several issues related to this on iOS that may be difficult to resolve without adding a new dependency. For example, "dismiss" actions are sometimes read while navigating menus. However, this document currently focuses on Android accessibility. Many of the iOS issues are not listed here.
1.3.3. Sensory characteristics (A)
This guideline seems to apply to instructions for using the app. I'm not aware of mobile app instructions that rely on sensory characteristics. If they exist, however, they're most likely to be in settings screen descriptions.
1.3.4. Orientation (AA)
At least on Android, Joplin mobile does not restrict the screen orientation. In the past, however, on iOS, the
Modal
component's defaultprops
(supportedOrientations
) have restricted the app orientation.1.3.5. Identify input purpose (AA)
autocomplete
in HTML. React Native has theautoComplete
attribute forTextInput
. Most relevant is likely thenew-password
autocomplete value. Add correctautoComplete
to inputs in settings.Note: 1.3.6 is level AAA and not included in this document.
1.4. Distinguishable
1.4.1. Use of color (A)
Note: Syntax highlighting: Joplin's Markdown editor uses syntax highlighting to distinguish content. However, this syntax highlighting is based on the content of the document and should thus not be the "only visual means of conveying information".
1.4.2. Audio control (A)
At present, all audio should be user-created (and only auto-play if this is set by the user in HTML). Additionally, audio included with
[](:/resourceidhere)
have WebView-provided controls.1.4.3. Contrast (Minimum) (AA)
Contrast issues found with the accessibility scanner are listed in the section for SC 1.4.11.
1.4.4. Resize text (AA)
If relying on the system zoom level is not sufficient,
1.4.5. Images of text (AA)
Aside from icons (which should have labels and are often non-text), Joplin does not use images of text.
1.4.6. - 1.4.9.
SCs 1.4.6-1.4.9 are all level AAA and have been omitted.
1.4.10. Content reflow (AA)
1.4.11. Non-text contrast (AA)
The below are based on the default light mode theme.
1.4.12. Text spacing (AA)
1.4.13. Content hover on focus (AA)
Note: Tooltips on mobile are triggered by long-press and currently are not triggered by the keyboard. When this changes to satisfy 2.1.1, it should be ensured that the new shortcuts satisfy this SC.
2.1. Keyboard accessible
2.1.1. Keyboard (A)
Physical keyboard issues:
Screen reader issues:
oncontextmenu
, but this event is web only.2.1.2. No keyboard trap (A)
Note: 2.1.3 is level AAA
2.1.4. Character key shortcuts (A)
w
/a
/s
/d
/q
/e
/r
andh
/j
/k
/l
shortcuts for scrolling the viewport).2.2. Provide users enough time to read and use content
2.2.1. Timing Adjustable (A)
2.2.2. Pause, stop, hide (A)
2.2.3 - 2.2.6
SC 2.2.3-2.2.6 are all level AAA.
2.3. Seizures and physical reactions
2.3.1. Three flashes or below threshold (A)
Note
A flash is defined as
I have not observed Joplin to flash frequently in a short period of time.
Note: SC 2.3.2-2.3.3 are level AAA and thus omitted.
2.4. Navigable
2.4.1. Bypass blocks (A)
2.4.2. Page titled (A)
The SC includes the following note:
Also, on web:
2.4.3. Focus order (A)
Joplin on mobile does not (as far as I'm aware) override focus order. However, this SC also discusses modal dialogs in its description. As such, (by F85)
2.4.4. Link purpose (in context) (A)
The WCAG 2.2 defines "link purpose" as the "nature of the result obtained by activating a hyperlink". The mobile app uses few true hyperlinks. However, SC 2.4.6. seems to cover this case.
App controls/state: The hyperlinks in "more information" do currently describe their target in the content of the link (e.g. "Make a donation" with role "link").
Welcome notes: The welcome notes include a link with just the text "link", but it's included within a descriptive paragraph.
2.4.5. Multiple ways (AA)
Note: The WCAG 2.2 spec defines "web page" as "a non-embedded resource obtained from a single URI using HTTP plus any other resources that reused in the rendering or intended to be rendered together with it by a user agent." As such, this doesn't seem to apply to Joplin mobile.
If this does apply to Joplin mobile,
2.4.6. Headings and labels (AA)
Note: SC 1.3.1/4.1.2 are similar to this success criterion, but is about whether labels are present or not (rather than their content).
2.4.7. Focus visible (AA)
inert
and hidden for accessibility, but still gets keyboard focus.2.4.9-2.4.10 (AAA)
Skipped: SC 2.4.9-2.4.10 are level AAA.
2.4.11. Focus not obscured (minimum) (AA)
2.4.12-2.4.13 (AAA)
Skipped: SC 2.4.12-2.4.13 are level AAA.
2.5. Input modalities
2.5.1. Pointer gestures (A)
Note
Definition:
2.5.2. Pointer cancellation (A)
2.5.3. Label in name (A)
This doesn't seem to apply to symbolic text characters (e.g. the "bold" button in the toolbar).
2.5.4. Motion actuation (A)
Note: Includes an "essential" exception.
2.5.5 - 2.5.6
These sections are level AAA and skipped.
2.5.7. Dragging movements (AA)
2.5.8. Target size (minimum)
3.1. Readable
3.1.1. Language of Page (A)
3.1.2. Language of parts (AA)
3.1.3 - 3.1.6 (AAA)
Skipped.
3.2. Predictable
3.2.1. On focus (A)
Note
The WCAG defines "changes of context" to be:
It includes "focus" and "content that changes the meaning of the web page" as examples.
Screen reader/keyboard focus does not seem to cause changes in context in the mobile app.
3.2.2. On Input (A)
3.2.3. Consistent Navigation (AA)
Joplin uses the same header component for different screens and does not seem to re-order the header buttons on different screens. As such, this should be met.
3.2.3. Consistent Identification (AA)
3.2.5. Change on request (AAA)
Skipped (level AAA).
3.2.6. Consistent help (A)
Current places with contact/help information:
3.3. Input assistance
3.3.1. Error identification (A)
3.3.2. Labels or instructions (A)
This success criterion may be met. Cases that need to be looked into include:
Note
This success criterion is different from SC 1.3.1. From the "understanding" document:
3.3.3. Error suggestion (AA)
3.3.4. Error prevention (AA)
Joplin can "delete user-controllable data in data storage systems" (e.g. delete notes). At present:
3.3.5-3.3.6 (AAA)
SC 3.3.5-3.3.6 are level AAA and thus omitted from this document.
3.3.7. Redundant entry (A)
3.3.8 Accessible Authentication (AA)
TextInput
s for passwords, which support copy and paste. Copy and paste should be sufficient for this.4.1. Compatible
Note: SC 4.1.1 is marked as (Obsolete and removed).
4.1.2. Name, role, value (A)
accessibilityRole="button"
on touchable button-like itemsaccessibilityRole="togglebutton"
oraccessibilityRole="checkbox"
on checkbox-like items.div
. Check whether adding appropriaterole
information would help with this (or be confusing, since CodeMirror doesn't necessarily render all lines outside the viewport).4.1.3. Status messages (AA)
Notes on accessibility testing
Screen reader testing
For items related to screen reader accessibility, I'm testing primarily with the following screen readers:
Mobile: Finding contrast issues
On Android, the Accessibility Scanner may also be helpful in identifying and fixing certain accessibility issues (e.g. contrast, unlabeled content).
The text was updated successfully, but these errors were encountered: