New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle language change update in javascript to update html lang attri… #3235
Conversation
this.addLangClickListener(); | ||
} | ||
|
||
addLangClickListener() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add documentation that explains what this method is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea no problem. I just updated the file. This function handles the event of changing (by clicking), a new language in the top bar language selector dropdown. And the thought was the class InternationalizationHelper.js
could serve as a generic, helper class to organize internationalization event handling.
3b40f61
to
4da4faf
Compare
} | ||
|
||
/** | ||
* Handle the event of selecting a new language from top bar, language select element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you also add, "this updates the html@lang
attribute which is important for screen readers"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, just added the text.
4da4faf
to
41a0c54
Compare
…bute
Fixes #2980
Updates the
<html lang="" />
attribute when a new language is selected from the dropdown.@samvera/hyrax-code-reviewers