1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 23:01:17 +02:00

fix(a11y): add accessible labels to notification grid options (#3520)

This commit is contained in:
David Wheatley
2022-07-14 12:02:00 +01:00
committed by GitHub
parent 0daa24cf4b
commit 952a5891bb
2 changed files with 9 additions and 1 deletions

View File

@@ -70,7 +70,14 @@ export default class NotificationGrid extends Component {
loading={this.loading[key]}
disabled={!(key in preferences)}
onchange={this.toggle.bind(this, [key])}
/>
>
<span class="sr-only">
{app.translator.trans('core.forum.settings.notification_checkbox_a11y_label_template', {
description: type.label,
method: method.label,
})}
</span>
</Checkbox>
</td>
);
})}

View File

@@ -448,6 +448,7 @@ core:
account_heading: Account
change_email_button: => core.ref.change_email
change_password_button: => core.ref.change_password
notification_checkbox_a11y_label_template: 'Receive "{description}" notifications via {method}'
notifications_heading: => core.ref.notifications
notify_by_email_heading: => core.ref.email
notify_by_web_heading: Web