react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Added support for importantForAccessibility for some components

Open grgr-dkrk opened this issue 3 years ago • 9 comments

Summary

fix #30850

This PR supports importantForAccessibility on some components (Picker, Button, ImageBackground).

These components convert importantForAccessibility="no" to importantForAccessibility="no-hide-descendants". This is to prevent focusing on the offspring elements of the component.

Picker is a deprecated component, so I will also work with @react-native-picker/picker if this PR is accepted.

Changelog

[Android] [Fixed] - Added support for importantForAccessibility for some components(Button, Picker, and ImageBackground)

Test Plan

  1. add snapshot.
  2. capture the GIF

Focus is disabled in importantForAccessibility

grgr-dkrk avatar Apr 04 '21 06:04 grgr-dkrk

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

Base commit: 36f3bf2f583596a08a59e1f65016aaf4652fc341

analysis-bot avatar Apr 04 '21 07:04 analysis-bot

Thanks for working on this! cc @blavalla to check the Android behavior.

kacieb avatar Apr 16 '21 22:04 kacieb

@grgr-dkrk Is this ready for review again? If not, can you request for review when it is? Or let me know if you have already (sorry a little disoriented in github!) -- just want it to be clear when you're waiting on review!

lunaleaps avatar May 03 '21 17:05 lunaleaps

@lunaleaps It slipped my mind. Thanks!

grgr-dkrk avatar May 04 '21 01:05 grgr-dkrk

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,716,028 +0
android hermes armeabi-v7a 7,244,255 +0
android hermes x86 8,135,345 +0
android hermes x86_64 8,100,900 +0
android jsc arm64-v8a 9,635,310 +0
android jsc armeabi-v7a 8,551,062 +0
android jsc x86 9,648,919 +0
android jsc x86_64 10,258,149 +0

Base commit: 36f3bf2f583596a08a59e1f65016aaf4652fc341

analysis-bot avatar Jun 25 '21 12:06 analysis-bot

I will invest time reviewing this pull request and I will add my comments in this pull request. Thanks a lot.

fabOnReact avatar Dec 20 '21 05:12 fabOnReact

testing ImageBackground importantForAccessiblity

https://github.com/facebook/react-native/pull/34245/commits/365b3d3df28ebc8f3e798851224e7819c088f10c

fabOnReact avatar Jul 22 '22 08:07 fabOnReact

These changes landed in the main branch with https://github.com/facebook/react-native/pull/34245. For this reason I'm moving the PR to done. Thanks a lot.

fabOnReact avatar Jan 11 '23 20:01 fabOnReact

Warnings
:warning:

Libraries/Components/Button.js#L14 - Libraries/Components/Button.js line 14 – Requires should be sorted alphabetically (lint/sort-imports)

:warning:

Libraries/Components/tests/Button-test.js#L8 - Libraries/Components/tests/Button-test.js line 8 – Requires should be sorted alphabetically (lint/sort-imports)

:warning:

Libraries/Image/ImageBackground.js#L13 - Libraries/Image/ImageBackground.js line 13 – Requires should be sorted alphabetically (lint/sort-imports)

:warning:

Libraries/Image/tests/ImageBackground-test.js#L14 - Libraries/Image/tests/ImageBackground-test.js line 14 – Requires should be sorted alphabetically (lint/sort-imports)

Generated by :no_entry_sign: dangerJS against b8747eee4223138e1a55e31a6667fc21f53433e6

github-actions[bot] avatar Jan 11 '23 21:01 github-actions[bot]

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Dec 21 '23 05:12 github-actions[bot]

This PR was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Dec 29 '23 05:12 github-actions[bot]