UX: Add missing labels to mobile composer buttons

This commit is contained in:
awesomerobot
2020-09-04 22:18:29 -04:00
parent a14c9078d3
commit 13c9d7e704
4 changed files with 12 additions and 5 deletions

View File

@@ -11,6 +11,11 @@ export default Component.extend({
: "composer.collapse";
},
@discourseComputed("showToolbar")
toggleToolbarTitle(showToolbar) {
return showToolbar ? "composer.hide_toolbar" : "composer.show_toolbar";
},
@discourseComputed("composeState")
fullscreenTitle(composeState) {
return composeState === "draft"

View File

@@ -5,7 +5,8 @@
{{flat-button
class="toggle-toolbar"
icon="bars"
action=toggleToolbar}}
action=toggleToolbar
title=toggleToolbarTitle}}
{{/if}}
{{flat-button

View File

@@ -43,7 +43,7 @@
{{/if}}
</div>
{{/unless}}
{{composer-toggles composeState=model.composeState
{{composer-toggles composeState=model.composeState showToolbar=showToolbar
toggleComposer=(action "toggle")
toggleToolbar=(action "toggleToolbar")
toggleFullscreen=(action "fullscreenComposer")}}
@@ -190,12 +190,12 @@
{{#if site.mobileView}}
{{#if allowUpload}}
<a class="btn btn-default no-text mobile-file-upload {{if isUploading "hidden"}}">
<a class="btn btn-default no-text mobile-file-upload {{if isUploading "hidden"}}" aria-label={{i18n "composer.upload_title"}}>
{{d-icon uploadIcon}}
</a>
{{/if}}
<a href class="btn btn-default no-text mobile-preview" title={{i18n "composer.show_preview"}} {{action "togglePreview"}}>
<a href class="btn btn-default no-text mobile-preview" title={{i18n "composer.show_preview"}} {{action "togglePreview"}} aria-label={{i18n "preview"}}>
{{d-icon "desktop"}}
</a>