From 7c08116dc2d968137537a242acefeefd1c0eda25 Mon Sep 17 00:00:00 2001 From: virtuacoplenny Date: Tue, 3 Apr 2018 12:32:00 -0700 Subject: [PATCH] ref(toolbar): add accessibility labels for torture tests (#2685) * ref(toolbar): add accessibility labels for torture tests * squash: update propTypes --- .../invite/components/InfoDialogButton.web.js | 1 + .../toolbox/components/AbstractToolbarButton.js | 6 ++++++ .../components/OverflowMenuButton.web.js | 1 + .../toolbox/components/OverflowMenuItem.web.js | 7 +++++++ .../components/OverflowMenuProfileItem.web.js | 1 + .../toolbox/components/ToolbarButtonV2.web.js | 1 + .../toolbox/components/ToolboxFilmstrip.web.js | 5 ++++- .../toolbox/components/ToolboxV2.web.js | 17 ++++++++++++++++- .../components/buttons/AudioMuteButton.web.js | 1 + .../components/buttons/HangupButton.web.js | 1 + .../components/buttons/VideoMuteButton.web.js | 1 + 11 files changed, 40 insertions(+), 2 deletions(-) diff --git a/react/features/invite/components/InfoDialogButton.web.js b/react/features/invite/components/InfoDialogButton.web.js index c656f67e8..ad81a39c3 100644 --- a/react/features/invite/components/InfoDialogButton.web.js +++ b/react/features/invite/components/InfoDialogButton.web.js @@ -273,6 +273,7 @@ class InfoDialogButton extends Component { onClose = { this._onDialogClose } position = { 'top right' }> diff --git a/react/features/toolbox/components/AbstractToolbarButton.js b/react/features/toolbox/components/AbstractToolbarButton.js index e9247218d..32e0bc834 100644 --- a/react/features/toolbox/components/AbstractToolbarButton.js +++ b/react/features/toolbox/components/AbstractToolbarButton.js @@ -13,6 +13,12 @@ export default class AbstractToolbarButton extends Component { * @static */ static propTypes = { + /** + * A succinct description of what the button does. Used by accessibility + * tools and torture tests. + */ + accessibilityLabel: PropTypes.string, + /** * The name of the Icon of this {@code AbstractToolbarButton}. */ diff --git a/react/features/toolbox/components/OverflowMenuButton.web.js b/react/features/toolbox/components/OverflowMenuButton.web.js index fb332923f..b02799f42 100644 --- a/react/features/toolbox/components/OverflowMenuButton.web.js +++ b/react/features/toolbox/components/OverflowMenuButton.web.js @@ -72,6 +72,7 @@ class OverflowMenuButton extends Component { onClose = { this._onCloseDialog } position = { 'top right' }> diff --git a/react/features/toolbox/components/OverflowMenuItem.web.js b/react/features/toolbox/components/OverflowMenuItem.web.js index ca91df0ce..e767f3f16 100644 --- a/react/features/toolbox/components/OverflowMenuItem.web.js +++ b/react/features/toolbox/components/OverflowMenuItem.web.js @@ -14,6 +14,12 @@ class OverflowMenuItem extends Component { * @static */ static propTypes = { + /** + * A succinct description of what the item does. Used by accessibility + * tools and torture tests. + */ + accessibilityLabel: PropTypes.string, + /** * The icon class to use for displaying an icon before the link text. */ @@ -39,6 +45,7 @@ class OverflowMenuItem extends Component { render() { return (
  • diff --git a/react/features/toolbox/components/OverflowMenuProfileItem.web.js b/react/features/toolbox/components/OverflowMenuProfileItem.web.js index 4a442eba5..7a5fd8c39 100644 --- a/react/features/toolbox/components/OverflowMenuProfileItem.web.js +++ b/react/features/toolbox/components/OverflowMenuProfileItem.web.js @@ -74,6 +74,7 @@ class OverflowMenuProfileItem extends Component { return (
  • diff --git a/react/features/toolbox/components/ToolbarButtonV2.web.js b/react/features/toolbox/components/ToolbarButtonV2.web.js index 348e0c0c3..2b7ac1cb3 100644 --- a/react/features/toolbox/components/ToolbarButtonV2.web.js +++ b/react/features/toolbox/components/ToolbarButtonV2.web.js @@ -50,6 +50,7 @@ class ToolbarButtonV2 extends AbstractToolbarButton { _renderButton(children) { return (
    { const { t } = this.props; return ( -
    +
    { this._shouldShowButton('microphone') && } { this._shouldShowButton('camera') && } { this._shouldShowButton('fodeviceselection') && { && this._renderDesktopSharingButton() } { this._shouldShowButton('raisehand') && { { this._shouldShowButton('chat') &&
    { { this._shouldShowButton('invite') && !_hideInviteButton && } @@ -369,7 +372,9 @@ class ToolboxV2 extends Component { && -
      +
        { overflowMenuContent }
      } @@ -940,6 +945,7 @@ class ToolboxV2 extends Component { return ( @@ -969,12 +975,14 @@ class ToolboxV2 extends Component { onClick = { this._onToolbarToggleProfile } />, this._shouldShowButton('settings') && , this._shouldShowButton('sharedvideo') && { this._shouldShowButton('etherpad') && _etherpadInitialized && { : t('toolbar.documentOpen') } />, this._shouldShowButton('fullscreen') && { this._renderRecordingButton(), this._shouldShowButton('videoquality') && , this._shouldShowButton('stats') && { this._shouldShowButton('feedback') && _feedbackConfigured && , this._shouldShowButton('shortcuts') && { return (