mirror of
https://github.com/laurent22/joplin.git
synced 2026-06-18 20:16:34 +02:00
65 lines
2.6 KiB
Diff
65 lines
2.6 KiB
Diff
# This patch improves the note actions menu (the kebab menu)'s accessibility
|
|
# by labelling its dismiss button.
|
|
diff --git a/build/rnpm.js b/build/rnpm.js
|
|
index 47bc91a88b9e2246a0ce4295f9f932da6a572461..75b5a22bdcbc2594238bcf953df6d54e18cc7793 100644
|
|
--- a/build/rnpm.js
|
|
+++ b/build/rnpm.js
|
|
@@ -1267,7 +1267,9 @@
|
|
onPress = _this$props.onPress,
|
|
style = _this$props.style;
|
|
return React__default.createElement(reactNative.TouchableWithoutFeedback, {
|
|
- onPress: onPress
|
|
+ onPress: onPress,
|
|
+ accessibilityLabel: _this$props.accessibilityLabel,
|
|
+ accessibilityRole: 'button',
|
|
}, React__default.createElement(reactNative.Animated.View, {
|
|
style: [styles.fullscreen, {
|
|
opacity: this.fadeAnim
|
|
@@ -1282,7 +1284,8 @@
|
|
}(React.Component);
|
|
|
|
Backdrop.propTypes = {
|
|
- onPress: propTypes.func.isRequired
|
|
+ onPress: propTypes.func.isRequired,
|
|
+ accessibilityLabel: propTypes.string,
|
|
};
|
|
var styles = reactNative.StyleSheet.create({
|
|
fullscreen: {
|
|
@@ -1352,6 +1355,7 @@
|
|
style: styles$1.placeholder
|
|
}, React__default.createElement(Backdrop, {
|
|
onPress: ctx._onBackdropPress,
|
|
+ accessibilityLabel: this.props.closeButtonLabel,
|
|
style: backdropStyles,
|
|
ref: ctx.onBackdropRef
|
|
}), ctx._makeOptions());
|
|
@@ -1784,6 +1788,7 @@
|
|
}), React__default.createElement(MenuPlaceholder, {
|
|
ctx: this,
|
|
backdropStyles: customStyles.backdrop,
|
|
+ closeButtonLabel: this.props.closeButtonLabel,
|
|
ref: this._onPlaceholderRef
|
|
}))));
|
|
}
|
|
@@ -1854,7 +1859,7 @@
|
|
var _options$props = options.props,
|
|
optionsContainerStyle = _options$props.optionsContainerStyle,
|
|
renderOptionsContainer = _options$props.renderOptionsContainer,
|
|
- customStyles = _options$props.customStyles;
|
|
+ customStyles = _options$props.customStyles || {};
|
|
var optionsRenderer = renderOptionsContainer || defaultOptionsContainerRenderer;
|
|
var isOutside = !triggerLayout || !optionsLayout;
|
|
|
|
diff --git a/src/index.d.ts b/src/index.d.ts
|
|
index 7e1ef2e441a665e97c304984080399f9646395df..673c4f713757abfb1851cba0d4560020c83e5f50 100644
|
|
--- a/src/index.d.ts
|
|
+++ b/src/index.d.ts
|
|
@@ -18,6 +18,7 @@ declare module "react-native-popup-menu" {
|
|
menuProviderWrapper?: StyleProp<ViewStyle>;
|
|
backdrop?: StyleProp<ViewStyle>;
|
|
};
|
|
+ closeButtonLabel: string;
|
|
backHandler?: boolean | Function;
|
|
skipInstanceCheck?: boolean;
|
|
children: React.ReactNode;
|