Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(base/ui): Buttons fix for accessibility large text (#13036)

Calinteodorf7e7750cfb8b
diff --git a/react/features/base/ui/components/native/buttonStyles.ts b/react/features/base/ui/components/native/buttonStyles.ts
index ccad66e878..ec9fa9d05e 100644
--- a/react/features/base/ui/components/native/buttonStyles.ts
+++ b/react/features/base/ui/components/native/buttonStyles.ts
@@ -11,6 +11,7 @@ const button = {
const buttonLabel = {
...BaseTheme.typography.bodyShortBold,
+ lineHeight: 14,
textTransform: 'capitalize'
};
@@ -65,7 +66,7 @@ export default {
buttonLabelTertiary: {
...buttonLabel,
color: BaseTheme.palette.text01,
- margin: BaseTheme.spacing[3],
+ marginHorizontal: BaseTheme.spacing[2],
textAlign: 'center'
},
diff --git a/react/features/conference/components/native/styles.js b/react/features/conference/components/native/styles.js
index ff8e15758d..77e9cfc463 100644
--- a/react/features/conference/components/native/styles.js
+++ b/react/features/conference/components/native/styles.js
@@ -131,6 +131,7 @@ export default {
roomTimer: {
...BaseTheme.typography.bodyShortBold,
color: BaseTheme.palette.text01,
+ lineHeight: 14,
textAlign: 'center'
},
diff --git a/react/features/mobile/navigation/components/HeaderNavigationButton.js b/react/features/mobile/navigation/components/HeaderNavigationButton.js
index e49f37606c..5724b80ba4 100644
--- a/react/features/mobile/navigation/components/HeaderNavigationButton.js
+++ b/react/features/mobile/navigation/components/HeaderNavigationButton.js
@@ -1,7 +1,8 @@
import React from 'react';
-import { Text, TouchableRipple } from 'react-native-paper';
-import { Icon } from '../../../base/icons';
+import Button from '../../../base/ui/components/native/Button';
+import IconButton from '../../../base/ui/components/native/IconButton';
+import { BUTTON_TYPES } from '../../../base/ui/constants.native';
import { navigationStyles } from './styles';
@@ -45,27 +46,24 @@ const HeaderNavigationButton
<>
{
src ? (
- <TouchableRipple
+ <IconButton
onPress = { onPress }
- style = { navigationStyles.headerNavigationButtonIcon } >
- <Icon
- size = { 24 }
- src = { src } />
- </TouchableRipple>
+ size = { 24 }
+ src = { src }
+ style = { navigationStyles.headerNavigationButton } />
) : (
- <TouchableRipple
+ <Button
disabled = { disabled }
- onPress = { onPress }
- style = { navigationStyles.headerNavigationButtonText } >
- <Text
- style = {
- twoActions
- ? navigationStyles.headerNavigationTextBold
- : navigationStyles.headerNavigationText
- }>
- { label }
- </Text>
- </TouchableRipple>
+ labelKey = { label }
+ labelStyle = {
+ twoActions
+ ? navigationStyles.headerNavigationButtonLabelBold
+ : navigationStyles.headerNavigationButtonLabel
+ }
+ onClick = { onPress }
+ style = { navigationStyles.headerNavigationButton }
+ type = { BUTTON_TYPES.TERTIARY }
+ useRippleColor = { false } />
)}
</>
);
diff --git a/react/features/mobile/navigation/components/styles.js b/react/features/mobile/navigation/components/styles.js
index b22b8cfe9e..319591004b 100644
--- a/react/features/mobile/navigation/components/styles.js
+++ b/react/features/mobile/navigation/components/styles.js
@@ -4,19 +4,6 @@ import BaseTheme from '../../../base/ui/components/BaseTheme.native';
export const TEXT_COLOR = BaseTheme.palette.text01;
-const HEADER_ACTION_BUTTON_SIZE = 17;
-
-const headerNavigationButton = {
- alignItems: 'center',
- justifyContent: 'center'
-};
-
-const headerNavigationText = {
- ...BaseTheme.typography.bodyShortBoldLarge,
- color: BaseTheme.palette.link01,
- fontSize: HEADER_ACTION_BUTTON_SIZE
-};
-
const unreadCounterDescription = {
...BaseTheme.typography.bodyShortBoldLarge,
color: BaseTheme.palette.text03
@@ -47,28 +34,17 @@ export const navigationStyles = {
color: TEXT_COLOR
},
- headerNavigationButtonIcon: {
- ...headerNavigationButton,
- height: BaseTheme.spacing[5],
- paddingLeft: BaseTheme.spacing[3],
- width: BaseTheme.spacing[5]
- },
-
- headerNavigationButtonText: {
- ...headerNavigationButton,
- height: BaseTheme.spacing[9],
- width: BaseTheme.spacing[9]
+ headerNavigationButton: {
+ marginLeft: BaseTheme.spacing[2]
},
- headerNavigationText: {
- ...headerNavigationText,
- marginLeft: BaseTheme.spacing[2]
+ headerNavigationButtonLabel: {
+ color: BaseTheme.palette.link01
},
- headerNavigationTextBold: {
- ...headerNavigationText,
+ headerNavigationButtonLabelBold: {
...BaseTheme.typography.bodyShortRegularLarge,
- marginRight: BaseTheme.spacing[1]
+ color: BaseTheme.palette.link01
},
unreadCounterContainer: {
diff --git a/react/features/settings/components/native/SettingsView.tsx b/react/features/settings/components/native/SettingsView.tsx
index 7e6a01e9c7..ef07b60e50 100644
--- a/react/features/settings/components/native/SettingsView.tsx
+++ b/react/features/settings/components/native/SettingsView.tsx
@@ -375,6 +375,7 @@ class SettingsView extends Component<IProps, IState> {
accessibilityLabel = 'settingsView.help'
labelKey = 'settingsView.help'
onClick = { this._onShowHelpPressed }
+ style = { styles.linksButton }
type = { BUTTON_TYPES.TERTIARY } />
{/* @ts-ignore */}
<Divider style = { styles.fieldSeparator } />
@@ -382,6 +383,7 @@ class SettingsView extends Component<IProps, IState> {
accessibilityLabel = 'settingsView.terms'
labelKey = 'settingsView.terms'
onClick = { this._onShowTermsPressed }
+ style = { styles.linksButton }
type = { BUTTON_TYPES.TERTIARY } />
{/* @ts-ignore */}
<Divider style = { styles.fieldSeparator } />
@@ -389,6 +391,7 @@ class SettingsView extends Component<IProps, IState> {
accessibilityLabel = 'settingsView.privacy'
labelKey = 'settingsView.privacy'
onClick = { this._onShowPrivacyPressed }
+ style = { styles.linksButton }
type = { BUTTON_TYPES.TERTIARY } />
</FormSection>
{/* @ts-ignore */}
diff --git a/react/features/settings/components/native/styles.js b/react/features/settings/components/native/styles.js
index 56dc3622a9..d13ae58f31 100644
--- a/react/features/settings/components/native/styles.js
+++ b/react/features/settings/components/native/styles.js
@@ -2,7 +2,6 @@ import BaseTheme from '../../../base/ui/components/BaseTheme.native';
export const ANDROID_UNDERLINE_COLOR = 'transparent';
export const PLACEHOLDER_COLOR = BaseTheme.palette.focus01;
-export const PLACEHOLDER_TEXT_COLOR = BaseTheme.palette.text03;
const TEXT_SIZE = 14;
@@ -146,5 +145,11 @@ export default {
*/
screenContainer: {
flex: 1
+ },
+
+ linksButton: {
+ alignSelf: 'center',
+ maxWidth: 400,
+ width: 'auto'
}
};