diff --git a/app/assets/javascripts/discourse/helpers/application_helpers.js b/app/assets/javascripts/discourse/helpers/application_helpers.js
index 328472f5ffe..269f1c8daf2 100644
--- a/app/assets/javascripts/discourse/helpers/application_helpers.js
+++ b/app/assets/javascripts/discourse/helpers/application_helpers.js
@@ -407,3 +407,22 @@ Handlebars.registerHelper('link-domain', function(property, options) {
}
}
});
+
+/**
+ Renders a font-awesome icon with an optional i18n string as hidden text for
+ screen readers.
+
+ @method icon
+ @for Handlebars
+**/
+Handlebars.registerHelper('icon', function(icon, options) {
+ var labelKey, html;
+ if (options.hash) { labelKey = options.hash.label; }
+ html = "";
+ if (labelKey) {
+ html += "" + I18n.t(labelKey) + "";
+ }
+ return new Handlebars.SafeString(html);
+});
diff --git a/app/assets/javascripts/discourse/templates/header.js.handlebars b/app/assets/javascripts/discourse/templates/header.js.handlebars
index f8330462eda..03a8b76a107 100644
--- a/app/assets/javascripts/discourse/templates/header.js.handlebars
+++ b/app/assets/javascripts/discourse/templates/header.js.handlebars
@@ -11,7 +11,7 @@
{{/if}}
{{#if topic.isPrivateMessage}}
-
+ {{icon envelope}}
{{/if}}
{{#if topic.category.parentCategory}}
{{boundCategoryLink topic.category.parentCategory}}
@@ -37,29 +37,32 @@
{{/unless}}
-
{{render "search"}}
diff --git a/app/assets/stylesheets/common/foundation/helpers.scss b/app/assets/stylesheets/common/foundation/helpers.scss
index 87ba87ed827..282255d71e0 100644
--- a/app/assets/stylesheets/common/foundation/helpers.scss
+++ b/app/assets/stylesheets/common/foundation/helpers.scss
@@ -29,6 +29,17 @@
visibility: hidden;
}
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0,0,0,0);
+ border: 0;
+}
+
// Affix
// --------------------------------------------------
diff --git a/app/assets/stylesheets/desktop/header.scss b/app/assets/stylesheets/desktop/header.scss
index e842726cd08..9947dab4f29 100644
--- a/app/assets/stylesheets/desktop/header.scss
+++ b/app/assets/stylesheets/desktop/header.scss
@@ -47,9 +47,12 @@
display:block;
margin-top: 10px;
}
- button {
- margin-top: 9px;
- }
+ }
+ button.login-button {
+ float: left;
+ margin-top: 7px;
+ padding: 6px 10px;
+ .fa { margin-right: 3px; }
}
.icons {
float: left;
diff --git a/app/assets/stylesheets/mobile/header.scss b/app/assets/stylesheets/mobile/header.scss
index f111dfadbc8..c102af15e58 100644
--- a/app/assets/stylesheets/mobile/header.scss
+++ b/app/assets/stylesheets/mobile/header.scss
@@ -51,14 +51,17 @@
font-size: 14px;
line-height: 40px;
}
- button {
- margin-top: 8px;
- }
+ }
+ button.login-button {
+ float: left;
+ margin-top: 7px;
+ padding: 6px 10px;
+ .fa { margin-right: 3px; }
}
.icons {
float: left;
text-align: center;
- margin: 0 0 0 15px;
+ margin: 0 0 0 5px;
list-style: none;
> li {
float: left;