-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mobile: Accessibility: Fix "new note" and "new to-do" buttons are foc…
…usable even while invisible (#11899)
- Loading branch information
1 parent
6c89012
commit 7025321
Showing
4 changed files
with
74 additions
and
7 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
.yarn/patches/react-native-paper-npm-5.13.1-f153e542e2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This is a (hopefully temporary) fix for an accessibility issue in the FAB.Group | ||
# component. See https://github.com/callstack/react-native-paper/pull/4498 for details. | ||
diff --git a/lib/commonjs/components/FAB/FABGroup.js b/lib/commonjs/components/FAB/FABGroup.js | ||
index 26933dd7ac6862c0dd95e52b8cd91c8bbd0b6efc..417c91a0257849eb597afb5e339e13b6d1d54486 100644 | ||
--- a/lib/commonjs/components/FAB/FABGroup.js | ||
+++ b/lib/commonjs/components/FAB/FABGroup.js | ||
@@ -209,8 +209,9 @@ const FABGroup = _ref => { | ||
}], | ||
pointerEvents: open ? 'box-none' : 'none', | ||
accessibilityRole: "button", | ||
- importantForAccessibility: "yes", | ||
- accessible: true, | ||
+ importantForAccessibility: open ? 'yes' : 'no-hide-descendants', | ||
+ accessibilityElementsHidden: !open, | ||
+ accessible: open, | ||
accessibilityLabel: accessibilityLabel | ||
}, it.label && /*#__PURE__*/React.createElement(_reactNative.View, null, /*#__PURE__*/React.createElement(_Card.default, { | ||
mode: isV3 ? 'contained' : 'elevated', | ||
diff --git a/lib/module/components/FAB/FABGroup.js b/lib/module/components/FAB/FABGroup.js | ||
index ca5c02679539b17b048d4c82f570791dd8b57545..a06902b744b3bfb06b0644930eda0ba2ce2967ca 100644 | ||
--- a/lib/module/components/FAB/FABGroup.js | ||
+++ b/lib/module/components/FAB/FABGroup.js | ||
@@ -200,8 +200,9 @@ const FABGroup = _ref => { | ||
}], | ||
pointerEvents: open ? 'box-none' : 'none', | ||
accessibilityRole: "button", | ||
- importantForAccessibility: "yes", | ||
- accessible: true, | ||
+ importantForAccessibility: open ? 'yes' : 'no-hide-descendants', | ||
+ accessibilityElementsHidden: !open, | ||
+ accessible: open, | ||
accessibilityLabel: accessibilityLabel | ||
}, it.label && /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Card, { | ||
mode: isV3 ? 'contained' : 'elevated', | ||
diff --git a/src/components/FAB/FABGroup.tsx b/src/components/FAB/FABGroup.tsx | ||
index af1e85c4cbabfdd05499f9befb9f851be5911835..d010393975b0b31852efba1b7ce9cb09da4feaec 100644 | ||
--- a/src/components/FAB/FABGroup.tsx | ||
+++ b/src/components/FAB/FABGroup.tsx | ||
@@ -383,8 +383,9 @@ const FABGroup = ({ | ||
]} | ||
pointerEvents={open ? 'box-none' : 'none'} | ||
accessibilityRole="button" | ||
- importantForAccessibility="yes" | ||
- accessible={true} | ||
+ importantForAccessibility={open ? 'yes' : 'no-hide-descendants'} | ||
+ accessibilityElementsHidden={!open} | ||
+ accessible={open} | ||
accessibilityLabel={accessibilityLabel} | ||
> | ||
{it.label && ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,7 @@ | |
"[email protected]": "patch:rn-fetch-blob@npm%3A0.12.0#./.yarn/patches/rn-fetch-blob-npm-0.12.0-cf02e3c544.patch", | ||
"[email protected]": "patch:app-builder-lib@npm%3A26.0.0-alpha.7#./.yarn/patches/app-builder-lib-npm-26.0.0-alpha.7-e1b3dca119.patch", | ||
"[email protected]": "patch:app-builder-lib@npm%3A24.13.3#./.yarn/patches/app-builder-lib-npm-24.13.3-86a66c0bf3.patch", | ||
"[email protected]": "patch:react-native-sqlite-storage@npm%3A6.0.1#./.yarn/patches/react-native-sqlite-storage-npm-6.0.1-8369d747bd.patch" | ||
"[email protected]": "patch:react-native-sqlite-storage@npm%3A6.0.1#./.yarn/patches/react-native-sqlite-storage-npm-6.0.1-8369d747bd.patch", | ||
"[email protected]": "patch:react-native-paper@npm%3A5.13.1#./.yarn/patches/react-native-paper-npm-5.13.1-f153e542e2.patch" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters