-
Notifications
You must be signed in to change notification settings - Fork 328
Update C42 to address issue 2433 #3231
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
Closed
Closed
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
8a7dc2f
Update C42 to add example for target size (minimum)
fstrr 1a61706
Added link to C42 to Target Size Enhanced
fstrr 4eb5a5f
Updated C42 link name in Target Size Minimum
fstrr 1b0aaa1
Updated the working examples for C42, fixed broken link
fstrr da577ee
Fix page heading text
fstrr 4f75ae5
update c42 working examples
fstrr 8643d8d
Delete SVGs as now using a sprite
fstrr 49b92f5
Tweak URLs in working examples
fstrr 156aeaf
Fixed least least typo
fstrr e1ebe46
Add abbr tag
fstrr 161d0df
Split (Min) technique from (Enhanced) technique
fstrr cf86d36
Edits to C42
fstrr 3fb4239
Update c42 working examples to use px instead of rem
fstrr 3fa1eae
Delete un-needed screen grab
fstrr 289d696
Rename working example to use “size” and not “spacing”
fstrr fcc3b82
Replace “spacing” with “size”, remove example 1
fstrr b258646
Updated procedure, change spacing to size
fstrr 3cfc5cb
examples → example
fstrr f632d50
Update references to C42 and new technique
fstrr 51aa663
Update text
fstrr 509a09d
Removed “that cannot be enlarged by a mechanism”
fstrr c5c3369
Shorten description
fstrr 933f663
Update description
fstrr c5aeeee
Merge branch 'main' into issue-2433
alastc b6e5446
Renaming the second technique
alastc cfcd92f
Update techniques/css/C44.html
fstrr 0b59134
Update techniques/css/C44.html
fstrr 62b6e23
Update techniques/css/C44.html
fstrr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| <!DOCTYPE html> | ||
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> | ||
| <head> | ||
| <title>Using CSS to add spacing to undersized targets</title> | ||
| <link rel="stylesheet" type="text/css" href="../../css/editors.css"/> | ||
| </head> | ||
| <body> | ||
| <h1>Using <abbr title="Cascading Style Sheets">CSS</abbr> to add spacing to undersized targets</h1> | ||
| <section id="meta"> | ||
| <h2>Metadata</h2> | ||
| <p id="id"></p> | ||
| <p id="technology">CSS</p> | ||
| <p id="type"></p> | ||
| </section> | ||
| <section id="applicability"> | ||
| <h2>When to Use</h2> | ||
| <p>All technologies that support CSS and pointer input.</p> | ||
| </section> | ||
| <section id="description"> | ||
| <h2>Description</h2> | ||
| <p>The objective of this technique is to ensure that links in navigation menus have enough spacing around them to meet the requirements of the spacing exception in Success Criterion 2.5.8, Target Size (Minimum). The aim is to provide an adequate target clearance to prevent accidental pointer activation of adjacent targets.</p> | ||
| </section> | ||
|
|
||
| <section id="examples"> | ||
| <h2>Examples</h2> | ||
| <p>The following example can be seen as a <a href="../../working-examples/css-undersized-target-spacing/">working example</a>.</p> | ||
|
|
||
| <section class="example"> | ||
| <h3>Adding spacing to undersized targets</h3> | ||
| <p>This example shows a situation where targets are smaller than 24 CSS pixels wide and 24 CSS pixels high. To meet Success Criterion 2.5.8, Target Size (Minimum), when a 24 CSS pixel diameter circle is centered on the bounding box of each target, the circles do not intersect another target or the circle for another undersized target. In this example, each target is 20 × 20 CSS pixels, and a 4 CSS pixel gap is added between each target's parent container to create the minimum required spacing.</p> | ||
| <figure> | ||
| <img src="img/adding-spacing-undersized-targets.png" alt="a line of four interactive icons: back, forwards, email, home." height="21" width="102"> | ||
| <figcaption>An example of inline undersized targets</figcaption> | ||
| </figure> | ||
| <h4>The <abbr title="HyperText Markup Language">HTML</abbr></h4> | ||
| <pre><code class="language-html"><nav aria-label="controls"> | ||
| <ol class="navigation-controls"> | ||
| <li><a href="/previous-page/"><img alt="Back" src="arrow-back.svg"></a></li> | ||
| <li><a href="/next-page/"><img alt="Forward" src="arrow-forward.svg"></a></li> | ||
| <li> | ||
| <a href="mailto:[email protected]?subject=WCAG%20C42%20Technique"> | ||
| <img alt="Email" src="email.svg"> | ||
| </a> | ||
| </li> | ||
| <li><a href="/"><img alt="Home" src="home.svg"></a></li> | ||
| </ol> | ||
| </nav></code></pre> | ||
| <h4>The CSS</h4> | ||
| <pre><code class="language-css">.navigation-controls{ | ||
| display: flex; | ||
| gap: 4px; | ||
| line-height: 0; | ||
| list-style: none; | ||
| padding: 0; | ||
| } | ||
|
|
||
| .navigation-controls a{ | ||
| display: inline-block; | ||
| line-height: 0; | ||
| }</code></pre> | ||
|
|
||
| </section> | ||
| </section> | ||
| <section id="tests"> | ||
| <h2>Tests</h2> | ||
|
|
||
| <section class="test-procedure"> | ||
| <h3>Procedure</h3> | ||
| <p>For each undersized target that has no equivalent, that isn't in a sentence or otherwise constrained by the line-height of non-target text, that hasn't had its size modified by the author, and whose presentation isn't essential:</p> | ||
| <ol> | ||
| <li>Draw a 24px diameter circle centered on the target's bounding box.</li> | ||
| <li>Check that the circle from #1 does not intersect any other target.</li> | ||
| <li>Check that the circle from #1 does not intersect any other undersized target's circle.</li> | ||
| </ol> | ||
| </section> | ||
| <section class="test-results"> | ||
| <h3>Expected Results</h3> | ||
| <ul> | ||
| <li>#2 and #3 are true.</li> | ||
| </ul> | ||
| </section> | ||
| </section> | ||
| <section id="related"> | ||
| <h2>Related Techniques</h2> | ||
| <ul> | ||
| <li><a href="C42">C42</a></li> | ||
| </ul> | ||
|
|
||
| </section> | ||
| <!-- <section id="resources"> | ||
| <h2>Resources</h2> | ||
| </section> --> | ||
| </body> | ||
| </html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.