fix: improve HTML sample snippet with lang attribute and modern defaults#304794
Closed
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Closed
fix: improve HTML sample snippet with lang attribute and modern defaults#304794yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Conversation
- Add lang attribute to html tag with tab stop for accessibility - Remove obsolete X-UA-Compatible meta tag (IE-only) - Place viewport meta before title (standard ordering) - Renumber tab stops: lang -> title -> css -> js -> body
Author
|
Duplicate of #304818 which has been approved by maintainers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What kind of change does this PR introduce?
Bug fix / UX improvement
What is the current behavior?
The
HTML samplecompletion snippet has several issues:langattribute on the<html>tag (accessibility and i18n concern)<meta http-equiv='X-UA-Compatible' content='IE=edge'>tag, which is only relevant for legacy IE browsersCloses #272331
What is the new behavior?
The updated snippet:
langattribute with${1:en}tab stop to the<html>tag for accessibilityX-UA-Compatiblemeta tag<title>(standard ordering)lang→title→stylesheet href→script src→body contentBefore:
After:
Additional context
langattribute is recommended by WCAG accessibility guidelines and is included in modern HTML boilerplatesX-UA-Compatiblemeta tag was only needed for Internet Explorer and is no longer relevant<title>to follow the convention of meta declarations firstwidth=device-width, initial-scale=1) are universally standard and don't need tab stops