unlockDialog: Set accessible name of icon-only buttons

We turned both the auth prompt's cancel button and the switch user
button into icon buttons now, which means they are completely cryptic
when using a screen reader.

Just use the previously used labels as accessible names, which has the
nice side effect of lowering the impact of the string freeze break.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210
This commit is contained in:
Florian Müllner 2020-02-19 18:06:38 +01:00 committed by Florian Müllner
parent ab24ee7a7e
commit d62391c8f1
2 changed files with 2 additions and 0 deletions

View File

@ -132,6 +132,7 @@ var AuthPrompt = GObject.registerClass({
this.cancelButton = new St.Button({
style_class: 'modal-dialog-button button cancel-button',
accessible_name: _('Cancel'),
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
reactive: this._hasCancelButton,
can_focus: this._hasCancelButton,

View File

@ -555,6 +555,7 @@ var UnlockDialog = GObject.registerClass({
// Switch User button
this._otherUserButton = new St.Button({
style_class: 'modal-dialog-button button switch-user-button',
accessible_name: _('Log in as another user'),
can_focus: true,
reactive: true,
x_align: Clutter.ActorAlign.END,