mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Adding grid role to ViewAccessibility to fix flow errors. (#34267)
Summary: Adding grid role to ViewAccessibility to fix flow errors. fixes https://github.com/facebook/react-native/issues/30861 fixes https://github.com/facebook/react-native/issues/30972 ## Changelog [General] [Fixed] - Adding grid role to ViewAccessibility to fix flow errors. Pull Request resolved: https://github.com/facebook/react-native/pull/34267 Test Plan: <details><summary>flow error for missing accessibilityRole type grid</summary> <p> <image src="https://user-images.githubusercontent.com/24992535/180728969-beccb7f7-d882-4a94-831d-1c08822fc030.png" width="800" /> </p> </details> <details><summary>adding grid role to ScrollView</summary> <p> https://user-images.githubusercontent.com/24992535/180721100-62de76af-ea23-44a6-816e-f6fa39835b77.mp4 </p> </details> <details><summary>adding grid role to FlatList</summary> <p> https://user-images.githubusercontent.com/24992535/180724852-861c2981-0b06-4c66-a983-0017785062fe.mp4 </p> </details> <details><summary>adding grid role to SectionList</summary> <p> https://user-images.githubusercontent.com/24992535/180788810-d1869381-1e6b-42aa-b9b2-a84aece41326.mp4 </p> </details> Reviewed By: NickGerleman Differential Revision: D38121921 Pulled By: dmitryrykun fbshipit-source-id: 3bc335b3a525e75ae2e032f6a35540b3e95cd6a8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
88b7b640a7
commit
5ddb9977e6
@@ -43,7 +43,8 @@ export type AccessibilityRole =
|
||||
| 'tablist'
|
||||
| 'timer'
|
||||
| 'list'
|
||||
| 'toolbar';
|
||||
| 'toolbar'
|
||||
| 'grid';
|
||||
|
||||
// the info associated with an accessibility action
|
||||
export type AccessibilityActionInfo = $ReadOnly<{
|
||||
|
||||
@@ -205,6 +205,7 @@ const examples = ([
|
||||
return (
|
||||
<View>
|
||||
<ScrollView
|
||||
accessibilityRole="grid"
|
||||
ref={scrollView => {
|
||||
_scrollView = scrollView;
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user