Enable "jsx-a11y/alt-text" and "jsx-a11y/label-has-associated-control" lint rules (#10361)

* enable "jsx-a11y/alt-text" lint rule

* enable "jsx-a11y/label-has-associated-control"
This commit is contained in:
Kerry 2023-03-15 10:25:11 +13:00 committed by GitHub
parent e0e83bd81d
commit 209b65243a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 22 additions and 16 deletions

View file

@ -79,21 +79,19 @@ export default class UrlPreviewSettings extends React.Component<IProps> {
if (SettingsStore.canSetValue("urlPreviewsEnabled", roomId, SettingLevel.ROOM)) {
previewsForRoom = (
<label>
<SettingsFlag
name="urlPreviewsEnabled"
level={SettingLevel.ROOM}
roomId={roomId}
isExplicit={true}
/>
</label>
<SettingsFlag
name="urlPreviewsEnabled"
level={SettingLevel.ROOM}
roomId={roomId}
isExplicit={true}
/>
);
} else {
let str = _td("URL previews are enabled by default for participants in this room.");
if (!SettingsStore.getValueAt(SettingLevel.ROOM, "urlPreviewsEnabled", roomId, /*explicit=*/ true)) {
str = _td("URL previews are disabled by default for participants in this room.");
}
previewsForRoom = <label>{_t(str)}</label>;
previewsForRoom = <div>{_t(str)}</div>;
}
} else {
previewsForAccount = _t(
@ -127,7 +125,7 @@ export default class UrlPreviewSettings extends React.Component<IProps> {
return (
<SettingsFieldset legend={_t("URL Previews")} description={description}>
{previewsForRoom}
<label>{previewsForRoomAccount}</label>
{previewsForRoomAccount}
</SettingsFieldset>
);
}