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

CheckBox does not apply readonly when using accessibilityReadOnly #2359

Closed
1 task done
paularmstrong opened this issue Aug 9, 2022 · 2 comments
Closed
1 task done
Labels
Milestone

Comments

@paularmstrong
Copy link
Contributor

paularmstrong commented Aug 9, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

aria-readonly / readonly attributes for checkboxes

Expected behavior

using <CheckBox accessibilityReadOnly /> should apply readonly attribute to the output <input type="Checkbox" reaonly /> when using `, but it currently does not.

Steps to reproduce

<CheckBox accessibilityReadOnly />

See test case

Test case

https://codesandbox.io/s/icy-fire-fr2ct4

Additional comments

I'm uncertain if there are other accessible props that are also not translating through and/or if this is only related to CheckBox. It does appear to work correctly on TextInput, as shown in the test case link.

There may also be needs to have the colors either the same as a disabled checkbox, or muted in some other way.
Screen Shot 2022-08-09 at 10 02 03

@omeralpi
Copy link

omeralpi commented Aug 11, 2022

There is no property to make the native checkbox readonly.
When I look at the test case, an aria-readonly parent div appears as it should.

I opened a pull request the other day, but it doesn't seem to be a problem right now.

@necolas
Copy link
Owner

necolas commented Aug 24, 2022

@paularmstrong see #2375. For different styling, that is something you can define in your component when setting the readonly prop. The native checkbox doesn't provide any different visual treatment for readonly states either.

rnike pushed a commit to VeryBuy/react-native-web that referenced this issue Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants