Skip to content

Commit

Permalink
Merge pull request #37663 from dukenv0307/fix/37158
Browse files Browse the repository at this point in the history
Map role 'switch' to button element
  • Loading branch information
luacmartins authored Mar 4, 2024
2 parents 0b447c3 + 7579f2d commit dd457d5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions patches/react-native-web+0.19.9+004+fixLastSpacer.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
diff --git a/node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAccessibilityComponent.js b/node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAccessibilityComponent.js
index 9c9a533..7794181 100644
--- a/node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAccessibilityComponent.js
+++ b/node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAccessibilityComponent.js
@@ -27,7 +27,8 @@ var roleComponents = {
navigation: 'nav',
paragraph: 'p',
region: 'section',
- strong: 'strong'
+ strong: 'strong',
+ switch: 'button'
};
var emptyObject = {};
var propsToAccessibilityComponent = function propsToAccessibilityComponent(props) {
diff --git a/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js b/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js
index faeb323..68d740a 100644
index 7f6c880..b05da08 100644
--- a/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js
+++ b/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js
@@ -78,14 +78,6 @@ function scrollEventThrottleOrDefault(scrollEventThrottle) {
Expand All @@ -17,7 +31,7 @@ index faeb323..68d740a 100644

/**
* Base implementation for the more convenient [`<FlatList>`](https://reactnative.dev/docs/flatlist)
@@ -1119,7 +1111,8 @@ class VirtualizedList extends StateSafePureComponent {
@@ -1107,7 +1099,8 @@ class VirtualizedList extends StateSafePureComponent {
_keylessItemComponentName = '';
var spacerKey = this._getSpacerKey(!horizontal);
var renderRegions = this.state.renderMask.enumerateRegions();
Expand Down

0 comments on commit dd457d5

Please sign in to comment.