A11y: Add alt tags to all images (#602)

* A11y: Add alt tags to all images

* Add newsfile
This commit is contained in:
Christian Paul 2023-01-08 12:04:40 +01:00 committed by GitHub
parent 707ce0de2d
commit 188eb4004e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 5 deletions

1
changelog.d/602.feature Normal file
View File

@ -0,0 +1 @@
A11y: Add alt tags to all images.

View File

@ -11,7 +11,7 @@ interface IProps {
export function ConnectionCard(props: IProps) {
return <div className={style.card} onClick={props.onClick}>
<img src={props.imageSrc} />
<img alt="" src={props.imageSrc} />
<div>
<span>{props.serviceName}</span>
<p>{props.description}</p>

View File

@ -6,7 +6,7 @@ const GitHubState: FunctionComponent<{config: BridgeRoomStateGitHub}> = ({ confi
return <div class="container login-card">
<div class="row">
<div class="col-sm-2">
<img src={config.identity.avatarUrl} title="GitHub avatar" />
<img alt="GitHub avatar" src={config.identity.avatarUrl} />
</div>
<div class="col-sm-9">
Logged in as <span>{config.identity.name}</span>

View File

@ -4,6 +4,6 @@ import style from "./ErrorPane.module.scss";
export const ErrorPane: FunctionComponent<{header?: string}> = ({ children, header }) => {
return <div class={`card error ${style.errorPane}`}>
<p><strong><img src={ErrorBadge} /> { header || "Error occurred during widget load" }</strong>: {children}</p>
<p><strong><img alt="error" src={ErrorBadge} /> { header || "Error occurred during widget load" }</strong>: {children}</p>
</div>;
};

View File

@ -4,6 +4,6 @@ import style from "./WarningPane.module.scss";
export const WarningPane: FunctionComponent<{header?: string}> = ({ children, header }) => {
return <div class={`card error ${style.warningPane}`}>
<p><strong><img src={WarningBadge} /> { header || "Problem occurred during widget load" }</strong>: {children}</p>
<p><strong><img alt="warning" src={WarningBadge} /> { header || "Problem occurred during widget load" }</strong>: {children}</p>
</div>;
};

View File

@ -100,7 +100,7 @@ export const RoomConfig = function<SConfig, ConnectionType extends GetConnection
)
}
<header className={style.header}>
<img src={headerImg} />
<img alt="" src={headerImg} />
<h1>{text.header}</h1>
</header>
{ canEditRoom && <section>