mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
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:
@@ -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>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user