Set language on document instead of screen #730
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On second thought,
<html lang="nl">
is better than<Screen lang="nl">
.Even though this explicitly sets the language for the website, the developer still has to remember to do this on the HTML element, for example because the content of some elements can also be in that language.
In addition, on a page in another language e.g.
<html lang="ar">
you may forget to also set the (planned)lang
prop onScreen
, so that the default value ofnl
kicks in. The fact that developers forget something in itself is not our problem, but we can limit the chance of errors occurring.So this also documents that implementers should consider this and how.
Sources:
Regarding the language tag of
nl
instead ofnl-NL
: