fix(i18n) Accessiblity labels translations (#3071)

* fix(toolbar): accessibilityLabel should be translatable.

This commit adds a helper property to get the accessibilityLabel of an item,
providing a translation if one is available. This mimics the behavior of
label and tooltip.

* fix(toolbar) 'hangup' button accessibilityLabel i18n

* fix(toolbar) 'mute' button accessibilityLabel i18n

* fix(toolbar) 'videomute' button accessibilityLabel i18n

* fix(toolbar) 'moreActions' button accessibilityLabel i18n

* fix(toolbar) 'shareRoom' button accessibilityLabel i18n

* fix(toolbar) 'audioRoute' button accessibilityLabel i18n

* fix(toolbar) 'toggleCamera' button accessibilityLabel i18n

* fix(toolbar) 'audioOnly' button accessibilityLabel i18n

* fix(toolbar) 'roomLock' button accessibilityLabel i18n

* fix(toolbar) 'pip' button accessibilityLabel i18n

* fix(toolbar) 'invite' button accessibilityLabel i18n

* fix(toolbar) 'raiseHand' button accessibilityLabel i18n

* fix(toolbar) 'chat' button accessibilityLabel i18n

* fix(toolbar) 'shareYourScreen' button accessibilityLabel i18n

* fix(toolbar) 'fullScreen' button accessibilityLabel i18n

* fix(toolbar) 'sharedvideo' button accessibilityLabel i18n

* fix(toolbar) 'document' button accessibilityLabel i18n

* fix(toolbar) 'speakerStats' button accessibilityLabel i18n

* fix(toolbar) 'feedback' button accessibilityLabel i18n

* fix(toolbar) 'shortcuts' button accessibilityLabel i18n

* fix(toolbar) 'recording' button accessibilityLabel i18n

* fix(toolbar) 'settings' button accessibilityLabel i18n

* fix(welcomepage) accessibilityLabels i18n

* fix(toolbar) 'info' button accessibilityLabel i18n

* fix(i18n): Add translation to various aria-label property values.

* fix(i18n): Differentiate between overflow menu and button.
This commit is contained in:
Guus der Kinderen 2018-06-07 22:32:18 +02:00 committed by virtuacoplenny
parent 84f303dd3c
commit ccf0c8a363
28 changed files with 102 additions and 34 deletions

View File

@ -46,6 +46,10 @@
"showSpeakerStats": "Show speaker stats" "showSpeakerStats": "Show speaker stats"
}, },
"welcomepage":{ "welcomepage":{
"accessibilityLabel": {
"join": "Tap to join",
"roomname": "Enter room name"
},
"appDescription": "Go ahead, video chat with the whole team. In fact, invite everyone you know. __app__ is a fully encrypted, 100% open source video conferencing solution that you can use all day, every day, for free — with no account needed.", "appDescription": "Go ahead, video chat with the whole team. In fact, invite everyone you know. __app__ is a fully encrypted, 100% open source video conferencing solution that you can use all day, every day, for free — with no account needed.",
"audioVideoSwitch": { "audioVideoSwitch": {
"audio": "Voice", "audio": "Voice",
@ -72,6 +76,33 @@
"rejoinKeyTitle": "Rejoin" "rejoinKeyTitle": "Rejoin"
}, },
"toolbar": { "toolbar": {
"accessibilityLabel": {
"audioOnly": "Toggle audio only",
"audioRoute": "Select the audio route",
"callQuality": "Manage call quality",
"chat": "Toggle chat window",
"document": "Toggle shared document",
"feedback": "Leave feedback",
"fullScreen": "Toggle full screen",
"hangup": "Leave the call",
"invite": "Invite people",
"lockRoom": "Toggle room lock",
"moreActions": "Toggle more actions menu",
"moreActionsMenu": "More actions menu",
"mute": "Toggle mute audio",
"pip": "Toggle Picture-in-Picture mode",
"profile": "Edit your profile",
"raiseHand": "Toggle raise hand",
"recording": "Toggle recording",
"Settings": "Toggle settings",
"sharedvideo": "Toggle Youtube video sharing",
"shareRoom": "Invite someone",
"shareYourScreen": "Toggle screenshare",
"shortcuts": "Toggle shortcuts",
"speakerStats": "Toggle speaker statistics",
"toggleCamera": "Toggle camera",
"videomute": "Toggle mute video"
},
"addPeople": "Add people to your call", "addPeople": "Add people to your call",
"audioonly": "Enable / Disable audio only mode (saves bandwidth)", "audioonly": "Enable / Disable audio only mode (saves bandwidth)",
"audioOnlyOn": "Enable audio only mode (saves bandwidth)", "audioOnlyOn": "Enable audio only mode (saves bandwidth)",
@ -207,6 +238,9 @@
"suboptimalExperienceDescription": "Eer... we are afraid your experience with __appName__ isn't going to be that great here. We are looking for ways to improve this but, until then, please try using one of the <a href='static/recommendedBrowsers.html' target='_blank'>fully supported browsers</a>." "suboptimalExperienceDescription": "Eer... we are afraid your experience with __appName__ isn't going to be that great here. We are looking for ways to improve this but, until then, please try using one of the <a href='static/recommendedBrowsers.html' target='_blank'>fully supported browsers</a>."
}, },
"dialog": { "dialog": {
"accessibilityLabel": {
"liveStreaming": "Live Stream"
},
"allow": "Allow", "allow": "Allow",
"confirm": "Confirm", "confirm": "Confirm",
"kickMessage": "Ouch! You have been kicked out of the meet!", "kickMessage": "Ouch! You have been kicked out of the meet!",
@ -523,6 +557,7 @@
"veryGood": "Very Good" "veryGood": "Very Good"
}, },
"info": { "info": {
"accessibilityLabel": "Show info",
"addPassword": "Add password", "addPassword": "Add password",
"cancelPassword": "Cancel password", "cancelPassword": "Cancel password",
"conferenceURL": "Link:", "conferenceURL": "Link:",

View File

@ -27,6 +27,8 @@ type State = {
export default class AudioMuteButton export default class AudioMuteButton
extends AbstractAudioMuteButton<Props, State> { extends AbstractAudioMuteButton<Props, State> {
accessibilityLabel = 'Audio mute';
/** /**
* Initializes a new {@code AudioMuteButton} instance. * Initializes a new {@code AudioMuteButton} instance.
* *

View File

@ -9,6 +9,9 @@ const { api } = window.alwaysOnTop;
* Stateless hangup button for the Always-on-Top windows. * Stateless hangup button for the Always-on-Top windows.
*/ */
export default class HangupButton extends AbstractHangupButton<Props, *> { export default class HangupButton extends AbstractHangupButton<Props, *> {
accessibilityLabel = 'Hangup';
/** /**
* Helper function to perform the actual hangup action. * Helper function to perform the actual hangup action.
* *

View File

@ -27,6 +27,8 @@ type State = {
export default class VideoMuteButton export default class VideoMuteButton
extends AbstractVideoMuteButton<Props, State> { extends AbstractVideoMuteButton<Props, State> {
accessibilityLabel = 'Video mute';
/** /**
* Initializes a new {@code VideoMuteButton} instance. * Initializes a new {@code VideoMuteButton} instance.
* *

View File

@ -9,7 +9,6 @@ import type { Props } from './AbstractButton';
export default class AbstractAudioMuteButton<P: Props, S: *> export default class AbstractAudioMuteButton<P: Props, S: *>
extends AbstractButton<P, S> { extends AbstractButton<P, S> {
accessibilityLabel = 'Audio mute';
iconName = 'icon-microphone'; iconName = 'icon-microphone';
toggledIconName = 'icon-mic-disabled toggled'; toggledIconName = 'icon-mic-disabled toggled';

View File

@ -9,7 +9,6 @@ import type { Props } from './AbstractButton';
export default class AbstractHangupButton<P : Props, S: *> export default class AbstractHangupButton<P : Props, S: *>
extends AbstractButton<P, S> { extends AbstractButton<P, S> {
accessibilityLabel = 'Hangup';
iconName = 'icon-hangup'; iconName = 'icon-hangup';
/** /**

View File

@ -146,6 +146,17 @@ export default class AbstractToolboxItem<P : Props> extends Component<P> {
return this._maybeTranslateAttribute(this.props.tooltip); return this._maybeTranslateAttribute(this.props.tooltip);
} }
/**
* Helper property to get the item accessibilityLabel. If a translation
* function was provided then it will be translated using it.
*
* @protected
* @returns {?string}
*/
get accessibilityLabel(): ?string {
return this._maybeTranslateAttribute(this.props.accessibilityLabel);
}
/** /**
* Utility function to translate the given string, if a translation * Utility function to translate the given string, if a translation
* function is available. * function is available.

View File

@ -9,7 +9,6 @@ import type { Props } from './AbstractButton';
export default class AbstractVideoMuteButton<P : Props, S : *> export default class AbstractVideoMuteButton<P : Props, S : *>
extends AbstractButton<P, S> { extends AbstractButton<P, S> {
accessibilityLabel = 'Video mute';
iconName = 'icon-camera'; iconName = 'icon-camera';
toggledIconName = 'icon-camera-disabled toggled'; toggledIconName = 'icon-camera-disabled toggled';

View File

@ -50,7 +50,6 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
*/ */
_renderItem() { _renderItem() {
const { const {
accessibilityLabel,
disabled, disabled,
onClick, onClick,
showLabel, showLabel,
@ -83,7 +82,7 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
return ( return (
<TouchableHighlight <TouchableHighlight
accessibilityLabel = { accessibilityLabel } accessibilityLabel = { this.accessibilityLabel }
disabled = { disabled } disabled = { disabled }
onPress = { onClick } onPress = { onClick }
style = { style } style = { style }

View File

@ -21,12 +21,11 @@ export default class ToolboxItem extends AbstractToolboxItem<Props> {
*/ */
_renderItem() { _renderItem() {
const { const {
accessibilityLabel,
onClick, onClick,
showLabel showLabel
} = this.props; } = this.props;
const props = { const props = {
'aria-label': accessibilityLabel, 'aria-label': this.accessibilityLabel,
className: showLabel ? 'overflow-menu-item' : 'toolbox-button', className: showLabel ? 'overflow-menu-item' : 'toolbox-button',
onClick onClick
}; };

View File

@ -170,7 +170,7 @@ class InfoDialogButton extends Component {
onClose = { this._onDialogClose } onClose = { this._onDialogClose }
position = { 'top right' }> position = { 'top right' }>
<ToolbarButton <ToolbarButton
accessibilityLabel = 'Info' accessibilityLabel = { t('info.accessibilityLabel') }
iconName = { iconClass } iconName = { iconClass }
onClick = { this._onDialogToggle } onClick = { this._onDialogToggle }
tooltip = { t('info.tooltip') } /> tooltip = { t('info.tooltip') } />

View File

@ -52,7 +52,7 @@ const _SHARE_ROOM_TOOLBAR_BUTTON = true;
* current call/conference/meeting. * current call/conference/meeting.
*/ */
class InviteButton extends AbstractButton<Props, *> { class InviteButton extends AbstractButton<Props, *> {
accessibilityLabel = 'Share room'; accessibilityLabel = 'toolbar.accessibilityLabel.shareRoom';
iconName = 'icon-link'; iconName = 'icon-link';
label = 'toolbar.shareRoom'; label = 'toolbar.shareRoom';

View File

@ -43,7 +43,7 @@ type Props = AbstractButtonProps & {
* A toolbar button which triggers an audio route picker when pressed. * A toolbar button which triggers an audio route picker when pressed.
*/ */
class AudioRouteButton extends AbstractButton<Props, *> { class AudioRouteButton extends AbstractButton<Props, *> {
accessibilityLabel = 'Audio route'; accessibilityLabel = 'toolbar.accessibilityLabel.audioRoute';
iconName = 'icon-volume'; iconName = 'icon-volume';
label = 'toolbar.audioRoute'; label = 'toolbar.audioRoute';

View File

@ -26,7 +26,7 @@ type Props = AbstractButtonProps & {
* An implementation of a button for entering Picture-in-Picture mode. * An implementation of a button for entering Picture-in-Picture mode.
*/ */
class PictureInPictureButton extends AbstractButton<Props, *> { class PictureInPictureButton extends AbstractButton<Props, *> {
accessibilityLabel = 'Picture in picture'; accessibilityLabel = 'toolbar.accessibilityLabel.pip';
iconName = 'icon-menu-down'; iconName = 'icon-menu-down';
label = 'toolbar.pip'; label = 'toolbar.pip';

View File

@ -32,7 +32,7 @@ type Props = AbstractButtonProps & {
* An implementation of a button for locking / unlocking a room. * An implementation of a button for locking / unlocking a room.
*/ */
class RoomLockButton extends AbstractButton<Props, *> { class RoomLockButton extends AbstractButton<Props, *> {
accessibilityLabel = 'Room lock'; accessibilityLabel = 'toolbar.accessibilityLabel.lockRoom';
iconName = 'security'; iconName = 'security';
label = 'dialog.lockRoom'; label = 'dialog.lockRoom';
toggledIconName = 'security-locked'; toggledIconName = 'security-locked';

View File

@ -36,7 +36,7 @@ type Props = AbstractButtonProps & {
* An abstract implementation of a button for accessing settings. * An abstract implementation of a button for accessing settings.
*/ */
class SettingsButton extends AbstractButton<Props, *> { class SettingsButton extends AbstractButton<Props, *> {
accessibilityLabel = 'Settings'; accessibilityLabel = 'toolbar.accessibilityLabel.Settings';
iconName = 'icon-settings'; iconName = 'icon-settings';
label = 'toolbar.Settings'; label = 'toolbar.Settings';
tooltip = 'toolbar.Settings'; tooltip = 'toolbar.Settings';

View File

@ -40,6 +40,7 @@ type Props = AbstractButtonProps & {
* @extends AbstractAudioMuteButton * @extends AbstractAudioMuteButton
*/ */
class AudioMuteButton extends AbstractAudioMuteButton<Props, *> { class AudioMuteButton extends AbstractAudioMuteButton<Props, *> {
accessibilityLabel = 'toolbar.accessibilityLabel.mute';
label = 'toolbar.mute'; label = 'toolbar.mute';
tooltip = 'toolbar.mute'; tooltip = 'toolbar.mute';

View File

@ -26,6 +26,7 @@ type Props = AbstractButtonProps & {
* @extends AbstractHangupButton * @extends AbstractHangupButton
*/ */
class HangupButton extends AbstractHangupButton<Props, *> { class HangupButton extends AbstractHangupButton<Props, *> {
accessibilityLabel = 'toolbar.accessibilityLabel.hangup';
label = 'toolbar.hangup'; label = 'toolbar.hangup';
tooltip = 'toolbar.hangup'; tooltip = 'toolbar.hangup';

View File

@ -49,6 +49,7 @@ type Props = AbstractButtonProps & {
* @extends AbstractVideoMuteButton * @extends AbstractVideoMuteButton
*/ */
class VideoMuteButton extends AbstractVideoMuteButton<Props, *> { class VideoMuteButton extends AbstractVideoMuteButton<Props, *> {
accessibilityLabel = 'toolbar.accessibilityLabel.videomute';
label = 'toolbar.videomute'; label = 'toolbar.videomute';
tooltip = 'toolbar.videomute'; tooltip = 'toolbar.videomute';

View File

@ -27,7 +27,7 @@ type Props = AbstractButtonProps & {
* An implementation of a button for toggling the audio-only mode. * An implementation of a button for toggling the audio-only mode.
*/ */
class AudioOnlyButton extends AbstractButton<Props, *> { class AudioOnlyButton extends AbstractButton<Props, *> {
accessibilityLabel = 'Audio only mode'; accessibilityLabel = 'toolbar.accessibilityLabel.audioOnly';
iconName = 'visibility'; iconName = 'visibility';
label = 'toolbar.audioOnlyOn'; label = 'toolbar.audioOnlyOn';
toggledIconName = 'visibility-off'; toggledIconName = 'visibility-off';

View File

@ -24,7 +24,7 @@ type Props = AbstractButtonProps & {
* An implementation of a button for showing the {@code OverflowMenu}. * An implementation of a button for showing the {@code OverflowMenu}.
*/ */
class OverflowMenuButton extends AbstractButton<Props, *> { class OverflowMenuButton extends AbstractButton<Props, *> {
accessibilityLabel = 'Overflow menu'; accessibilityLabel = 'toolbar.accessibilityLabel.moreActions';
iconName = 'icon-thumb-menu'; iconName = 'icon-thumb-menu';
label = 'toolbar.moreActions'; label = 'toolbar.moreActions';

View File

@ -33,7 +33,7 @@ type Props = AbstractButtonProps & {
* An implementation of a button for toggling the camera facing mode. * An implementation of a button for toggling the camera facing mode.
*/ */
class ToggleCameraButton extends AbstractButton<Props, *> { class ToggleCameraButton extends AbstractButton<Props, *> {
accessibilityLabel = 'Toggle camera'; accessibilityLabel = 'toolbar.accessibilityLabel.toggleCamera';
iconName = 'icon-switch-camera'; iconName = 'icon-switch-camera';
label = 'toolbar.toggleCamera'; label = 'toolbar.toggleCamera';

View File

@ -73,7 +73,8 @@ class OverflowMenuButton extends Component {
onClose = { this._onCloseDialog } onClose = { this._onCloseDialog }
position = { 'top right' }> position = { 'top right' }>
<ToolbarButton <ToolbarButton
accessibilityLabel = 'Overflow' accessibilityLabel =
{ t('toolbar.accessibilityLabel.moreActions') }
iconName = { iconClasses } iconName = { iconClasses }
onClick = { this._onToggleDialogVisibility } onClick = { this._onToggleDialogVisibility }
tooltip = { t('toolbar.moreActions') } /> tooltip = { t('toolbar.moreActions') } />

View File

@ -49,7 +49,7 @@ class OverflowMenuLiveStreamingItem extends Component<Props> {
return ( return (
<li <li
aria-label = 'Live stream' aria-label = { t('dialog.accessibilityLabel.liveStreaming') }
className = 'overflow-menu-item' className = 'overflow-menu-item'
onClick = { onClick }> onClick = { onClick }>
<span className = 'overflow-menu-item-icon'> <span className = 'overflow-menu-item-icon'>

View File

@ -74,7 +74,7 @@ class OverflowMenuProfileItem extends Component {
return ( return (
<li <li
aria-label = 'Profile' aria-label = 'Edit your profile'
className = { classNames } className = { classNames }
onClick = { this._onClick }> onClick = { this._onClick }>
<span className = 'overflow-menu-item-icon'> <span className = 'overflow-menu-item-icon'>

View File

@ -336,6 +336,7 @@ class Toolbox extends Component<Props> {
const overflowMenuContent = this._renderOverflowMenuContent(); const overflowMenuContent = this._renderOverflowMenuContent();
const overflowHasItems = Boolean(overflowMenuContent.filter( const overflowHasItems = Boolean(overflowMenuContent.filter(
child => child).length); child => child).length);
const toolbarAccLabel = 'toolbar.accessibilityLabel.moreActionsMenu';
return ( return (
<div <div
@ -348,7 +349,8 @@ class Toolbox extends Component<Props> {
&& this._renderDesktopSharingButton() } && this._renderDesktopSharingButton() }
{ this._shouldShowButton('raisehand') { this._shouldShowButton('raisehand')
&& <ToolbarButton && <ToolbarButton
accessibilityLabel = 'Raised hand' accessibilityLabel =
{ t('toolbar.accessibilityLabel.raiseHand') }
iconName = { _raisedHand iconName = { _raisedHand
? 'icon-raised-hand toggled' ? 'icon-raised-hand toggled'
: 'icon-raised-hand' } : 'icon-raised-hand' }
@ -357,7 +359,8 @@ class Toolbox extends Component<Props> {
{ this._shouldShowButton('chat') { this._shouldShowButton('chat')
&& <div className = 'toolbar-button-with-badge'> && <div className = 'toolbar-button-with-badge'>
<ToolbarButton <ToolbarButton
accessibilityLabel = 'Chat' accessibilityLabel =
{ t('toolbar.accessibilityLabel.chat') }
iconName = { _chatOpen iconName = { _chatOpen
? 'icon-chat toggled' ? 'icon-chat toggled'
: 'icon-chat' } : 'icon-chat' }
@ -378,7 +381,8 @@ class Toolbox extends Component<Props> {
{ this._shouldShowButton('invite') { this._shouldShowButton('invite')
&& !_hideInviteButton && !_hideInviteButton
&& <ToolbarButton && <ToolbarButton
accessibilityLabel = 'Invite' accessibilityLabel =
{ t('toolbar.accessibilityLabel.invite') }
iconName = 'icon-add' iconName = 'icon-add'
onClick = { this._onToolbarOpenInvite } onClick = { this._onToolbarOpenInvite }
tooltip = { t('toolbar.invite') } /> } tooltip = { t('toolbar.invite') } /> }
@ -388,7 +392,7 @@ class Toolbox extends Component<Props> {
isOpen = { _overflowMenuVisible } isOpen = { _overflowMenuVisible }
onVisibilityChange = { this._onSetOverflowVisible }> onVisibilityChange = { this._onSetOverflowVisible }>
<ul <ul
aria-label = 'Overflow menu' aria-label = { t(toolbarAccLabel) }
className = 'overflow-menu'> className = 'overflow-menu'>
{ overflowMenuContent } { overflowMenuContent }
</ul> </ul>
@ -946,7 +950,8 @@ class Toolbox extends Component<Props> {
return ( return (
<ToolbarButton <ToolbarButton
accessibilityLabel = 'Screenshare' accessibilityLabel
= { t('toolbar.accessibilityLabel.shareYourScreen') }
iconName = { classNames } iconName = { classNames }
onClick = { this._onToolbarToggleScreenshare } onClick = { this._onToolbarToggleScreenshare }
tooltip = { tooltip } /> tooltip = { tooltip } />
@ -985,7 +990,8 @@ class Toolbox extends Component<Props> {
onClick = { this._onToolbarOpenVideoQuality } />, onClick = { this._onToolbarOpenVideoQuality } />,
this._shouldShowButton('fullscreen') this._shouldShowButton('fullscreen')
&& <OverflowMenuItem && <OverflowMenuItem
accessibilityLabel = 'Full screen' accessibilityLabel =
{ t('toolbar.accessibilityLabel.fullScreen') }
icon = { _fullScreen icon = { _fullScreen
? 'icon-exit-full-screen' ? 'icon-exit-full-screen'
: 'icon-full-screen' } : 'icon-full-screen' }
@ -1005,7 +1011,8 @@ class Toolbox extends Component<Props> {
&& this._renderRecordingButton(), && this._renderRecordingButton(),
this._shouldShowButton('sharedvideo') this._shouldShowButton('sharedvideo')
&& <OverflowMenuItem && <OverflowMenuItem
accessibilityLabel = 'Shared video' accessibilityLabel =
{ t('toolbar.accessibilityLabel.sharedvideo') }
icon = 'icon-shared-video' icon = 'icon-shared-video'
key = 'sharedvideo' key = 'sharedvideo'
onClick = { this._onToolbarToggleSharedVideo } onClick = { this._onToolbarToggleSharedVideo }
@ -1015,7 +1022,8 @@ class Toolbox extends Component<Props> {
this._shouldShowButton('etherpad') this._shouldShowButton('etherpad')
&& _etherpadInitialized && _etherpadInitialized
&& <OverflowMenuItem && <OverflowMenuItem
accessibilityLabel = 'Etherpad' accessibilityLabel =
{ t('toolbar.accessibilityLabel.document') }
icon = 'icon-share-doc' icon = 'icon-share-doc'
key = 'etherpad' key = 'etherpad'
onClick = { this._onToolbarToggleEtherpad } onClick = { this._onToolbarToggleEtherpad }
@ -1028,7 +1036,8 @@ class Toolbox extends Component<Props> {
visible = { this._shouldShowButton('settings') } />, visible = { this._shouldShowButton('settings') } />,
this._shouldShowButton('stats') this._shouldShowButton('stats')
&& <OverflowMenuItem && <OverflowMenuItem
accessibilityLabel = 'Speaker stats' accessibilityLabel =
{ t('toolbar.accessibilityLabel.speakerStats') }
icon = 'icon-presentation' icon = 'icon-presentation'
key = 'stats' key = 'stats'
onClick = { this._onToolbarOpenSpeakerStats } onClick = { this._onToolbarOpenSpeakerStats }
@ -1036,14 +1045,16 @@ class Toolbox extends Component<Props> {
this._shouldShowButton('feedback') this._shouldShowButton('feedback')
&& _feedbackConfigured && _feedbackConfigured
&& <OverflowMenuItem && <OverflowMenuItem
accessibilityLabel = 'Feedback' accessibilityLabel =
{ t('toolbar.accessibilityLabel.feedback') }
icon = 'icon-feedback' icon = 'icon-feedback'
key = 'feedback' key = 'feedback'
onClick = { this._onToolbarOpenFeedback } onClick = { this._onToolbarOpenFeedback }
text = { t('toolbar.feedback') } />, text = { t('toolbar.feedback') } />,
this._shouldShowButton('shortcuts') this._shouldShowButton('shortcuts')
&& <OverflowMenuItem && <OverflowMenuItem
accessibilityLabel = 'Shortcuts' accessibilityLabel =
{ t('toolbar.accessibilityLabel.shortcuts') }
icon = 'icon-open_in_new' icon = 'icon-open_in_new'
key = 'shortcuts' key = 'shortcuts'
onClick = { this._onToolbarOpenKeyboardShortcuts } onClick = { this._onToolbarOpenKeyboardShortcuts }
@ -1067,7 +1078,8 @@ class Toolbox extends Component<Props> {
return ( return (
<OverflowMenuItem <OverflowMenuItem
accessibilityLabel = 'Record' accessibilityLabel =
{ t('toolbar.accessibilityLabel.recording') }
icon = 'icon-camera-take-picture' icon = 'icon-camera-take-picture'
key = 'recording' key = 'recording'
onClick = { this._onToolbarToggleRecording } onClick = { this._onToolbarToggleRecording }

View File

@ -68,7 +68,8 @@ class OverflowMenuVideoQualityItem extends Component<Props> {
return ( return (
<li <li
aria-label = 'Call quality' aria-label =
{ this.props.t('toolbar.accessibilityLabel.callQuality') }
className = 'overflow-menu-item' className = 'overflow-menu-item'
onClick = { this.props.onClick }> onClick = { this.props.onClick }>
<span className = 'overflow-menu-item-icon'> <span className = 'overflow-menu-item-icon'>

View File

@ -85,6 +85,7 @@ class WelcomePage extends AbstractWelcomePage {
*/ */
render() { render() {
const { buttonStyle, pageStyle } = Header; const { buttonStyle, pageStyle } = Header;
const roomnameAccLabel = 'welcomepage.accessibilityLabel.roomname';
const { t } = this.props; const { t } = this.props;
return ( return (
@ -101,7 +102,7 @@ class WelcomePage extends AbstractWelcomePage {
<SafeAreaView style = { styles.roomContainer } > <SafeAreaView style = { styles.roomContainer } >
<View style = { styles.joinControls } > <View style = { styles.joinControls } >
<TextInput <TextInput
accessibilityLabel = { 'Input room name.' } accessibilityLabel = { t(roomnameAccLabel) }
autoCapitalize = 'none' autoCapitalize = 'none'
autoComplete = { false } autoComplete = { false }
autoCorrect = { false } autoCorrect = { false }
@ -219,6 +220,7 @@ class WelcomePage extends AbstractWelcomePage {
* @returns {ReactElement} * @returns {ReactElement}
*/ */
_renderJoinButton() { _renderJoinButton() {
const { t } = this.props;
let children; let children;
/* eslint-disable no-extra-parens */ /* eslint-disable no-extra-parens */
@ -248,7 +250,8 @@ class WelcomePage extends AbstractWelcomePage {
return ( return (
<TouchableHighlight <TouchableHighlight
accessibilityLabel = { 'Tap to Join.' } accessibilityLabel =
{ t('welcomepage.accessibilityLabel.join') }
disabled = { buttonDisabled } disabled = { buttonDisabled }
onPress = { this._onJoin } onPress = { this._onJoin }
style = { [ style = { [