trema-tech / moodle-theme_trema

Theme trema, a Moodle LMS plugin.
https://moodle.org/plugins/theme_trema
GNU General Public License v3.0
39 stars 19 forks source link

"lang" attribute not being rendered in language dropdown menu. #58

Closed michael-milette closed 2 years ago

michael-milette commented 2 years ago

Each of the languages should be spoken by screen readers in their own language and therefore should have a lang="en" or lang="xx".

image

I can see in your code that you are attempting to add it in classes/output/core_renderer.php line 104 but for some reason it isn't being rendered as expected.

$this->language->add($langname, new moodle_url($this->page->url, array('lang' => $langtype)), $langname);

If you have any ideas, let me know. Otherwise I hope to get around to looking into this bug within the next week.

Best regsards,

Michael Milette

michael-milette commented 2 years ago

Hi @rmady

Before I remove it, can you tell me why you have a tooltip for each language in the language selection dropdown menu? seems to me that this is redundant since it says exactly the same thing as the menu item. Some screen readers would read both the menu item and the title tag.

The only time that I can think of that you might want to have tooltips is if you used images of flags instead of language names in the menu which is not the case here.

Best regards,

MIchael

michael-milette commented 2 years ago

In case you are wondering how Boost handles this, it has the same problem however it is coded differently so the same solution cannot applied in core. For more information, see https://tracker.moodle.org/browse/MDL-72885

michael-milette commented 2 years ago

Thanks again! You're the best!