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

@@ -24,7 +24,7 @@
import React, { FC, useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { Namespace, Permission, Repository } from "@scm-manager/ui-types";
import { ConfirmAlert, ErrorNotification } from "@scm-manager/ui-components";
import { ConfirmAlert, ErrorNotification, Icon } from "@scm-manager/ui-components";
import { useDeletePermission } from "@scm-manager/ui-api";
type Props = {
@@ -63,12 +63,12 @@ const DeletePermissionButton: FC<Props> = ({ namespaceOrRepository, permission,
className: "is-outlined",
label: t("permission.delete-permission-button.confirm-alert.submit"),
isLoading,
onClick: () => deletePermission()
onClick: () => deletePermission(),
},
{
label: t("permission.delete-permission-button.confirm-alert.cancel"),
onClick: () => null
}
onClick: () => null,
},
]}
close={() => setShowConfirmAlert(false)}
/>
@@ -80,7 +80,7 @@ const DeletePermissionButton: FC<Props> = ({ namespaceOrRepository, permission,
<ErrorNotification error={error} />
<a className="level-item" onClick={action}>
<span className="icon is-small">
<i className="fas fa-trash" />
<Icon name="trash" title={t("permission.delete-permission-button.label")} color="inherit" />
</span>
</a>
</>