Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 44d7d74

Browse files
authored
Call view accessibility fixes (#7439)
1 parent cdbe599 commit 44d7d74

File tree

6 files changed

+22
-28
lines changed

6 files changed

+22
-28
lines changed

res/css/views/voip/CallView/_CallViewButtons.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ See the License for the specific language governing permissions and
1616
limitations under the License.
1717
*/
1818

19+
// data-whatintent makes more sense here semantically but then the tooltip would stay visible without the button
20+
// which looks broken, so we match the behaviour of tooltips which is fine too.
21+
[data-whatinput="mouse"] .mx_CallViewButtons.mx_CallViewButtons_hidden {
22+
opacity: 0.001; // opacity 0 can cause a re-layout
23+
pointer-events: none;
24+
}
25+
1926
.mx_CallViewButtons {
2027
position: absolute;
2128
display: flex;
@@ -26,11 +33,6 @@ limitations under the License.
2633
z-index: 200; // To be above _all_ feeds
2734
gap: 18px;
2835

29-
&.mx_CallViewButtons_hidden {
30-
opacity: 0.001; // opacity 0 can cause a re-layout
31-
pointer-events: none;
32-
}
33-
3436
.mx_CallViewButtons_button {
3537
cursor: pointer;
3638

res/css/views/voip/_CallView.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ limitations under the License.
211211
}
212212

213213
.mx_CallView_presenting {
214-
opacity: 1;
215-
transition: opacity 0.5s;
216-
217214
position: absolute;
218215
margin-top: 18px;
219216
padding: 4px 8px;
@@ -223,8 +220,3 @@ limitations under the License.
223220
color: white;
224221
background-color: #17191c;
225222
}
226-
227-
.mx_CallView_presenting_hidden {
228-
opacity: 0.001; // opacity 0 can cause a re-layout
229-
pointer-events: none;
230-
}

src/components/views/elements/DialPadBackspaceButton.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616

1717
import * as React from "react";
1818

19+
import { _t } from "../../../languageHandler";
1920
import AccessibleButton, { ButtonEvent } from "./AccessibleButton";
2021

2122
interface IProps {
@@ -26,7 +27,11 @@ interface IProps {
2627
export default class DialPadBackspaceButton extends React.PureComponent<IProps> {
2728
render() {
2829
return <div className="mx_DialPadBackspaceButtonWrapper">
29-
<AccessibleButton className="mx_DialPadBackspaceButton" onClick={this.props.onBackspacePress} />
30+
<AccessibleButton
31+
className="mx_DialPadBackspaceButton"
32+
onClick={this.props.onBackspacePress}
33+
aria-label={_t("Backspace")}
34+
/>
3035
</div>;
3136
}
3237
}

src/components/views/voip/CallView.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ interface IState {
6868
vidMuted: boolean;
6969
screensharing: boolean;
7070
callState: CallState;
71-
controlsVisible: boolean;
72-
hoveringControls: boolean;
73-
showMoreMenu: boolean;
74-
showDialpad: boolean;
7571
primaryFeed: CallFeed;
7672
secondaryFeeds: Array<CallFeed>;
7773
sidebarShown: boolean;
@@ -123,10 +119,6 @@ export default class CallView extends React.Component<IProps, IState> {
123119
vidMuted: this.props.call.isLocalVideoMuted(),
124120
screensharing: this.props.call.isScreensharing(),
125121
callState: this.props.call.state,
126-
controlsVisible: true,
127-
hoveringControls: false,
128-
showMoreMenu: false,
129-
showDialpad: false,
130122
primaryFeed: primary,
131123
secondaryFeeds: secondary,
132124
sidebarShown: true,
@@ -573,10 +565,6 @@ export default class CallView extends React.Component<IProps, IState> {
573565

574566
let toast;
575567
if (someoneIsScreensharing) {
576-
const presentingClasses = classNames({
577-
mx_CallView_presenting: true,
578-
mx_CallView_presenting_hidden: !this.state.controlsVisible,
579-
});
580568
const sharerName = this.state.primaryFeed.getMember().name;
581569
let text = isScreensharing
582570
? _t("You are presenting")
@@ -588,7 +576,7 @@ export default class CallView extends React.Component<IProps, IState> {
588576
}
589577

590578
toast = (
591-
<div className={presentingClasses}>
579+
<div className="mx_CallView_presenting">
592580
{ text }
593581
</div>
594582
);

src/components/views/voip/DialPad.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import * as React from "react";
1818

1919
import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
2020
import { replaceableComponent } from "../../../utils/replaceableComponent";
21+
import { _t } from "../../../languageHandler";
2122

2223
const BUTTONS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#'];
2324
const BUTTON_LETTERS = ['', 'ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQRS', 'TUV', 'WXYZ', '', '+', ''];
@@ -49,7 +50,11 @@ class DialPadButton extends React.PureComponent<IButtonProps> {
4950
</div>
5051
</AccessibleButton>;
5152
case DialPadButtonKind.Dial:
52-
return <AccessibleButton className="mx_DialPad_button mx_DialPad_dialButton" onClick={this.onClick} />;
53+
return <AccessibleButton
54+
className="mx_DialPad_button mx_DialPad_dialButton"
55+
onClick={this.onClick}
56+
aria-label={_t("Dial")}
57+
/>;
5358
}
5459
}
5560
}

src/i18n/strings/en_EN.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,7 @@
979979
"%(sharerName)s is presenting": "%(sharerName)s is presenting",
980980
"Your camera is turned off": "Your camera is turned off",
981981
"Your camera is still enabled": "Your camera is still enabled",
982+
"Dial": "Dial",
982983
"Dialpad": "Dialpad",
983984
"Mute the microphone": "Mute the microphone",
984985
"Unmute the microphone": "Unmute the microphone",
@@ -2180,6 +2181,7 @@
21802181
"Share entire screen": "Share entire screen",
21812182
"Application window": "Application window",
21822183
"Share content": "Share content",
2184+
"Backspace": "Backspace",
21832185
"Join": "Join",
21842186
"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.",
21852187
"collapse": "collapse",

0 commit comments

Comments
 (0)