mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 17:57:04 +08:00
fix(a11y): add accessible labels to notification grid options (#3520)
This commit is contained in:
parent
0daa24cf4b
commit
952a5891bb
|
@ -70,7 +70,14 @@ export default class NotificationGrid extends Component {
|
||||||
loading={this.loading[key]}
|
loading={this.loading[key]}
|
||||||
disabled={!(key in preferences)}
|
disabled={!(key in preferences)}
|
||||||
onchange={this.toggle.bind(this, [key])}
|
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>
|
</td>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -448,6 +448,7 @@ core:
|
||||||
account_heading: Account
|
account_heading: Account
|
||||||
change_email_button: => core.ref.change_email
|
change_email_button: => core.ref.change_email
|
||||||
change_password_button: => core.ref.change_password
|
change_password_button: => core.ref.change_password
|
||||||
|
notification_checkbox_a11y_label_template: 'Receive "{description}" notifications via {method}'
|
||||||
notifications_heading: => core.ref.notifications
|
notifications_heading: => core.ref.notifications
|
||||||
notify_by_email_heading: => core.ref.email
|
notify_by_email_heading: => core.ref.email
|
||||||
notify_by_web_heading: Web
|
notify_by_web_heading: Web
|
||||||
|
|
Loading…
Reference in New Issue
Block a user