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:
parent
e0e83bd81d
commit
209b65243a
8 changed files with 22 additions and 16 deletions
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue