Minor refinements to the semantic correctness for the static HTML#1546
Open
d-ronnqvist wants to merge 7 commits into
Open
Minor refinements to the semantic correctness for the static HTML#1546d-ronnqvist wants to merge 7 commits into
d-ronnqvist wants to merge 7 commits into
Conversation
Contributor
Author
|
@swift-ci please test |
Contributor
Author
|
@swift-ci please test |
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.
Bug/issue #, if applicable:
Summary
This makes a few semantic correctness changes for the static HTML output. Specifically;
It uses an
<aside>element instead of a<blockquote>element for DocC asides because according to the HTML spec the semantics of a block quote "[...] must be quoted from another source".The semantics of an
<aside>element are more suitable for DocC asides:It uses an
<hgroup>element to group the "eyebrow" subheading with the page title.A
hgroupelement "may be used to group anh1-h6element with one or morepelements containing content representing a subheading, alternative title, or tagline." which seemed appropriate for the "eyebrow" subheading and the page title.Note that the subheading is allowed to appear either before or after the heading in the group.
It removes the semantically incorrect "text" role from the availability list items. According to the W3C validator, a
lielement "must not have anyrolevalue other thanlistitem."It wraps the main content in a
<main>element to semantically "[...] represent the dominant contents of the document."It also removes a no-longer-needed "id" attribute for the page' abstract and improves the "aria-label" for availability list items.
Dependencies
None
Testing
Build documentation for any project—with some page that specifies some amount of availability and some page that has an aside in its content—and pass the
--output-format experimental-html-for-developmentoption to DocC.In the output; open the HTML file for the page with availability in a text editor.
The availability
<li>items should not specifyrole="text"as an attribute.The page's eyebrow subheading and title should be group inside a
<hgroup>element.The page's content should (an
<article>element) should be wrapped inside a<main>element.Open the same HTML file in a browser.
In the output; open the HTML file for the page with the aside.
The aside should be represented using an
<aside>element with a class attribute that specifies what type of aside (for exampleclass="note")The page's eyebrow subheading and title should be group inside a
<hgroup>element.The page's content should (an
<article>element) should be wrapped inside a<main>element.Open the same HTML file in a browser.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
Addedtests./bin/testscript and it succeeded