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

Suggestion about accessibility improvements roadmap #372

Open
9 of 11 tasks
mika-lindell opened this issue Aug 31, 2021 · 5 comments · Fixed by #422
Open
9 of 11 tasks

Suggestion about accessibility improvements roadmap #372

mika-lindell opened this issue Aug 31, 2021 · 5 comments · Fixed by #422

Comments

@mika-lindell
Copy link
Contributor

mika-lindell commented Aug 31, 2021

Accessibility is in demand right now, and this is my attempt to make a draft of accessibility roadmap for react-native-date-picker.
IosClone and AndroidVariant are fundamentally so different, that I've found they require separate solutions to fix similar problems (event though the API looks the same).

Principles

  • IosClone should implement accessibility similar to the wheel picker used in iOS
  • AndroidNative should implement accessibility of the vanilla NumberPicker
  • Each wheel should be treated as a single control from the perspective of accessibility: One can change focus to read the value of the other wheels, if one so wishes
    • Best practice is to avoid long readouts, so interacting is faster when you rely on spoken feedback
    • When wheel is focused, only the state of that wheel should be considered when creating accessibility
  • All controls should be compatible with a keyboard

IosPicker

When element is accessibility focused

  • EXPECTED
  • ACTUAL
    • Reads only content description: Set date

When scrolling

When value is selected

  • EXPECTED
  • ACTUAL
    • Reads content of all wheels
      • For example: Selected value: Tuesday second of March 2021, 12:15 pm

When using with keyboard

  • EXPECTED
  • ACTUAL
    • It's not possible to increment / decrement value using volume buttons --> This is how sliders (android.widget.seekBar) work w/ keyboard, you can experiment with system volume or brightness sliders for example.

AndroidNative

When element is accessibility focused

  • EXPECTED
    • Should read display value and role of the control

When selected value is accessibilityFocused

  • EXPECTED
    • Should read display value, state and role of the control
      • For example 3rd of May, selected, button
  • ACTUAL
    • Reads 3rd of May, editbox, but you can't use it like you would use editbox (==native input field)

When scrolling

  • EXPECTED
    • Should read out loud new display value when it changes during scroll
  • ACTUAL
    • Interrupts the reading of selected value to read values from other wheels

When value is selected

  • EXPECTED
    • Should only read the display value of the wheel currently active

When using with keyboard

  • EXPECTED
    • Should be able to increment / decrement value using keyboard

Resources

@henninghall henninghall pinned this issue Sep 1, 2021
@henninghall
Copy link
Owner

Great summary! Just let me know if you get stuck somewhere or have questions about the codebase, and I'll try to help out!

@mika-lindell
Copy link
Contributor Author

mika-lindell commented Sep 3, 2021

For any random person reading this issue just want to say following: I might not have the chance to fix everything in the list above. So if you find you're in need of some accessibility improvements, I hope you can use this as inspiration and chip in :)

@andriikovall
Copy link
Contributor

andriikovall commented Nov 26, 2021

Hi, we have encountered a transparent component that is focusable by talkback on Android.
image

I have found a place where it is located and can be easily fixed by adding importantForAccessibility="no" to the images

image

Should I create a new issue or what?

Package version 4.1.1
RN 0.66.0
Android 9

@henninghall
Copy link
Owner

@ziovio Great catch, thanks for the PR!

@hcbreedl
Copy link

hcbreedl commented May 8, 2024

Any updates here by chance? The Android variant still doesn't read interaction instructions correctly. It reads "edit box, double tap to edit text, double and hold to apply, button, double tap to activate". The above and below options read "button, double tap to activate, double and hold to long apply, button, double tap to activate". This package is almost ideal for our use case but may not be selectable due to this a11y limitation.

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 a pull request may close this issue.

4 participants