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

Call view accessibility fixes #7439

Merged
merged 6 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions res/css/views/voip/CallView/_CallViewButtons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ See the License for the specific language governing permissions and
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this cause issues in Firefox? It's been known to disagree with floats on some properties, particularly at low numbers like this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, I'm maintaining the current impl, just tweaking when its shown/hidden

pointer-events: none;
}

.mx_CallViewButtons {
position: absolute;
display: flex;
Expand All @@ -26,11 +33,6 @@ limitations under the License.
z-index: 200; // To be above _all_ feeds
gap: 18px;

&.mx_CallViewButtons_hidden {
opacity: 0.001; // opacity 0 can cause a re-layout
pointer-events: none;
}

.mx_CallViewButtons_button {
cursor: pointer;

Expand Down
8 changes: 0 additions & 8 deletions res/css/views/voip/_CallView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ limitations under the License.
}

.mx_CallView_presenting {
opacity: 1;
transition: opacity 0.5s;

position: absolute;
margin-top: 18px;
padding: 4px 8px;
Expand All @@ -223,8 +220,3 @@ limitations under the License.
color: white;
background-color: #17191c;
}

.mx_CallView_presenting_hidden {
opacity: 0.001; // opacity 0 can cause a re-layout
pointer-events: none;
}
7 changes: 6 additions & 1 deletion src/components/views/elements/DialPadBackspaceButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

import * as React from "react";

import { _t } from "../../../languageHandler";
import AccessibleButton, { ButtonEvent } from "./AccessibleButton";

interface IProps {
Expand All @@ -26,7 +27,11 @@ interface IProps {
export default class DialPadBackspaceButton extends React.PureComponent<IProps> {
render() {
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>;
}
}
14 changes: 1 addition & 13 deletions src/components/views/voip/CallView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ interface IState {
vidMuted: boolean;
screensharing: boolean;
callState: CallState;
controlsVisible: boolean;
hoveringControls: boolean;
showMoreMenu: boolean;
showDialpad: boolean;
primaryFeed: CallFeed;
secondaryFeeds: Array<CallFeed>;
sidebarShown: boolean;
Expand Down Expand Up @@ -123,10 +119,6 @@ export default class CallView extends React.Component<IProps, IState> {
vidMuted: this.props.call.isLocalVideoMuted(),
screensharing: this.props.call.isScreensharing(),
callState: this.props.call.state,
controlsVisible: true,
hoveringControls: false,
showMoreMenu: false,
showDialpad: false,
primaryFeed: primary,
secondaryFeeds: secondary,
sidebarShown: true,
Expand Down Expand Up @@ -573,10 +565,6 @@ export default class CallView extends React.Component<IProps, IState> {

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

toast = (
<div className={presentingClasses}>
<div className="mx_CallView_presenting">
{ text }
</div>
);
Expand Down
7 changes: 6 additions & 1 deletion src/components/views/voip/DialPad.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import * as React from "react";

import AccessibleButton, { ButtonEvent } from "../elements/AccessibleButton";
import { replaceableComponent } from "../../../utils/replaceableComponent";
import { _t } from "../../../languageHandler";

const BUTTONS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '0', '#'];
const BUTTON_LETTERS = ['', 'ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQRS', 'TUV', 'WXYZ', '', '+', ''];
Expand Down Expand Up @@ -49,7 +50,11 @@ class DialPadButton extends React.PureComponent<IButtonProps> {
</div>
</AccessibleButton>;
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")}
/>;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@
"%(sharerName)s is presenting": "%(sharerName)s is presenting",
"Your camera is turned off": "Your camera is turned off",
"Your camera is still enabled": "Your camera is still enabled",
"Dial": "Dial",
"Dialpad": "Dialpad",
"Mute the microphone": "Mute the microphone",
"Unmute the microphone": "Unmute the microphone",
Expand Down Expand Up @@ -2179,6 +2180,7 @@
"Share entire screen": "Share entire screen",
"Application window": "Application window",
"Share content": "Share content",
"Backspace": "Backspace",
"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.",
"collapse": "collapse",
Expand Down