Add <main> to default html #1476
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.
Following processing/p5.js#4644 we are updating the default html of empty examples to include <main>.
This is because the canvas is appended to the <main> element. We recently merged this change because the <main> element behaves like a main landmark role and can be used by assistive technology to quickly identify and navigate to the dominant part of the body. <main> doesn't contribute to the document's outline and doesn't affect the DOM's concept of the structure of the page. If <main> does not yet exist in the html, p5.js creates element <main> in <body> before appending canvas. This change in p5.js doesn't affect user input node cases.
In an effort to model best practices for default html we are changing default html in the website and thought changing it on the editor could also be a good idea.
I have verified that this pull request:
npm run lint
)Fixes #123
@kjhollen