Add alternative text to controls to allow screen readers to read them aloud (#1840)

Add alternative text to controls to allow screen readers to read them aloud.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
This commit is contained in:
Florian Scholdei
2021-11-03 10:11:40 +01:00
committed by GitHub
parent b78742ed0b
commit b896df5046
49 changed files with 1274 additions and 553 deletions

View File

@@ -23,7 +23,7 @@
*/
import React, { MouseEvent, ReactNode } from "react";
import classNames from "classnames";
import { withRouter, RouteComponentProps } from "react-router-dom";
import { RouteComponentProps, withRouter } from "react-router-dom";
import Icon from "../Icon";
import { createAttributesForTesting } from "../devBuild";
@@ -51,7 +51,7 @@ type Props = ButtonProps &
class Button extends React.Component<Props> {
static defaultProps: Partial<Props> = {
type: "button",
color: "default"
color: "default",
};
onClick = (event: React.MouseEvent) => {
@@ -76,7 +76,7 @@ class Button extends React.Component<Props> {
fullWidth,
reducedMobile,
children,
testId
testId,
} = this.props;
if (icon) {
return (