grgr-dkrk

grgr-dkrk

giorgio-dekiruko is a character of Magical Circle Guru Guru 2 (魔法陣グルグル2). The original copyright belongs to Mr. Hiroyuki Etō.

Member Since 3 years ago

Japan

Experience Points
13
follower
Lessons Completed
6
follow
Lessons Completed
147
stars
Best Reply Awards
132
repos

1252 contributions in the last year

Pinned
⚡ My Rust GBA Game Sample
Activity
Dec
7
11 hours ago
Dec
1
6 days ago
started
started time in 6 days ago
Nov
30
1 week ago
started
started time in 1 week ago
Nov
27
1 week ago
Nov
26
1 week ago
started
started time in 1 week ago
Nov
16
3 weeks ago
Activity icon
issue

grgr-dkrk issue comment facebook/react-native

grgr-dkrk
grgr-dkrk

iOS: Accessibility Language Support

Requires API Proposal

This issue may require a new API, or a change to an existing API. An API proposal should be added and discussed before proceeding with implementation. The API proposal can be added in the comments of this issue or linked as a separate issue.

Description

It should be possible to set a specific language for text to be read by VoiceOver. Text to be read is not always the same as the system-wide locale.

React Native version:

v0.63

Expected Behavior

There could be an attribute like "accessibilityLanguage = {...}" which would be set on an applicable type of text.

iOS Details

It seems feasible that the native accessibilityLanguage property could be bridged for applicable components.

grgr-dkrk
grgr-dkrk

@katimoth Thank you, now I'm working on another issue and I'm not working on this one.

Oct
31
1 month ago
push

grgr-dkrk push grgr-dkrk/react-native

grgr-dkrk
grgr-dkrk

Bump react-native-codegen to 0.0.9

Summary: Bumping the codegen to a new version to ship a change to the Android template.

Changelog: [General] [Changed] - Bump react-native-codegen to 0.0.9

Reviewed By: hramos, mdvacca

Differential Revision: D31762139

fbshipit-source-id: 71a96210a3577c12ff3c9f9013c6e72adf4a0ecb

grgr-dkrk
grgr-dkrk

Mock composite animations when testing

Summary: Single and composite animations were handled inconsistently in AnimatedMock. Also added a guard to prevent callbacks from triggering additional animations, since we had a test-scenario that did exactly that.

Changelog: [General][Fixed] - Composite animations will now be ran immediately when the app is in testing mode

Reviewed By: yungsters

Differential Revision: D31826967

fbshipit-source-id: a6416b42e227fe79f5c3a55a9c51beb8451874f8

grgr-dkrk
grgr-dkrk

feat: add missing Android dangerous permissions (#32445)

Summary: This PR adds all missing dangerous permissions in Android. I recently updated these for Android 12 and found many more missing dating all the way back to API 26. After this PR, it will be in sync with ALL dangerous permissions as of the recently released Android 12.

https://developer.android.com/reference/android/Manifest.permission.html#ACCEPT_HANDOVER - 28 https://developer.android.com/reference/android/Manifest.permission.html#ACTIVITY_RECOGNITION - 29 https://developer.android.com/reference/android/Manifest.permission.html#ANSWER_PHONE_CALLS - 26 https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_NUMBERS - 26 https://developer.android.com/reference/android/Manifest.permission.html#UWB_RANGING - 31

Changelog

[Android] [Changed] - Add ACCEPT_HANDOVER, ACTIVITY_RECOGNITION, ANSWER_PHONE_CALLS, READ_PHONE_NUMBERS & UWB_RANGING to PermissionsAndroid

Pull Request resolved: https://github.com/facebook/react-native/pull/32445

Test Plan:

PermissionsAndroid.ACCEPT_HANDOVER === 'android.permission.ACCEPT_HANDOVER'
PermissionsAndroid.ACTIVITY_RECOGNITION === 'android.permission.ACTIVITY_RECOGNITION'
PermissionsAndroid.ANSWER_PHONE_CALLS === 'android.permission.ANSWER_PHONE_CALLS'
PermissionsAndroid.READ_PHONE_NUMBERS === 'android.permission.READ_PHONE_NUMBERS'
PermissionsAndroid.UWB_RANGING === 'android.permission.UWB_RANGING'

Reviewed By: yungsters

Differential Revision: D31793802

Pulled By: sshic

fbshipit-source-id: 4a2e5086e92ccd223e74db451c4ccd87485ffb63

grgr-dkrk
grgr-dkrk

Fix up dark mode for main lists

Summary: Changelog: [Internal] Fix up basic styling of dark mode for examples. Individual examples still may be broken and will be fixed up individually

Reviewed By: yungsters

Differential Revision: D31710790

fbshipit-source-id: 6ca4fb8a6238f38ff484ec91518057b243ba1d7b

grgr-dkrk
grgr-dkrk

Hide the logbox window explicitly. New behavior in iOS SDK appears to… (#32435)

Summary: Fixes https://github.com/facebook/react-native/issues/32434: RCTLogBox window is orphaned, covering entire screen.

After this change, the logbox window once again is removed from the screen.

Changelog

Some third-party SDKs may hold references to created UIWindow, UIViewController, or UIView objects. Doing so means that the current code's hide method that releases the reference to the UIWindow in LogBox will not cause the window to be dealloc'd, and thus instead it will remain on the screen. This change explicitly hides the LogBox window when the reference is released, so that even if some other SDK holds onto the window it will still be taken off the screen.

[iOS] [Fixed] - 32434

Pull Request resolved: https://github.com/facebook/react-native/pull/32435

Test Plan:

  1. Use console.warn to generate a yellow warning message in log box.  Also install a third-party SDK that holds onto a reference to UIWindow -- for example the Facebook SDK, the Data Dog SDK, or any number of other SDKs that use `swizzling` to intercept calls like `viewDidAppear:`.
    
  2. click the log
    
  3. tap "dismiss"
    
  4. try to tap anywhere
    
  5. Use Xcode view debugger to inspect the UI state

Expected

The app still responds to the touch. In Xcode, there is not an extra UIWindow covering the screen

Reviewed By: philIip

Differential Revision: D31794242

Pulled By: sshic

fbshipit-source-id: 28aa247b3ed3fd60b8e7c2ed7d0606cbf5c42408

grgr-dkrk
grgr-dkrk

Daily arc lint --take CLANGFORMAT

Reviewed By: zertosh

Differential Revision: D31891742

fbshipit-source-id: f6f6ad019e972de5acc8d04f0e8c8d9c9a2e3324

grgr-dkrk
grgr-dkrk

Fix devDisabledInStaging not working with multiple productFlavors (#30606)

Summary: Fixes https://github.com/facebook/react-native/issues/27052

Since react-native 0.62, the devDisabledIn${buildType} syntax has stopped working for apps with multiple productFlavors. This PR adds the disableDevForVariant lambda to allow dev mode to be disabled for different variants.

Changelog

[Android] [Fixed] - Fix devDisabledIn not working with multiple productFlavors

Pull Request resolved: https://github.com/facebook/react-native/pull/30606

Test Plan: I added the following log into react.gradle and ran the Android build for my app:

println("devEnabled: ${targetName}, ${devEnabled}")
# build.gradle

project.ext.react = [
    entryFile: "index.android.js",
    enableHermes: true,  // clean and rebuild if changing
    bundleInLive: true,
    disableDevForVariant: {
         def variant -> variant.name.toLowerCase().contains('release') || variant.name.toLowerCase().contains('live')
    },
]

...

flavorDimensions 'branding'
productFlavors {
    cve {
        dimension 'branding'
    }
    whce {
        dimension 'branding'
    }
}

Console output:

Reading env from: env/cve/live
devEnabled: CveDebug, true
devEnabled: CveRelease, false
devEnabled: CveLive, false
devEnabled: WhceDebug, true
devEnabled: WhceRelease, false
devEnabled: WhceLive, false

Reviewed By: cortinico

Differential Revision: D31649977

Pulled By: ShikaSD

fbshipit-source-id: 520734314f4bca7608b8dca67c7c5ce0be6d31a5

grgr-dkrk
grgr-dkrk

Remove action to close upgrade-related issues

Summary: Changelog: [Internal] Remove github action to close upgrade-related issues. We will be moving these issue to react-native repo and using this tag

Reviewed By: cortinico

Differential Revision: D31837195

fbshipit-source-id: 51fdd6efd88c0ebd5c504730406b217c8dbb3a88

grgr-dkrk
grgr-dkrk

Fix issue form description

Summary: Changelog: [Internal] - Fix github issue form description

Reviewed By: cortinico

Differential Revision: D31837196

fbshipit-source-id: 9ccdd0d1773add7f63b9ae8818b2a9364eb965d8

grgr-dkrk
grgr-dkrk

Remove link to outdated release docs

Summary: Changelog: [Internal] - Remove link to outdated release docs

Reviewed By: cortinico

Differential Revision: D31837194

fbshipit-source-id: 9afad47e6d94d185d360af36776cd02a9b155650

grgr-dkrk
grgr-dkrk

Add back Xcode_12_5_M1_post_install_workaround

Summary: Changelog: [Internal] Add back Xcode_12_5_M1_post_install_workaround workaround

Reviewed By: sota000

Differential Revision: D31902449

fbshipit-source-id: 5c9d962d0d1a55a9f14186bd7d6d8fe087101f0d

grgr-dkrk
grgr-dkrk

Accept "Library Type" in generate-specs-cli.js

Summary: Currently, some filtering of generated files are done in multiple places (e.g. generate-specs-cli.js, react_native_pods.rb, etc). I am introducing this arguments so that only needed files are generated for components and modules.

Changelog: [internal]

Reviewed By: hramos, cortinico

Differential Revision: D31878098

fbshipit-source-id: d2dc8f51ea14a5d0ba1548bd481814220c9ae3a2

grgr-dkrk
grgr-dkrk

Update React DevTools v4.20.2

Summary: Update react-devtools-core and react-devtools dependencies for RN, VSCode, Flipper, etc.

js1 upgrade react-devtools -v 4.20.2

Changelog:

[General][Changed] - Upgraded react-devtools-core dependency to 4.20.2

Reviewed By: lunaruan

Differential Revision: D31809278

fbshipit-source-id: 0360fe173cfc7ce09595e6db4e8e41c6f64becd7

grgr-dkrk
grgr-dkrk

Add a check for library_type

Summary: Adding an error check to make debugging easier when codegen fails when invalid library_type option is passed.

Changelog: [internal]

Reviewed By: hramos

Differential Revision: D31907880

fbshipit-source-id: c1ffa6bbd7b3e4faede88da2ee8d3378fa086780

grgr-dkrk
grgr-dkrk

Update XMLHttpRequest.getAllResponseHeaders() implementation (#32353) (#32363)

Summary: As per the XMLHttpRequest specification [1], getAllResponseHeaders() should return a string of headers with lowercased names and sorted by their uppercase representation, with each header ending with '\r\n'.

[1] https://xhr.spec.whatwg.org/#the-getallresponseheaders()-method

Changelog

[General] [Changed] XMLHttpRequest.getAllResponseHeaders() now returns headers with names lowercased and sorted in ascending order, as per specification

Pull Request resolved: https://github.com/facebook/react-native/pull/32363

Test Plan: Test derived from Web Platform Test repository: https://github.com/web-platform-tests/wpt/tree/master/xhr

Reviewed By: yungsters

Differential Revision: D31626217

Pulled By: sota000

fbshipit-source-id: 299d005facbe1c15b8cda5eed6750db75addca80

grgr-dkrk
grgr-dkrk

Expose Pressability Hover config props in Pressable (#32405)

Summary: Several desktop forks (react-native-macos, react-native-windows, react-native-web) support mouse events, and while the stock Pressable component has the ability to support mouse events, it seems we aren't forwarding some props properly from Pressable -> Pressability.

Pressability will calculate onMouseEnter / onMouseLeave event handlers based on the onHoverIn/onHoverOut callbacks passed into PressabilityConfig. https://github.com/facebook/react-native/blob/ad0d4534a751ed05f84ff971714c8f7a4d1deb3a/Libraries/Pressability/Pressability.js#L552 However, Pressable does not pass take in onHoverIn/onHoverOut props to pass to PressabilityConfig, so we can't take advantage of this functionality. This change should simply address that by passing the props through.

Changelog

[General] [Fixed] - Pressabel not passing hover props and event handlers to PressabilityConfig

Pull Request resolved: https://github.com/facebook/react-native/pull/32405

Test Plan: I fixed a similar issue in react-native-macos that I am now trying to contribute back upstream. https://github.com/microsoft/react-native-macos/pull/855

Reviewed By: yungsters

Differential Revision: D31667737

Pulled By: sota000

fbshipit-source-id: f0bbe48302703bb2c45280d2afeec8d7a4586b6a

grgr-dkrk
grgr-dkrk

Move codegen output out of node_modules

Summary: In this diff, it moves the codegen output location out of node_modules and to build/generated/ios folder.

A temp pod spec will be created so that those files will be included in the Xcode project.

Changelog: [Internal]

Reviewed By: hramos, cortinico

Differential Revision: D31809012

fbshipit-source-id: ba1c884c8024306ba0fd2102837b7dbebc6e18ac

grgr-dkrk
grgr-dkrk

Add fabric_enabled check in generate_temp_pod_spec_for_codegen

Summary: I missed to push this change in the previous diff D31809012 (https://github.com/facebook/react-native/commit/f7e4c07c84b636fc33c64b434964c8a64c43438f).

This diff adds a check so that only when fabric is enabled it include the React-graphic dependency.

Changelog: [internal]

Reviewed By: fkgozali

Differential Revision: D31919354

fbshipit-source-id: 0b4e7f489155f868cdf58bec3f61f309470ca0c6

grgr-dkrk
grgr-dkrk

Remove unused ensureComponentIsNative mock

Summary: Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D31893181

fbshipit-source-id: 63204b818465f8ae06135f42c63e1340f6abb351

grgr-dkrk
grgr-dkrk

Add bundleForVariant option (#32472)

Summary: Ref https://github.com/facebook/react-native/pull/30606#issuecomment-948458552

Changelog

[Android] [Added] - Add bundleForVariant option

Pull Request resolved: https://github.com/facebook/react-native/pull/32472

Test Plan: I added the following log into react.gradle and ran the Android build for my app:

println("bundleEnabled: ${targetName}, ${bundleForVariant(variant)}")
# build.gradle

project.ext.react = [
    entryFile: "index.android.js",
    enableHermes: true,  // clean and rebuild if changing
    bundleForVariant: {
         def variant -> variant.name.toLowerCase().contains('release') || variant.name.toLowerCase().contains('live')
    },
]

...

flavorDimensions 'branding'
productFlavors {
    cve {
        dimension 'branding'
    }
    whce {
        dimension 'branding'
    }
}

Console output:

Reading env from: env/cve/live
bundleEnabled: CveDebug, false
bundleEnabled: CveRelease, true
bundleEnabled: CveLive, true
bundleEnabled: WhceDebug, false
bundleEnabled: WhceRelease, true
bundleEnabled: WhceLive, true

Reviewed By: cortinico, ryancat

Differential Revision: D31910406

Pulled By: ShikaSD

fbshipit-source-id: baca5efaddedddad15d974cc7bb8f3c2a4c4f35b

commit sha: 17da903935dc5539cb8ffea0515bbe9df396e69e

push time in 1 month ago
Oct
30
1 month ago
push

grgr-dkrk push grgr-dkrk/react-native

grgr-dkrk
grgr-dkrk

Hide the logbox window explicitly. New behavior in iOS SDK appears to… (#32435)

Summary: Fixes https://github.com/facebook/react-native/issues/32434: RCTLogBox window is orphaned, covering entire screen.

After this change, the logbox window once again is removed from the screen.

Changelog

Some third-party SDKs may hold references to created UIWindow, UIViewController, or UIView objects. Doing so means that the current code's hide method that releases the reference to the UIWindow in LogBox will not cause the window to be dealloc'd, and thus instead it will remain on the screen. This change explicitly hides the LogBox window when the reference is released, so that even if some other SDK holds onto the window it will still be taken off the screen.

[iOS] [Fixed] - 32434

Pull Request resolved: https://github.com/facebook/react-native/pull/32435

Test Plan:

  1. Use console.warn to generate a yellow warning message in log box.  Also install a third-party SDK that holds onto a reference to UIWindow -- for example the Facebook SDK, the Data Dog SDK, or any number of other SDKs that use `swizzling` to intercept calls like `viewDidAppear:`.
    
  2. click the log
    
  3. tap "dismiss"
    
  4. try to tap anywhere
    
  5. Use Xcode view debugger to inspect the UI state

Expected

The app still responds to the touch. In Xcode, there is not an extra UIWindow covering the screen

Reviewed By: philIip

Differential Revision: D31794242

Pulled By: sshic

fbshipit-source-id: 28aa247b3ed3fd60b8e7c2ed7d0606cbf5c42408

grgr-dkrk
grgr-dkrk

Daily arc lint --take CLANGFORMAT

Reviewed By: zertosh

Differential Revision: D31891742

fbshipit-source-id: f6f6ad019e972de5acc8d04f0e8c8d9c9a2e3324

grgr-dkrk
grgr-dkrk

Fix devDisabledInStaging not working with multiple productFlavors (#30606)

Summary: Fixes https://github.com/facebook/react-native/issues/27052

Since react-native 0.62, the devDisabledIn${buildType} syntax has stopped working for apps with multiple productFlavors. This PR adds the disableDevForVariant lambda to allow dev mode to be disabled for different variants.

Changelog

[Android] [Fixed] - Fix devDisabledIn not working with multiple productFlavors

Pull Request resolved: https://github.com/facebook/react-native/pull/30606

Test Plan: I added the following log into react.gradle and ran the Android build for my app:

println("devEnabled: ${targetName}, ${devEnabled}")
# build.gradle

project.ext.react = [
    entryFile: "index.android.js",
    enableHermes: true,  // clean and rebuild if changing
    bundleInLive: true,
    disableDevForVariant: {
         def variant -> variant.name.toLowerCase().contains('release') || variant.name.toLowerCase().contains('live')
    },
]

...

flavorDimensions 'branding'
productFlavors {
    cve {
        dimension 'branding'
    }
    whce {
        dimension 'branding'
    }
}

Console output:

Reading env from: env/cve/live
devEnabled: CveDebug, true
devEnabled: CveRelease, false
devEnabled: CveLive, false
devEnabled: WhceDebug, true
devEnabled: WhceRelease, false
devEnabled: WhceLive, false

Reviewed By: cortinico

Differential Revision: D31649977

Pulled By: ShikaSD

fbshipit-source-id: 520734314f4bca7608b8dca67c7c5ce0be6d31a5

grgr-dkrk
grgr-dkrk

Remove action to close upgrade-related issues

Summary: Changelog: [Internal] Remove github action to close upgrade-related issues. We will be moving these issue to react-native repo and using this tag

Reviewed By: cortinico

Differential Revision: D31837195

fbshipit-source-id: 51fdd6efd88c0ebd5c504730406b217c8dbb3a88

grgr-dkrk
grgr-dkrk

Fix issue form description

Summary: Changelog: [Internal] - Fix github issue form description

Reviewed By: cortinico

Differential Revision: D31837196

fbshipit-source-id: 9ccdd0d1773add7f63b9ae8818b2a9364eb965d8

grgr-dkrk
grgr-dkrk

Remove link to outdated release docs

Summary: Changelog: [Internal] - Remove link to outdated release docs

Reviewed By: cortinico

Differential Revision: D31837194

fbshipit-source-id: 9afad47e6d94d185d360af36776cd02a9b155650

grgr-dkrk
grgr-dkrk

Add back Xcode_12_5_M1_post_install_workaround

Summary: Changelog: [Internal] Add back Xcode_12_5_M1_post_install_workaround workaround

Reviewed By: sota000

Differential Revision: D31902449

fbshipit-source-id: 5c9d962d0d1a55a9f14186bd7d6d8fe087101f0d

grgr-dkrk
grgr-dkrk

Accept "Library Type" in generate-specs-cli.js

Summary: Currently, some filtering of generated files are done in multiple places (e.g. generate-specs-cli.js, react_native_pods.rb, etc). I am introducing this arguments so that only needed files are generated for components and modules.

Changelog: [internal]

Reviewed By: hramos, cortinico

Differential Revision: D31878098

fbshipit-source-id: d2dc8f51ea14a5d0ba1548bd481814220c9ae3a2

grgr-dkrk
grgr-dkrk

Update React DevTools v4.20.2

Summary: Update react-devtools-core and react-devtools dependencies for RN, VSCode, Flipper, etc.

js1 upgrade react-devtools -v 4.20.2

Changelog:

[General][Changed] - Upgraded react-devtools-core dependency to 4.20.2

Reviewed By: lunaruan

Differential Revision: D31809278

fbshipit-source-id: 0360fe173cfc7ce09595e6db4e8e41c6f64becd7

grgr-dkrk
grgr-dkrk

Add a check for library_type

Summary: Adding an error check to make debugging easier when codegen fails when invalid library_type option is passed.

Changelog: [internal]

Reviewed By: hramos

Differential Revision: D31907880

fbshipit-source-id: c1ffa6bbd7b3e4faede88da2ee8d3378fa086780

grgr-dkrk
grgr-dkrk

Update XMLHttpRequest.getAllResponseHeaders() implementation (#32353) (#32363)

Summary: As per the XMLHttpRequest specification [1], getAllResponseHeaders() should return a string of headers with lowercased names and sorted by their uppercase representation, with each header ending with '\r\n'.

[1] https://xhr.spec.whatwg.org/#the-getallresponseheaders()-method

Changelog

[General] [Changed] XMLHttpRequest.getAllResponseHeaders() now returns headers with names lowercased and sorted in ascending order, as per specification

Pull Request resolved: https://github.com/facebook/react-native/pull/32363

Test Plan: Test derived from Web Platform Test repository: https://github.com/web-platform-tests/wpt/tree/master/xhr

Reviewed By: yungsters

Differential Revision: D31626217

Pulled By: sota000

fbshipit-source-id: 299d005facbe1c15b8cda5eed6750db75addca80

grgr-dkrk
grgr-dkrk

Expose Pressability Hover config props in Pressable (#32405)

Summary: Several desktop forks (react-native-macos, react-native-windows, react-native-web) support mouse events, and while the stock Pressable component has the ability to support mouse events, it seems we aren't forwarding some props properly from Pressable -> Pressability.

Pressability will calculate onMouseEnter / onMouseLeave event handlers based on the onHoverIn/onHoverOut callbacks passed into PressabilityConfig. https://github.com/facebook/react-native/blob/ad0d4534a751ed05f84ff971714c8f7a4d1deb3a/Libraries/Pressability/Pressability.js#L552 However, Pressable does not pass take in onHoverIn/onHoverOut props to pass to PressabilityConfig, so we can't take advantage of this functionality. This change should simply address that by passing the props through.

Changelog

[General] [Fixed] - Pressabel not passing hover props and event handlers to PressabilityConfig

Pull Request resolved: https://github.com/facebook/react-native/pull/32405

Test Plan: I fixed a similar issue in react-native-macos that I am now trying to contribute back upstream. https://github.com/microsoft/react-native-macos/pull/855

Reviewed By: yungsters

Differential Revision: D31667737

Pulled By: sota000

fbshipit-source-id: f0bbe48302703bb2c45280d2afeec8d7a4586b6a

grgr-dkrk
grgr-dkrk

Move codegen output out of node_modules

Summary: In this diff, it moves the codegen output location out of node_modules and to build/generated/ios folder.

A temp pod spec will be created so that those files will be included in the Xcode project.

Changelog: [Internal]

Reviewed By: hramos, cortinico

Differential Revision: D31809012

fbshipit-source-id: ba1c884c8024306ba0fd2102837b7dbebc6e18ac

grgr-dkrk
grgr-dkrk

Add fabric_enabled check in generate_temp_pod_spec_for_codegen

Summary: I missed to push this change in the previous diff D31809012 (https://github.com/facebook/react-native/commit/f7e4c07c84b636fc33c64b434964c8a64c43438f).

This diff adds a check so that only when fabric is enabled it include the React-graphic dependency.

Changelog: [internal]

Reviewed By: fkgozali

Differential Revision: D31919354

fbshipit-source-id: 0b4e7f489155f868cdf58bec3f61f309470ca0c6

grgr-dkrk
grgr-dkrk

Remove unused ensureComponentIsNative mock

Summary: Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D31893181

fbshipit-source-id: 63204b818465f8ae06135f42c63e1340f6abb351

grgr-dkrk
grgr-dkrk

Add bundleForVariant option (#32472)

Summary: Ref https://github.com/facebook/react-native/pull/30606#issuecomment-948458552

Changelog

[Android] [Added] - Add bundleForVariant option

Pull Request resolved: https://github.com/facebook/react-native/pull/32472

Test Plan: I added the following log into react.gradle and ran the Android build for my app:

println("bundleEnabled: ${targetName}, ${bundleForVariant(variant)}")
# build.gradle

project.ext.react = [
    entryFile: "index.android.js",
    enableHermes: true,  // clean and rebuild if changing
    bundleForVariant: {
         def variant -> variant.name.toLowerCase().contains('release') || variant.name.toLowerCase().contains('live')
    },
]

...

flavorDimensions 'branding'
productFlavors {
    cve {
        dimension 'branding'
    }
    whce {
        dimension 'branding'
    }
}

Console output:

Reading env from: env/cve/live
bundleEnabled: CveDebug, false
bundleEnabled: CveRelease, true
bundleEnabled: CveLive, true
bundleEnabled: WhceDebug, false
bundleEnabled: WhceRelease, true
bundleEnabled: WhceLive, true

Reviewed By: cortinico, ryancat

Differential Revision: D31910406

Pulled By: ShikaSD

fbshipit-source-id: baca5efaddedddad15d974cc7bb8f3c2a4c4f35b

grgr-dkrk
grgr-dkrk

Use context from entry point for prerendering

Summary: Some of the prerendered surfaces rely on Android context being present to have correct theming (e.g. for platform colors) and measurements of platform components. This change uses context provided to initialize the surface as themed context before view is attached. This way it is possible to configure theming with ContextThemeWrapper the same way as Litho does it for prerendering. The assumption is that any kind of customization done through Android theme will be applied from prerendering entry point as well.

Changelog: [Internal] - Use context from surface for prerendering

Reviewed By: mdvacca

Differential Revision: D31906091

fbshipit-source-id: 344fc96eb2f85ba5b762bee64d1a29443b3fd1d3

grgr-dkrk
grgr-dkrk

Fix ReactSwitch for non RippleDrawable backgrounds (#32468)

Summary: ReactSwitch component is crashing on Android when it is initialised with both a backgroundColor and thumbColor, style={{ backgroundColor: "anyColor" }} thumbColor="anyColor", due to IllegalCastException.

When setting a background color, BaseViewManagerDelegate is calling setBackgroundColor which replaces the background drawable with a ColorDrawale, hence this line fails.

Instead, given the ripple effect needs to be preserved, one should initialise a RippleDrawable using the current background drawable and set it as the background of the switch.

Given the RippleDrawable should be preserved, overriding the setBackgroundColor seemed the sensible thing to do.

Changelog

[Android] [Fixed] - Fix crash when a Switch is initialised with both backgroundColor and thumbColor.

Pull Request resolved: https://github.com/facebook/react-native/pull/32468

Test Plan:

Setup:

Initialise an empty React Native project. Add a switch component: <Switch style={{backgroundColor: 'red'}} thumbColor={'https://github.com/facebook/react-native/issues/356'} /> Run the project yarn android

Current state (RN 65+):

Red screen will show highlighting an IllegalCastException.

With fix:

  • The component is expected to have a red background.
  • When pressed a ripple effect shows inside the backgrounds bounding box.
  • Business as usual otherwise.

backgroundColor with thumbColor: backgroundColor + thumbColor

Just thumbColor: Screen Recording 2021-10-25 at 00 23 57

Reviewed By: ShikaSD

Differential Revision: D31895690

Pulled By: cortinico

fbshipit-source-id: 60af16de7db61440ccfbf11d67a3d945dd90b562

grgr-dkrk
grgr-dkrk

Enable complete_nullability on //xplat/js/react-native-github:RCTTypeSafety (#32473)

Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/32473

Reviewed By: AdamCmiel

Differential Revision: D31775069

fbshipit-source-id: f3aaee36c1ca8a209610f8b66c7adc90bd2b8c7e

grgr-dkrk
grgr-dkrk

Re-add libreact_debug to codegen makefile and add prebuilts for them

Summary: While working updating the codeden Makefile template for Android, I've removed the libreact_debug and libreact_render_debug dependencies as they were unused in a simple turbomodule. Turns out that :ReactAndroid is depending on having those dependencies.

Moving the build file to use AGP APIs, triggers this scenario and is making ReactAndroid failing to build (see the build status for https://github.com/facebook/react-native/pull/32443).

I'm updating the codegen Makefile template to reintrodce the two libraries + I've update the prebuilt makefile (used in the playbook) to include react_debug prebuilts as they were missing.

Changelog: [Internal] [Changed] - Re-add libreact_debug to codegen makefile and add prebuilts for them

Reviewed By: ShikaSD

Differential Revision: D31900675

fbshipit-source-id: ff188c0498a0dca4a951a548a580ca8dd0674782

commit sha: 6790cf137f73f2d7863911f9115317048c66a6ee

push time in 1 month ago
Oct
29
1 month ago
pull request

grgr-dkrk merge to facebook/react-native-website

grgr-dkrk
grgr-dkrk

feat(accessibility): add `isAccessibilityServiceEnabled` section

This PR adds documentation for the features implemented in https://github.com/facebook/react-native/pull/31396.

open pull request

grgr-dkrk wants to merge facebook/react-native-website

grgr-dkrk
grgr-dkrk

feat(accessibility): add `isAccessibilityServiceEnabled` section

This PR adds documentation for the features implemented in https://github.com/facebook/react-native/pull/31396.

Oct
28
1 month ago
push

grgr-dkrk push grgr-dkrk/react-native-website

grgr-dkrk
grgr-dkrk

fix(accessibilityInfo): improve text for isAccessibilityServiceEnabled

commit sha: 1fa1cb829e51b60a33efd662685a9516434fbb36

push time in 1 month ago
push

grgr-dkrk push grgr-dkrk/react-native

grgr-dkrk
grgr-dkrk

fix(accessibilityInfo): fix suggestions

commit sha: ab66bd281c39796052b7e3926a91739a16904333

push time in 1 month ago
push

grgr-dkrk push grgr-dkrk/html

grgr-dkrk
grgr-dkrk

Check BroadcastChannel origin against creation-time current

...instead of against the creation-time incumbent. This helps with #1430, and allows a good amount of simplification as we no longer have to track the "BroadcastChannel settings object" separately from the relevant settings object.

This also modernizes and cleans up the BroadcastChannel section editorially, and adds messageerror events to the garbage collection considerations.

grgr-dkrk
grgr-dkrk

Change MessagePort owner from incumbent to current

The "owner" of a MessagePort is set a lot, but only used for determining what document (if any) should be associated with that MessagePort's tasks. I.e., it ensures that when that document becomes not-fully-active, the tasks are not run.

Tests 1 show that the use of incumbent settings object for the owner of MessageChannel-created MessagePorts was incorrect. In fact, the current settings object (or relevant settings object of this) is used.

This allows for a dramatic simplification, as it means that the MessagePort's owner is always equal to its relevant settings object. Thus, we can entirely delete the owner concept, and the associated specialized "create a new MessagePort object" algorithm.

This does require tweaking the examples of how the incumbent concept works, now that a simple constructor is no longer available to demonstrate the point.

This also modernizes the definition of MessageChannel.

Closes #4340. Helps with #1430.

grgr-dkrk
grgr-dkrk

Add the manifest link relation

This integrates the manifest link relation into the HTML Standard, using its existing link-fetching machinery to replace what was previously in https://w3c.github.io/manifest/#manifest-life-cycle. This includes the following changes from those algorithms:

  • It sets the request's client.
  • It respects the nonce="", integrity="", and referrerpolicy="" attributes.
  • It causes non-ok status responses to fail, instead of processing the response body anyway.
  • It sets the use-URL-credentials flag.
  • It changes the handling of the crossorigin="" attribute to be consistent with the modulepreload link relation, with a default of "same-origin" instead of "omit".

Co-authored-by: Domenic Denicola [email protected] Co-authored-by: Marcos Cáceres [email protected]

grgr-dkrk
grgr-dkrk

Editorial: fix typo in decoding="" attribute description

grgr-dkrk
grgr-dkrk
grgr-dkrk
grgr-dkrk

Editorial: align with Fetch's structured field changes

See https://github.com/whatwg/fetch/pull/1056.

grgr-dkrk
grgr-dkrk

Introduce the navigation params struct

Closes #5727. Along the way this includes some minor fixes and cleanups which this refactoring made more obvious or necessary:

  • Stops unnecessarily passing along the incumbent navigation origin and active document navigation origin. They are used early in the navigation process and don't need to be threaded through the later algorithms (and thus aren't included in the navigation params struct).

  • Ensures that all error cases (i.e. "Page load processing model for inline content that doesn't have a DOM") result in an opaque-origin Document. Previously only one call site set that, and did so awkwardly, from a distance.

  • Fixes error cases to use "unsafe-none" COOP, instead of null COOP (which is not a thing).

  • Explicitly passes the browsing context to "Page load processing model for inline content that doesn't have a DOM" (which makes it more clear that the browsing context is the only input; the navigation params are not used in this case).

  • Adds two XXX boxes where the current architecture is not quite right: multipart/x-mixed-replace needs to use the navigation params somehow, and error pages probably need to synthesize a response instead of passing null to "create and initialize a Document object".

  • Minor algorithm flow cleanups, e.g. using numbered steps instead of long sentences with several "and"s.

grgr-dkrk
grgr-dkrk

Reference more baseline concepts in CSS Inline Layout

In particular hanging, alphabetic, and ideographic-under. (This also clarifies that ideographic meant ideographic-under.)

See https://github.com/w3c/csswg-drafts/issues/5266 for context.

grgr-dkrk
grgr-dkrk

Meta: improve review-draft.sh

One line changes in source and two lines change relative to source in the copy that is made.

grgr-dkrk
grgr-dkrk

Meta: align review-draft.sh with copyright year removal

grgr-dkrk
grgr-dkrk

Review Draft Publication: July 2020

grgr-dkrk
grgr-dkrk

Editorial: use more inclusive terminology in AppCache

The AppCache description currently uses a non-inclusive term to refer to primary entries the manifest/cache. This change replaces the non-inclusive term with the word "primary". No change is needed in any implementations as a result of this change.

grgr-dkrk
grgr-dkrk

Editorial: reference "set union" from Infra

grgr-dkrk
grgr-dkrk

Do not delay the load event for aborted media loads

Fixes #3065, and matches all existing implementations.

grgr-dkrk
grgr-dkrk

Sanitize classic script's base URL when muted errors flag is set

Fixes #5751.

grgr-dkrk
grgr-dkrk

Fix a mixup between "flow content" and "phrasing content"

Closes #5764.

grgr-dkrk
grgr-dkrk

Adjust registerProtocolHandler() handling

This makes things a bit more explicit and roughly aligns what was "escaped version" with implementations.

Corresponding URL Standard PR: https://github.com/whatwg/url/pull/513.

Tests: https://github.com/web-platform-tests/wpt/pull/23504.

Closes #3377.

grgr-dkrk
grgr-dkrk

registerProtocolHandler(): correct placement of note

%s inside a scheme/host/port causes the URL parser to return failure.

As discussed at https://github.com/web-platform-tests/wpt/pull/24886.

grgr-dkrk
grgr-dkrk

Editorial: Update references to [JSIMPORTMETA] to refer to [JAVASCRIPT]

The import.meta proposal became Stage 4 on March 2020 and was incorporated into the JavaScript specification. Update HTML's references to reflect this.

commit sha: 3ad5159be8f27e110a70cefadcb50fc45ec21b05

push time in 1 month ago
push

grgr-dkrk push grgr-dkrk/react-native-paper

grgr-dkrk
grgr-dkrk

docs: Add Groovy to Showcase (#2871)

grgr-dkrk
grgr-dkrk

fix: use remove method on the event subscription (#2918)

grgr-dkrk
grgr-dkrk

fix: use remove method on the event subscription (#2923)

grgr-dkrk
grgr-dkrk

chore: upgrade react-theme-provider (#2930)

grgr-dkrk
grgr-dkrk

fix: correct toggling rtl in example app (#2934)

grgr-dkrk
grgr-dkrk

feat: introduce first iteration of AnimatedFAB component (#2580)

grgr-dkrk
grgr-dkrk

feat: use theme colors in Banner (#2932)

grgr-dkrk
grgr-dkrk

refactor(modal): migrate to functional component (#2557)

grgr-dkrk
grgr-dkrk

fix: correct displaying progress bar on Android (#2916)

grgr-dkrk
grgr-dkrk

feat(banner): add optional callback for on animation complete (#2758)

grgr-dkrk
grgr-dkrk

fix(2928): Radio Button (RadioButton) onPress Bug (#2931)

Co-authored-by: Luki Wolski [email protected]

grgr-dkrk
grgr-dkrk

fix: comply to eslint warnings in example files (#2946)

grgr-dkrk
grgr-dkrk

fix: override Card surface colors with theme (#2948)

grgr-dkrk
grgr-dkrk

test: update test files to comply with eslint rules (#2941)

grgr-dkrk
grgr-dkrk

feat: improve banner accessibility on Android (#2949)

grgr-dkrk
grgr-dkrk

feat: custom title for ListItem (#2886)

Co-authored-by: Luke Walczak [email protected]

grgr-dkrk
grgr-dkrk

chore: upgrade node version on CI (#2950)

grgr-dkrk
grgr-dkrk

fix: Ripple effect on DrawerItem (#2879)

Co-authored-by: lukewalczak [email protected]

grgr-dkrk
grgr-dkrk

Add custom close icon for the Chip component (#2883)

Co-authored-by: Koussay Haj Kacem [email protected]

grgr-dkrk
grgr-dkrk

fix: chrome autofill in flat TextInput on web (#2850)

commit sha: 58851e3376430b8c4278faa38f5b43339743784d

push time in 1 month ago
pull request

grgr-dkrk merge to callstack/react-native-paper

grgr-dkrk
grgr-dkrk

fix: unified behavior when focusing on CheckBox.Item with screen reader

Summary

fix #2920

This PR unifies the differences in the behavior of CheckBox.Item between screen readers as much as possible. Specifically, add information such as accessibilityRole to the wrapper for CheckBox.Item so that the label and check status are read aloud at the same time.

Test plan

I updated the snapshot and added a snapshot when it was checked to see if the state was updated. Please check the video for specific behavior.

https://user-images.githubusercontent.com/40130327/136795703-fce770b6-05cc-4ec9-8fff-d386ae3e01a1.mp4

https://user-images.githubusercontent.com/40130327/136795709-71d8390f-3967-48ec-bc57-6ebf44d259cb.mp4

open pull request

grgr-dkrk wants to merge callstack/react-native-paper

grgr-dkrk
grgr-dkrk

fix: unified behavior when focusing on CheckBox.Item with screen reader

Summary

fix #2920

This PR unifies the differences in the behavior of CheckBox.Item between screen readers as much as possible. Specifically, add information such as accessibilityRole to the wrapper for CheckBox.Item so that the label and check status are read aloud at the same time.

Test plan

I updated the snapshot and added a snapshot when it was checked to see if the state was updated. Please check the video for specific behavior.

https://user-images.githubusercontent.com/40130327/136795703-fce770b6-05cc-4ec9-8fff-d386ae3e01a1.mp4

https://user-images.githubusercontent.com/40130327/136795709-71d8390f-3967-48ec-bc57-6ebf44d259cb.mp4

grgr-dkrk
grgr-dkrk

@brunohkbx Thanks, You're completely right. I think it's a better way. Let me fix it as soon as possible.

Oct
27
1 month ago
Activity icon
issue

grgr-dkrk issue comment facebook/react-native

grgr-dkrk
grgr-dkrk

Android: Expandable/Collapsible State

Description

The "expanded" accessibilityState for Android is currently faked by appending to the content description, rather than implemented correctly. This has all sorts of side effects, such as:

  • On some components, the state expanded/collapsed is properly announced on focus, on some it is not.
  • On some components only the expanded/collapsed state is announced, and not other component text.
  • Upon change, state change is not always announced.
  • The accessibilityState's "expanded" field does not seem to work on all element types (for example, it has no effect on
  • using accessibilityActions it is possible to add an action for expand/collapse, but these are treated as custom actions and must have their own label defined, rather than using Androids built in expand/collapse actions, which Talkback has predefined labels for.

React Native version:

v0.63

Expected Behavior

Upon focus, either "expanded" or "collapsed" should be announced, depending on whether the accessibilityState's "expanded" field is set to true or false. Upon state change, the new state should be announced. If an expand/collapse action is desired, you should be able to use the default system ones, rather than having to define custom ones yourself.

Snack

https://snack.expo.io/0YOQfXFBi

Android Details

Expandable and Collapsible are unique in the Android Accessibility API, in that they are not represented as properties on the View or AccessibilityNodeInfo, but are only represented as AccessibilityActions on the AccessibilityNodeInfo. This means that Talkback determines whether or not a node is "expandable" or "collapsible", or potentially even both, by looking at the list of AccessibilityActions attached to the AccessibilityNodeInfo.

When setting the accessibilityState's expandable property, it should correlate to adding an action of either AccessibilityNodeInfoCompat.ACTION_EXPAND or AccessibilityNodeInfoCompat.ACTION_COLLAPSE on the AccessibilityNodeInfo. This work should be done in the ReactAccessibilityDelegate class's

Currently, this feature is being "faked" by appending to the contentDescription in the BaseViewManager class. This should be removed when this feature is implemented properly.

Activity icon
issue

grgr-dkrk issue comment facebook/react-native

grgr-dkrk
grgr-dkrk

iOS: Accessibility Language Support

Requires API Proposal

This issue may require a new API, or a change to an existing API. An API proposal should be added and discussed before proceeding with implementation. The API proposal can be added in the comments of this issue or linked as a separate issue.

Description

It should be possible to set a specific language for text to be read by VoiceOver. Text to be read is not always the same as the system-wide locale.

React Native version:

v0.63

Expected Behavior

There could be an attribute like "accessibilityLanguage = {...}" which would be set on an applicable type of text.

iOS Details

It seems feasible that the native accessibilityLanguage property could be bridged for applicable components.

grgr-dkrk
grgr-dkrk

I'm also running into this problem. I want to fix it.

@inatonix Are there any updates?

Activity icon
issue

grgr-dkrk issue comment facebook/react-native

grgr-dkrk
grgr-dkrk

iOS/Android: Text input error for screenreaders

Requires API Proposal

This issue requires a new API. An API proposal should be added and discussed before proceeding with implementation. The API proposal can be added in the comments of this issue or linked as a separate issue.

Description

Cannot specify error text on TextInputs. Errors for form fields, while they can be displayed visually in many unique ways, need to have a strong association with the problematic field itself for accessibility. Otherwise, any users who can't visually see the relation of the error to the field won't necessarily know which field is the problem.

React Native version:

v0.63

Expected Results

Upon focus of a text input in an error state, the error message specified should announced after the main focus announcement, prefixed with "Error: ". Upon changing the contents of a text input which puts the input into an error state, an error message should be announced prefixed with "Error: ".

Snack

https://snack.expo.io/X4NIqnJ2K

Android Details

To implement error states on Android, you should call the setError method of the TextView. This will automatically set the correct properties on the AccessibilityNodeInfo that will inform screen readers to this state. If you need to do this manually, what this does behind the scenes is call setContentInvalid(true) and setError(youErrorString) on the AccessibilityNodeInfo.

iOS Details

iOS has no standard pattern for the presentation of error states on text inputs, so I'd recommend we follow Android's pattern here. To do this, you'll need to implement a key press listener, and on change, detect if the field is now in an error state. If it is, you'll need to make a manual screen reader announcement of the error message, and append this message to the accessibilityValue for the field.

grgr-dkrk
grgr-dkrk
Activity icon
issue

grgr-dkrk issue comment facebook/react-native

grgr-dkrk
grgr-dkrk

feat: add `isAccessibilityServiceEnabled`

Summary

fix #30863

This PR adds isAccessibilityServiceEnabled to get if accessibility services are enabled on Android.

Changelog

[Android] [Added] - Added isAccessibilityServiceEnabled to get if accessibility services are enabled

Test Plan

accessibilityService

grgr-dkrk
grgr-dkrk
pull request

grgr-dkrk pull request facebook/react-native-website

grgr-dkrk
grgr-dkrk

feat(accessibility): add `isAccessibilityServiceEnabled` section

This PR adds documentation for the features implemented in https://github.com/facebook/react-native/pull/31396.

Activity icon
created branch

grgr-dkrk in grgr-dkrk/react-native-website create branch feat/add_accessibilityServiceEnabled

createdAt 1 month ago
push

grgr-dkrk push grgr-dkrk/react-native-website

grgr-dkrk
grgr-dkrk

fix preview deploy failure due to links in older blog posts (#2803)

grgr-dkrk
grgr-dkrk

add section of stickyHeaderHiddenOnScroll option (#2801)

grgr-dkrk
grgr-dkrk

Update native-modules-android.md (#2791)

  • Update native-modules-android.md

Those two methods are missing in the documentation and an exception is sent if they are not in the code.

Co-authored-by: Simon BRUNOU [email protected]

grgr-dkrk
grgr-dkrk

[Docs] Add an asterisk note to the hermes bundle is in use (#2804)

grgr-dkrk
grgr-dkrk

docs: add missing Android Permissions to respective releases (#2816)

grgr-dkrk
grgr-dkrk

Update _getting-started-macos-ios.md (#2821)

grgr-dkrk
grgr-dkrk

Update fresco version requirement (#2824)

Co-authored-by: Bartosz Kaszubowski [email protected]

grgr-dkrk
grgr-dkrk

refactor: fixed typo on line 37 (#2826)

grgr-dkrk
grgr-dkrk

Correct documentation for onSelectionChange (#2819)

  • Correct documentation for onSelectionChange

https://github.com/facebook/react-native-website/pull/881 added a note to say that onSelectionChange only works when multiline is enabled but I just tested off RN main branch as of today without multiline set and onSelectionChange still fires. Maybe this was a bug previously or a change that was made to the API but the docs were never updated.

  • Update prior versions
grgr-dkrk
grgr-dkrk

Changed "living on" to "living in" (#2825)

grgr-dkrk
grgr-dkrk

[Blog] Toward Hermes being the default (#2828)

grgr-dkrk
grgr-dkrk

Update pixelratio.md (#2823)

  • Update pixelratio.md

  • Update pixelratio.md

commit sha: bb86b2fca627fe9c0f94132a410911a373f0a35b

push time in 1 month ago
Oct
26
1 month ago
Activity icon
issue

grgr-dkrk issue comment facebook/react-native

grgr-dkrk
grgr-dkrk

Android: One element labelling another

Requires API Proposal

This issue requires a new API. An API proposal should be added and discussed before proceeding with implementation. The API proposal can be added in the comments of this issue or linked as a separate issue.

Description

No concept of "labelFor" or "labeledBy" or any way to pass a reference to another element as the accessibilityLabel property of an element. Used most when building complex forms.

React Native version:

v0.63

Expected Behavior

Android has a labelFor property on View, which allows you to pass a reference to the ID of another view, that this view should act as the label for. When Focusing on the other view, it will announce

For example, if you have these two Views

<Text labelFor="123">Wifi</Text>
<Checkbox accessibilityLabel="checkbox" id="123" />

And you focus on the checkbox, it would announce "checkbox for Wifi".

Android Details

Any API to add this feature should manipulate the underlying View's labelFor property. It will need a reference of the ID of the element that is being labelled to properly work.

grgr-dkrk
grgr-dkrk

@blavalla @amarlette @kacieb I apologize for not making a proposal here. I'm working on this with #32470.

Activity icon
issue

grgr-dkrk issue comment facebook/react-native

grgr-dkrk
grgr-dkrk

feat: add `accessibilityLabelledBy` props

Summary

related: #30846, #26739

Added accessibilityLabelledBy props to find the nativeID of the associated label, it mainly for<TextInput>.

The reason for implementing it as labelledBy instead of labelFor is as follows.

  • It was difficult to find a component with labelFor because the <Text> component does not add the labelFor received from her Props to the View's tag.
  • The use case looks like the HTML aria-labelledby, which is intuitive for web developers. It also seems easy to convert to a web platform.

Changelog

[Android] [Added] - add accessibilityLabelledBy props

Test Plan

I checked it with RNTester using an Android11.

https://user-images.githubusercontent.com/40130327/138666856-891d9f4d-52cf-4181-a81f-13b033037db4.mp4

grgr-dkrk
grgr-dkrk

@lunaleaps

Do you have any plans for implementing this on iOS?

I didn't plan to implement it on iOS because there is no API equivalent to this props (like accessibilityLiveRegion). If that's the work needed to add this feature, I'll consider an implementation.

Additionally, could we add documentation for this in react-native-website for this new functionality?

If there is no problem, I will work on it. Thank you very much.

open pull request

grgr-dkrk wants to merge facebook/react-native

grgr-dkrk
grgr-dkrk

feat: add `accessibilityLabelledBy` props

Summary

related: #30846, #26739

Added accessibilityLabelledBy props to find the nativeID of the associated label, it mainly for<TextInput>.

The reason for implementing it as labelledBy instead of labelFor is as follows.

  • It was difficult to find a component with labelFor because the <Text> component does not add the labelFor received from her Props to the View's tag.
  • The use case looks like the HTML aria-labelledby, which is intuitive for web developers. It also seems easy to convert to a web platform.

Changelog

[Android] [Added] - add accessibilityLabelledBy props

Test Plan

I checked it with RNTester using an Android11.

https://user-images.githubusercontent.com/40130327/138666856-891d9f4d-52cf-4181-a81f-13b033037db4.mp4

grgr-dkrk
grgr-dkrk

I couldn't come up with a concrete plan (like when it received multiple IDs) to reproduce the consistent behavior of aria-labelledby on Android, but I changed props to be able to specify an array. Thank you very much.

pull request

grgr-dkrk merge to facebook/react-native

grgr-dkrk
grgr-dkrk

feat: add `accessibilityLabelledBy` props

Summary

related: #30846, #26739

Added accessibilityLabelledBy props to find the nativeID of the associated label, it mainly for<TextInput>.

The reason for implementing it as labelledBy instead of labelFor is as follows.

  • It was difficult to find a component with labelFor because the <Text> component does not add the labelFor received from her Props to the View's tag.
  • The use case looks like the HTML aria-labelledby, which is intuitive for web developers. It also seems easy to convert to a web platform.

Changelog

[Android] [Added] - add accessibilityLabelledBy props

Test Plan

I checked it with RNTester using an Android11.

https://user-images.githubusercontent.com/40130327/138666856-891d9f4d-52cf-4181-a81f-13b033037db4.mp4

Previous