Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add links to how-tos #141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 56 additions & 6 deletions guidelines/guidelines.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ a.internalDFN[title]:hover, .internalDFN[title]:active, a.internalDFN[title]:foc
}

.guideline {
margin-left: 4rem;
margin-left: 4em;
position: relative;
}

.guideline .provision {
margin-left: 4rem;
margin-left: 4em;
position: relative;
}

.guideline-text, provision-text {
Expand Down Expand Up @@ -97,7 +99,7 @@ h4 {font-size: 110%}
h5, h6 {
width: 100%;
font-style: normal !important;
margin-top: 1rem;
margin-top: 1em;
margin-bottom: 0;

}
Expand Down Expand Up @@ -194,12 +196,60 @@ a[href].status-link {
}

section {
margin-bottom: 2rem;
margin-bottom: 2em;
}
#guidelines > section {
margin-bottom: 4rem;
margin-bottom: 4em;
}

#guidelines :is(h2, h3, h4, h5, h6) {
margin-top: 1rem;
margin-top: 1em;
}


@media (min-width: 768px) {
.guideline .body-wrapper {
display: grid;
grid-template-columns: 2fr 1fr;
}
}

.doclinks {
margin-left: 0.2em;
}

.doclinks a {
display: inline-block;
outline: 0;
padding: 5px 10px;
font-size: 90%;
line-height: 1.5;
border-radius: 2px;
border: 1px solid #ccc;
text-decoration: none;
color: #333 !important;
}

.doclinks a:focus, .doclinks a:hover {
color: #141414;
background-color: #f2f2f2;
border-color: #adadad;
}

.doclinks a:active {
outline: 0;
background-image: none;
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}

svg:not(:root) {
overflow: hidden;
}

[class^="i-"] {
width: 1em;
height: 1em;
fill: currentColor;
vertical-align: middle;
margin-top: -.25em;
}
69 changes: 69 additions & 0 deletions guidelines/img/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 56 additions & 8 deletions guidelines/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ <h2>Guidelines</h2>
<h3>Image and media alternatives</h3>
<section class="guideline">
<h4>Image alternatives</h4>
<p class="guideline-text">Users have equivalent alternatives for images.</p>
<div class="body-wrapper">
<p class="guideline-text">Users have equivalent alternatives for images.</p>
<aside class="doclinks">
<p><a href="/WAI/WCAG30/How-To/text-alternatives/">
<svg aria-hidden="true" class="i-info"><use xlink:href="img/icons.svg#i-info"></use></svg> How to meet Image alternatives</a></p>
</aside>
</div>

<details class="decision-tree">
<summary>Which provision applies?</summary>
Expand All @@ -162,15 +168,33 @@ <h4>Image alternatives</h4>

<section class="provision" data-status="developing" data-provision-type="foundational">
<h5>Decorative image</h5>
<p class="provision-text"><a>Decorative image</a> is <a>programmatically</a> hidden.</p>
<div class="body-wrapper">
<p class="provision-text"><a>Decorative image</a> is <a>programmatically</a> hidden.</p>
<aside class="doclinks">
<p><a href="/WAI/WCAG30/How-To/text-alternatives/methods/decorative-images/">
<svg aria-hidden="true" class="i-info"><use xlink:href="img/icons.svg#i-info"></use></svg> Decorative image methods</a></p>
</aside>
</div>
</section>
<section class="provision" data-status="developing" data-provision-type="foundational">
<h5>Content image</h5>
<p class="provision-text">Equivalent text alternative is available for <a>image</a> that conveys <a>content</a>.</p>
<div class="body-wrapper">
<p class="provision-text">Equivalent text alternative is available for <a>image</a> that conveys <a>content</a>.</p>
<aside class="doclinks">
<p><a href="/WAI/WCAG30/How-To/text-alternatives/methods/content-image/">
<svg aria-hidden="true" class="i-info"><use xlink:href="img/icons.svg#i-info"></use></svg> Content image methods</a></p>
</aside>
</div>
</section>
<section class="provision" data-status="developing" data-provision-type="foundational">
<h5>Detectable image</h5>
<p class="provision-text"><a>Image</a> is <a>programmatically determinable</a>.</p>
<div class="body-wrapper">
<p class="provision-text"><a>Image</a> is <a>programmatically determinable</a>.</p>
<aside class="doclinks">
<p><a href="/WAI/WCAG30/How-To/text-alternatives/methods/detectable-image/">
<svg aria-hidden="true" class="i-info"><use xlink:href="img/icons.svg#i-info"></use></svg> Detectable image methods</a></p>
</aside>
</div>
</section>

<section class="provision" data-status="exploratory" data-provision-type="supplemental">
Expand Down Expand Up @@ -379,7 +403,13 @@ <h5>Verb tense</h5>
<h3>Interactive components</h3>
<section class="guideline">
<h4>Keyboard Focus Appearance</h4>
<p class="guideline-text">Users can see which <a>element</a> has keyboard focus.</p>
<div class="body-wrapper">
<p class="guideline-text">Users can see which <a>element</a> has keyboard focus.</p>
<aside class="doclinks">
<p><a href="/WAI/WCAG30/How-To/focus-appearance/">
<svg aria-hidden="true" class="i-info"><use xlink:href="img/icons.svg#i-info"></use></svg> How to meet Keyboard Focus Appearance</a></p>
</aside>
</div>

<details class="decision-tree">
<summary>Which provision applies?</summary>
Expand Down Expand Up @@ -411,15 +441,33 @@ <h4>Keyboard Focus Appearance</h4>

<section class="provision" data-status="developing" data-status="developing" data-provision-type="foundational">
<h5>Custom indicator</h5>
<p class="provision-text">A custom focus indicator is used with sufficient size, change of contrast, adjacent contrast, distinct style and adjacency. </p>
<div class="body-wrapper">
<p class="provision-text">A custom focus indicator is used with sufficient size, change of contrast, adjacent contrast, distinct style and adjacency.</p>
<aside class="doclinks">
<p><a href="/WAI/WCAG30/How-To/focus-appearance/methods/custom-indicator/">
<svg aria-hidden="true" class="i-info"><use xlink:href="img/icons.svg#i-info"></use></svg> Custom indicator methods</a></p>
</aside>
</div>
</section>
<section class="provision" data-status="developing" data-provision-type="foundational">
<h5>Default indicator</h5>
<p class="provision-text">The platform’s default indicator is used, and where the backgrounds are changed, the indicator contrast is checked.</p>
<div class="body-wrapper">
<p class="provision-text">The platform’s default indicator is used, and where the backgrounds are changed, the indicator contrast is checked.</p>
<aside class="doclinks">
<p><a href="/WAI/WCAG30/How-To/focus-appearance/methods/default-indicator/">
<svg aria-hidden="true" class="i-info"><use xlink:href="img/icons.svg#i-info"></use></svg> Default indicator methods</a></p>
</aside>
</div>
</section>
<section class="provision" data-status="developing" data-provision-type="foundational">
<h5>User agent default indicator</h5>
<p class="provision-text">Focusable item uses the user agent default indicator.</p>
<div class="body-wrapper">
<p class="provision-text">Focusable item uses the user agent default indicator.</p>
<aside class="doclinks">
<p><a href="/WAI/WCAG30/How-To/focus-appearance/methods/user-agent-default-indicator/">
<svg aria-hidden="true" class="i-info"><use xlink:href="img/icons.svg#i-info"></use></svg> User agent default indicator methods</a></p>
</aside>
</div>
</section>

<section class="provision" data-status="exploratory" data-provision-type="supplemental">
Expand Down