A11Y: makes edit username and avatar accessible (#12162)

This commit also adds name as a bindable attribute of link-to
This commit is contained in:
Joffrey JAFFEUX 2021-02-22 12:10:44 +01:00 committed by GitHub
parent 863c7919d7
commit 0b14eb6ab1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,9 @@
export default {
name: "ember-link-component-extensions",
initialize() {
Ember.LinkComponent.reopen({
attributeBindings: ["name"],
});
},
};

View File

@ -3,7 +3,7 @@
<div class="controls">
<span class="static">{{model.username}}</span>
{{#if model.can_edit_username}}
{{#link-to "preferences.username" class="btn btn-default btn-small btn-icon pad-left no-text"}}
{{#link-to "preferences.username" name=(i18n "user.username.edit") class="btn btn-default btn-small btn-icon pad-left no-text"}}
{{d-icon "pencil-alt"}}
{{/link-to}}
{{/if}}

View File

@ -1323,6 +1323,7 @@ en:
checking: "Checking username availability..."
prefilled: "Email matches this registered username"
required: "Please enter a username"
edit: "Edit username"
locale:
title: "Interface language"
@ -1558,6 +1559,7 @@ en:
title: "Profile Picture"
header_title: "profile, messages, bookmarks and preferences"
name_and_description: "%{name} - %{description}"
edit: "Edit Profile Picture"
title:
title: "Title"
none: "(none)"