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

[Feature] Segmented Control - Fix deprecated attributes #32

Merged

Conversation

TimRoe
Copy link
Contributor

@TimRoe TimRoe commented Nov 6, 2023

Ticket 6857

Updated to appease react-native-web package for Web Storybook:

  • accessibilityRole prop to role
  • accessibilityLabel prop to aria-label
  • TouchableOpacity component to Pressable
    • This also necessitated a bit of custom styling to recreate the TouchableOpacity effect of reducing opacity to 20% on press; this was pulled out to a convenience function with the expectation we will need it again later as many components in the existing app use TouchableOpacity

Draft testing included:

  • Validating the deprecation notices no longer appear in Web Storybook running locally
  • Validating iOS/Android Storybook instances run as expected
    • Included validating screen reader still reads the labels/role as expected with the new props

Draft testing did not include:

  • Creating an alpha build or locally validating that things still work as expect within the VA Flagship Mobile App--based on changes, they should work without issue

As a general note: the new role and aria-label properties were added with React Native 0.71; this change hereby renders the components library non-functional to RN applications below that version. This is considered an acceptable risk as the one and only current app leveraging the components library is on 0.71 and the expectation is that any new consumers will be on a higher version.

@TimRoe TimRoe requested a review from a team as a code owner November 6, 2023 19:16
@TimRoe TimRoe merged commit 46d6edd into main Nov 8, 2023
6 checks passed
@narin narin changed the title 6857-roettger-FixRNWebDeprecatedAttribsOnSegmentedControl [Bug] Segmented Control - Fix deprecated attributes Nov 28, 2023
@narin narin changed the title [Bug] Segmented Control - Fix deprecated attributes [Feature] Segmented Control - Fix deprecated attributes Nov 28, 2023
@narin narin deleted the 6857-roettger-FixRNWebDeprecatedAttribsOnSegmentedControl branch November 30, 2023 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants