Call view accessibility fixes (#7439)
This commit is contained in:
parent
cdbe59900c
commit
44d7d74949
6 changed files with 22 additions and 28 deletions
|
@ -16,6 +16,13 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// data-whatintent makes more sense here semantically but then the tooltip would stay visible without the button
|
||||||
|
// which looks broken, so we match the behaviour of tooltips which is fine too.
|
||||||
|
[data-whatinput="mouse"] .mx_CallViewButtons.mx_CallViewButtons_hidden {
|
||||||
|
opacity: 0.001; // opacity 0 can cause a re-layout
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.mx_CallViewButtons {
|
.mx_CallViewButtons {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -26,11 +33,6 @@ limitations under the License.
|
||||||
z-index: 200; // To be above _all_ feeds
|
z-index: 200; // To be above _all_ feeds
|
||||||
gap: 18px;
|
gap: 18px;
|
||||||
|
|
||||||
&.mx_CallViewButtons_hidden {
|
|
||||||
opacity: 0.001; // opacity 0 can cause a re-layout
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_CallViewButtons_button {
|
.mx_CallViewButtons_button {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
|
|
@ -211,9 +211,6 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_CallView_presenting {
|
.mx_CallView_presenting {
|
||||||
opacity: 1;
|
|
||||||
transition: opacity 0.5s;
|
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
|
@ -223,8 +220,3 @@ limitations under the License.
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #17191c;
|
background-color: #17191c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_CallView_presenting_hidden {
|
|
||||||
opacity: 0.001; // opacity 0 can cause a re-layout
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ limitations under the License.
|
||||||
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
|
||||||
|
import { _t } from "../../../languageHandler";
|
||||||
import AccessibleButton, { ButtonEvent } from "./AccessibleButton";
|
import AccessibleButton, { ButtonEvent } from "./AccessibleButton";
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
|
@ -26,7 +27,11 @@ interface IProps {
|
||||||
export default class DialPadBackspaceButton extends React.PureComponent<IProps> {
|
export default class DialPadBackspaceButton extends React.PureComponent<IProps> {
|
||||||
render() {
|
render() {
|
||||||
return <div className="mx_DialPadBackspaceButtonWrapper">
|
return <div className="mx_DialPadBackspaceButtonWrapper">
|
||||||
<AccessibleButton className="mx_DialPadBackspaceButton" onClick={this.props.onBackspacePress} />
|
<AccessibleButton
|
||||||
|
className="mx_DialPadBackspaceButton"
|
||||||
|
onClick={this.props.onBackspacePress}
|
||||||
|
aria-label={_t("Backspace")}
|
||||||
|
/>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,10 +68,6 @@ interface IState {
|
||||||
vidMuted: boolean;
|
vidMuted: boolean;
|
||||||
screensharing: boolean;
|
screensharing: boolean;
|
||||||
callState: CallState;
|
callState: CallState;
|
||||||
controlsVisible: boolean;
|
|
||||||
hoveringControls: boolean;
|
|
||||||
showMoreMenu: boolean;
|
|
||||||
showDialpad: boolean;
|
|
||||||
primaryFeed: CallFeed;
|
primaryFeed: CallFeed;
|
||||||
secondaryFeeds: Array<CallFeed>;
|
secondaryFeeds: Array<CallFeed>;
|
||||||
sidebarShown: boolean;
|
sidebarShown: boolean;
|
||||||
|
@ -123,10 +119,6 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
vidMuted: this.props.call.isLocalVideoMuted(),
|
vidMuted: this.props.call.isLocalVideoMuted(),
|
||||||
screensharing: this.props.call.isScreensharing(),
|
screensharing: this.props.call.isScreensharing(),
|
||||||
callState: this.props.call.state,
|
callState: this.props.call.state,
|
||||||
controlsVisible: true,
|
|
||||||
hoveringControls: false,
|
|
||||||
showMoreMenu: false,
|
|
||||||
showDialpad: false,
|
|
||||||
primaryFeed: primary,
|
primaryFeed: primary,
|
||||||
secondaryFeeds: secondary,
|
secondaryFeeds: secondary,
|
||||||
sidebarShown: true,
|
sidebarShown: true,
|
||||||
|
@ -573,10 +565,6 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
|
|
||||||
let toast;
|
let toast;
|
||||||
if (someoneIsScreensharing) {
|
if (someoneIsScreensharing) {
|
||||||
const presentingClasses = classNames({
|
|
||||||
mx_CallView_presenting: true,
|
|
||||||
mx_CallView_presenting_hidden: !this.state.controlsVisible,
|
|
||||||
});
|
|
||||||
const sharerName = this.state.primaryFeed.getMember().name;
|
const sharerName = this.state.primaryFeed.getMember().name;
|
||||||
let text = isScreensharing
|
let text = isScreensharing
|
||||||
? _t("You are presenting")
|
? _t("You are presenting")
|
||||||
|
@ -588,7 +576,7 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
toast = (
|
toast = (
|
||||||
<div className={presentingClasses}>
|
<div className="mx_CallView_presenting">
|
||||||
{ text }
|
{ text }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -18,6 +18,7 @@ import * as React from "react";
|
||||||
|
|
||||||
import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
|
import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
|
||||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||||
|
import { _t } from "../../../languageHandler";
|
||||||
|
|
||||||
const BUTTONS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#'];
|
const BUTTONS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#'];
|
||||||
const BUTTON_LETTERS = ['', 'ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQRS', 'TUV', 'WXYZ', '', '+', ''];
|
const BUTTON_LETTERS = ['', 'ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQRS', 'TUV', 'WXYZ', '', '+', ''];
|
||||||
|
@ -49,7 +50,11 @@ class DialPadButton extends React.PureComponent<IButtonProps> {
|
||||||
</div>
|
</div>
|
||||||
</AccessibleButton>;
|
</AccessibleButton>;
|
||||||
case DialPadButtonKind.Dial:
|
case DialPadButtonKind.Dial:
|
||||||
return <AccessibleButton className="mx_DialPad_button mx_DialPad_dialButton" onClick={this.onClick} />;
|
return <AccessibleButton
|
||||||
|
className="mx_DialPad_button mx_DialPad_dialButton"
|
||||||
|
onClick={this.onClick}
|
||||||
|
aria-label={_t("Dial")}
|
||||||
|
/>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -979,6 +979,7 @@
|
||||||
"%(sharerName)s is presenting": "%(sharerName)s is presenting",
|
"%(sharerName)s is presenting": "%(sharerName)s is presenting",
|
||||||
"Your camera is turned off": "Your camera is turned off",
|
"Your camera is turned off": "Your camera is turned off",
|
||||||
"Your camera is still enabled": "Your camera is still enabled",
|
"Your camera is still enabled": "Your camera is still enabled",
|
||||||
|
"Dial": "Dial",
|
||||||
"Dialpad": "Dialpad",
|
"Dialpad": "Dialpad",
|
||||||
"Mute the microphone": "Mute the microphone",
|
"Mute the microphone": "Mute the microphone",
|
||||||
"Unmute the microphone": "Unmute the microphone",
|
"Unmute the microphone": "Unmute the microphone",
|
||||||
|
@ -2180,6 +2181,7 @@
|
||||||
"Share entire screen": "Share entire screen",
|
"Share entire screen": "Share entire screen",
|
||||||
"Application window": "Application window",
|
"Application window": "Application window",
|
||||||
"Share content": "Share content",
|
"Share content": "Share content",
|
||||||
|
"Backspace": "Backspace",
|
||||||
"Join": "Join",
|
"Join": "Join",
|
||||||
"Please <newIssueLink>create a new issue</newIssueLink> on GitHub so that we can investigate this bug.": "Please <newIssueLink>create a new issue</newIssueLink> on GitHub so that we can investigate this bug.",
|
"Please <newIssueLink>create a new issue</newIssueLink> on GitHub so that we can investigate this bug.": "Please <newIssueLink>create a new issue</newIssueLink> on GitHub so that we can investigate this bug.",
|
||||||
"collapse": "collapse",
|
"collapse": "collapse",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue