Because the text of the popup is in the language the learner is trying to switch to, it is therefore different to the language declared via the lang attribute of the html element.
It should be possible to add lang attribute to Notify that specifies the language used in the popup correctly. This would be beneficial both for assistive technology and for language-specific styling as well (for example, you may want to use a different font for non-Latin languages)
Ideally alongside the lang attribute there should be a language class is-en / is-de to amend styling / font is required.
Ideally alongside the
langattribute there should be a language classis-en/is-deto amend styling / font is required.
small suggestion: something more like is-lang-de might be a bit clearer? otherwise someone might look at a class like is-de and wonder what on earth it means! Not to mention is-it for Italian...
I think class will be a fine. Is there attribute really need? PR
As @moloko says, the attribute is useful for assistive technology.
@NayanKhedkar Jaws uses the lang attribute to work out what language to use when reading out the text
A few things to note about the above code:
Object.assign() can be used since we now have a polyfill for IE|| {} fallback is needed because Object.assign() handles falsieslang doesn't need quotesDependent PR:
not actually fixed yet..!
I think this issue can be closed now?
yep, done in FW v5.6 and languagePicker v4.1.0
Most helpful comment
A few things to note about the above code:
Object.assign()can be used since we now have a polyfill for IE|| {}fallback is needed becauseObject.assign()handles falsieslangdoesn't need quotes