Use strong over b for improved a11y semantics

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-09-13 12:09:41 +01:00
parent 6b384fe9c1
commit a6e98b0b63
No known key found for this signature in database
GPG key ID: A2B008A5F49F5D0D
35 changed files with 80 additions and 66 deletions

View file

@ -72,8 +72,8 @@ export const AnalyticsLearnMoreDialog: React.FC<IProps> = ({
{_t("analytics|pseudonymous_usage_data", { analyticsOwner })}
</div>
<ul className="mx_AnalyticsLearnMore_bullets">
<li>{_t("analytics|bullet_1", {}, { Bold: (sub) => <b>{sub}</b> })}</li>
<li>{_t("analytics|bullet_2", {}, { Bold: (sub) => <b>{sub}</b> })}</li>
<li>{_t("analytics|bullet_1", {}, { Bold: (sub) => <strong>{sub}</strong> })}</li>
<li>{_t("analytics|bullet_2", {}, { Bold: (sub) => <strong>{sub}</strong> })}</li>
<li>{_t("analytics|disable_prompt")}</li>
</ul>
{privacyPolicyLink}

View file

@ -205,7 +205,7 @@ export default class BugReportDialog extends React.Component<IProps, IState> {
) {
warning = (
<p>
<b>{_t("bug_reporting|unsupported_browser")}</b>
<strong>{_t("bug_reporting|unsupported_browser")}</strong>
</p>
);
}
@ -221,7 +221,7 @@ export default class BugReportDialog extends React.Component<IProps, IState> {
{warning}
<p>{_t("bug_reporting|description")}</p>
<p>
<b>
<strong>
{_t(
"bug_reporting|before_submitting",
{},
@ -237,7 +237,7 @@ export default class BugReportDialog extends React.Component<IProps, IState> {
),
},
)}
</b>
</strong>
</p>
<div className="mx_BugReportDialog_download">

View file

@ -280,7 +280,9 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
"create_room|join_rule_restricted_label",
{},
{
SpaceName: () => <b>{this.props.parentSpace?.name ?? _t("common|unnamed_space")}</b>,
SpaceName: () => (
<strong>{this.props.parentSpace?.name ?? _t("common|unnamed_space")}</strong>
),
},
)}
&nbsp;
@ -294,7 +296,9 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
"create_room|join_rule_public_parent_space_label",
{},
{
SpaceName: () => <b>{this.props.parentSpace?.name ?? _t("common|unnamed_space")}</b>,
SpaceName: () => (
<strong>{this.props.parentSpace?.name ?? _t("common|unnamed_space")}</strong>
),
},
)}
&nbsp;

View file

@ -95,7 +95,7 @@ const CreateSubspaceDialog: React.FC<IProps> = ({ space, onAddExistingSpaceClick
"create_space|subspace_join_rule_restricted_description",
{},
{
SpaceName: () => <b>{parentSpace.name}</b>,
SpaceName: () => <strong>{parentSpace.name}</strong>,
},
)}
</p>
@ -107,7 +107,7 @@ const CreateSubspaceDialog: React.FC<IProps> = ({ space, onAddExistingSpaceClick
"create_space|subspace_join_rule_public_description",
{},
{
SpaceName: () => <b>{parentSpace.name}</b>,
SpaceName: () => <strong>{parentSpace.name}</strong>,
},
)}
</p>

View file

@ -77,7 +77,7 @@ const LeaveSpaceDialog: React.FC<IProps> = ({ space, onFinished }) => {
"space|leave_dialog_description",
{},
{
spaceName: () => <b>{space.name}</b>,
spaceName: () => <strong>{space.name}</strong>,
},
)}
&nbsp;

View file

@ -144,7 +144,7 @@ const ManageRestrictedJoinRuleDialog: React.FC<IProps> = ({ room, selected = [],
"room_settings|security|join_rule_restricted_dialog_description",
{},
{
RoomName: () => <b>{room.name}</b>,
RoomName: () => <strong>{room.name}</strong>,
},
)}
</p>

View file

@ -69,7 +69,7 @@ export function ManualDeviceKeyVerificationDialog({
<label>{_t("encryption|verification|manual_device_verification_device_key_label")}:</label>{" "}
<span>
<code>
<b>{key}</b>
<strong>{key}</strong>
</code>
</span>
</li>

View file

@ -54,7 +54,7 @@ const RegistrationEmailPromptDialog: React.FC<IProps> = ({ onFinished }) => {
"auth|registration|continue_without_email_description",
{},
{
b: (sub) => <b>{sub}</b>,
b: (sub) => <strong>{sub}</strong>,
},
)}
</p>

View file

@ -181,7 +181,7 @@ export default class RoomUpgradeWarningDialog extends React.Component<IProps, IS
"room_settings|advanced|upgrade_warning_dialog_explainer",
{},
{
b: (sub) => <b>{sub}</b>,
b: (sub) => <strong>{sub}</strong>,
},
)}
</p>

View file

@ -46,7 +46,7 @@ export default class UploadFailureDialog extends React.Component<IProps> {
sizeOfThisFile: fileSize(this.props.badFiles[0].size),
},
{
b: (sub) => <b>{sub}</b>,
b: (sub) => <strong>{sub}</strong>,
},
);
buttons = (
@ -64,7 +64,7 @@ export default class UploadFailureDialog extends React.Component<IProps> {
limit: fileSize(this.props.contentMessages.getUploadLimit()!),
},
{
b: (sub) => <b>{sub}</b>,
b: (sub) => <strong>{sub}</strong>,
},
);
buttons = (
@ -82,7 +82,7 @@ export default class UploadFailureDialog extends React.Component<IProps> {
limit: fileSize(this.props.contentMessages.getUploadLimit()!),
},
{
b: (sub) => <b>{sub}</b>,
b: (sub) => <strong>{sub}</strong>,
},
);
const howManyOthers = this.props.totalFiles - this.props.badFiles.length;

View file

@ -128,7 +128,7 @@ const EditSetting: React.FC<IEditSettingProps> = ({ setting, onBack }) => {
</h3>
<div className="mx_DevTools_SettingsExplorer_warning">
<b>{_t("devtools|caution_colon")}</b> {_t("devtools|use_at_own_risk")}
<strong>{_t("devtools|caution_colon")}</strong> {_t("devtools|use_at_own_risk")}
</div>
<div>

View file

@ -391,7 +391,9 @@ export default class RestoreKeyBackupDialog extends React.PureComponent<IProps,
title = _t("restore_key_backup_dialog|enter_phrase_title");
content = (
<div>
<p>{_t("restore_key_backup_dialog|key_backup_warning", {}, { b: (sub) => <b>{sub}</b> })}</p>
<p>
{_t("restore_key_backup_dialog|key_backup_warning", {}, { b: (sub) => <strong>{sub}</strong> })}
</p>
<p>{_t("restore_key_backup_dialog|enter_phrase_description")}</p>
<form className="mx_RestoreKeyBackupDialog_primaryContainer">
@ -453,7 +455,9 @@ export default class RestoreKeyBackupDialog extends React.PureComponent<IProps,
content = (
<div>
<p>{_t("restore_key_backup_dialog|key_backup_warning", {}, { b: (sub) => <b>{sub}</b> })}</p>
<p>
{_t("restore_key_backup_dialog|key_backup_warning", {}, { b: (sub) => <strong>{sub}</strong> })}
</p>
<p>{_t("restore_key_backup_dialog|enter_key_description")}</p>
<div className="mx_RestoreKeyBackupDialog_primaryContainer">