Skip to content

Conversation

@LiFaytheGoblin
Copy link
Contributor

Resolves

#3049

Proposed Changes

Sets the lang attribute of the document in the GUI

Reason for Changes

Setting the correct language is crucial for screen readers so they use the correct pronounciation

Test Coverage

MacOS, Chrome, not tested with a screen reader

Copy link
Contributor

@chrisgarrity chrisgarrity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One little picky detail. Otherwise I think this looks fine.

bindAll(this, [
'handleChange'
]);
document.documentElement.lang = this.props.currentLocale;

This comment was marked as abuse.

@LiFaytheGoblin
Copy link
Contributor Author

@chrisgarrity When switching back to www the locale set in the gui is still set as attribute. Is this an issue I should worry about for now?

Copy link
Contributor

@chrisgarrity chrisgarrity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine. I don't think there's anywhere that we use the lang attribute on www (definitely not in the gui), although perhaps we should.

@thisandagain thisandagain merged commit 2663786 into scratchfoundation:develop Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants