mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-24 01:09:48 +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:
@@ -88,10 +88,10 @@ const MarkdownHeadingRenderer: FC<Props> = ({ children, level, permalink, id })
|
||||
.finally(() => setCopying(false));
|
||||
};
|
||||
const CopyButton = copying ? (
|
||||
<Icon name="spinner fa-spin" />
|
||||
<Icon name="spinner fa-spin" alt={t("sources.content.loading")} />
|
||||
) : (
|
||||
<Tooltip message={t("sources.content.copyPermalink")}>
|
||||
<Icon name="link" onClick={copyPermalink} />
|
||||
<Icon name="link" onClick={copyPermalink} alt={t("sources.content.copyPermalink")} />
|
||||
</Tooltip>
|
||||
);
|
||||
const headingElement = React.createElement("h" + level, {id: anchorId}, [...reactChildren, CopyButton]);
|
||||
|
||||
Reference in New Issue
Block a user