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

fix: add mixed to aria-checked typings #34633

Conversation

ankit-tailor
Copy link
Contributor

@ankit-tailor ankit-tailor commented Sep 8, 2022

Summary

aria-checked prop should accept mixed as value as given here and also accessibilityState.checked accepts mixed to represent checkboxes. This change refers to issue #34424 and PR #34524

Changelog

[General] [Added] - Added mixed value for aria-checked.

Test Plan

<TouchableOpacity
  accessibilityRole="checkbox"
  aria-checked="mixed"
  accessibilityHint="click me to change state">
  <Text>Checkbox example</Text>
</TouchableOpacity>

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Sep 8, 2022
@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Sep 8, 2022
@analysis-bot
Copy link

analysis-bot commented Sep 8, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,747,611 +0
android hermes armeabi-v7a 7,149,395 +0
android hermes x86 8,058,588 +0
android hermes x86_64 8,029,524 +0
android jsc arm64-v8a 9,608,518 +0
android jsc armeabi-v7a 8,373,768 +0
android jsc x86 9,555,784 +0
android jsc x86_64 10,148,324 +0

Base commit: 0d3596a
Branch: main

@facebook-github-bot
Copy link
Contributor

@rubennorte has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@analysis-bot
Copy link

analysis-bot commented Sep 9, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 0d3596a
Branch: main

@necolas
Copy link
Contributor

necolas commented Oct 6, 2022

There was an internal request to update the typescript types too. cc @lunaleaps

Copy link
Contributor

@lunaleaps lunaleaps left a comment

Choose a reason for hiding this comment

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

Hi @ankit-tailor! As Nicolas mentioned can we update the TS types here:

'aria-checked'?: ?boolean,

and other related places if any

@ankit-tailor
Copy link
Contributor Author

Yes @lunaleaps, I'll do the necessary changes.

@ankit-tailor
Copy link
Contributor Author

@lunaleaps, Only ViewAccessibility props required the above changes, other than that everywhere else ViewAccessibility props are extended.

@gabrieldonadel
Copy link
Collaborator

@lunaleaps any updates on this?

@facebook-github-bot
Copy link
Contributor

@necolas has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @ankit-tailor in 7a19af7.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 26, 2022
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
`aria-checked` prop should accept `mixed` as value as given [here](https://www.w3.org/WAI/GL/wiki/Using_WAI-ARIA_aria-checked%3Dmixed) and also [accessibilityState.checked](https://reactnative.dev/docs/accessibility#accessibilitystate) accepts mixed to represent checkboxes. This change refers to issue facebook#34424 and PR facebook#34524

## Changelog

[General] [Added] - Added `mixed` value for `aria-checked`.

Pull Request resolved: facebook#34633

Test Plan:
```js
<TouchableOpacity
  accessibilityRole="checkbox"
  aria-checked="mixed"
  accessibilityHint="click me to change state">
  <Text>Checkbox example</Text>
</TouchableOpacity>
```

Reviewed By: lunaleaps

Differential Revision: D39382158

Pulled By: necolas

fbshipit-source-id: fa026274111305cc0bcbb42ed974ca1be7d779a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants