mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Fallback to regular title if screen-reader title is unavailable (#15048)
c401d641 introduced a new translation key for auth providers, and provided new strings for core providers. However, not all plugins have added this string. This commit makes the screenreader title fallback to the regular title in those cases.
This commit is contained in:
@@ -15,7 +15,10 @@ const LoginMethod = EmberObject.extend({
|
|||||||
|
|
||||||
@discourseComputed
|
@discourseComputed
|
||||||
screenReaderTitle() {
|
screenReaderTitle() {
|
||||||
return this.title_override || I18n.t(`login.${this.name}.sr_title`);
|
return (
|
||||||
|
this.title_override ||
|
||||||
|
I18n.t(`login.${this.name}.sr_title`, { defaultValue: this.title })
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed
|
@discourseComputed
|
||||||
|
|||||||
Reference in New Issue
Block a user