Skip to content

Commit 94a8889

Browse files
committed
Move and edit touch target sections in links and buttons
1 parent ab8c914 commit 94a8889

File tree

3 files changed

+35
-19
lines changed

3 files changed

+35
-19
lines changed

components/ContentTemplates/ButtonsTemplate.tsx

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,18 @@ export const ButtonsTemplate = () => {
386386
should probably be a link.
387387
</p>
388388
</TemplateSection>
389+
<TemplateSection
390+
sectionName="touchTargetMinimum"
391+
title="Touch Target Minimum">
392+
<p>
393+
When it comes to creating accessible buttons for your websites and
394+
applications, it's important that they are easy to activate. To
395+
achieve this goal, WCAG suggests that buttons have a minimum target
396+
size of at least 24 by 24 CSS pixels. In doing so, users, especially
397+
those who suffer from mobility impairments like hand tremors or are
398+
amputees, have an easier time clicking on them.
399+
</p>
400+
</TemplateSection>
389401
<TemplateSection sectionName="WCAGCriteria" title="WCAG Criteria">
390402
<ul className="list">
391403
<li>
@@ -453,9 +465,16 @@ export const ButtonsTemplate = () => {
453465
</li>
454466
<li>
455467
<a
456-
href="https://www.w3.org/TR/WCAG21/#target-size"
468+
href="https://www.w3.org/TR/WCAG22/#target-size-enhanced"
469+
className="blockLink">
470+
2.5.5 Target Size (Enhanced)
471+
</a>
472+
</li>
473+
<li>
474+
<a
475+
href="https://www.w3.org/TR/WCAG22/#target-size-minimum"
457476
className="blockLink">
458-
2.5.5 Target Size
477+
2.5.8 Target Size (Minimum)
459478
</a>
460479
</li>
461480
<li>
@@ -467,13 +486,7 @@ export const ButtonsTemplate = () => {
467486
</li>
468487
</ul>
469488
</TemplateSection>
470-
<TemplateSection sectionName="touchTargetMinimum" title="Touch Target Minimum">
471-
<p>
472-
When it comes to creating accessible buttons for your websites and applications, it's important that they
473-
are easy to activate. To achieve this goal, WCAG suggests to avoid putting the buttons together. Consider make their size at least 24 by 24 CSS pixels. In doing so, users, especially those who suffer from mobility impairments like hand tremors or are amputees, have an easier time clicking on them.
474-
</p>
475489

476-
</TemplateSection>
477490
<TemplateSection sectionName="otherResources" title="Other Resources">
478491
<ul className="list">
479492
<li>

components/ContentTemplates/LinksTemplate.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,17 @@ other places on the web */`}
199199
languageType={"html"}
200200
/>
201201
</TemplateSection>
202+
<TemplateSection
203+
sectionName="touchTargetMinimum"
204+
title="Touch Target Minimum">
205+
<p>
206+
When it comes to creating accessible links, it's important that they
207+
are easy to activate. To do this, WCAG recommends that links that are
208+
not within text have a target size of at least 24 x 24 CSS pixels.
209+
Doing this makes it easier for users who have motor dexterity issues
210+
to click them.
211+
</p>
212+
</TemplateSection>
202213
<TemplateSection sectionName="WCAGCriteria" title="WCAG Criteria">
203214
<ul className="list">
204215
<li>
@@ -340,15 +351,7 @@ other places on the web */`}
340351
</li>
341352
</ul>
342353
</TemplateSection>
343-
<TemplateSection
344-
sectionName="touchTargetMinimum"
345-
title="Touch Target Minimum">
346-
<p>
347-
When it comes to creating accessible links, it's important that they
348-
are easy to activate. To do this, WCAG recommends spacing the link's text so that users can understand its context. Doing this would also make it
349-
easier for users who have motor dexterity issues to read them.
350-
</p>
351-
</TemplateSection>
354+
352355
<PageUpdated date="5th January 2024" />
353356
</>
354357
)

data/pageNavigationLists.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export const buttonPageNavigation: IPageNavigationItem[] = [
3131
{ linkName: "Icon-only Buttons", href: "#iconOnlyButtons" },
3232
{ linkName: "Button States", href: "#buttonStates" },
3333
{ linkName: "Button or Link?", href: "#buttonOrLink" },
34+
{ linkName: "Touch Target Minimum", href: "#touchTargetMinimum" },
3435
{ linkName: "WCAG Criteria", href: "#WCAGCriteria" },
35-
{ linkName: "Touch Target Minimum", href: "#touchTargetMinimum" },}
3636
{ linkName: "Other Resources", href: "#otherResources" },
3737
]
3838

@@ -41,8 +41,8 @@ export const linkPageNavigation: IPageNavigationItem[] = [
4141
{ linkName: "Accessible Link Names", href: "#accessibleLinkNames" },
4242
{ linkName: "Link State and Style", href: "#linkStates" },
4343
{ linkName: "Image and Icon Links", href: "#linkImage" },
44-
{ linkName: "WCAG Criteria", href: "#WCAGCriteria" },
4544
{ linkName: "Touch Target Minimum", href: "#touchTargetMinimum" },
45+
{ linkName: "WCAG Criteria", href: "#WCAGCriteria" },
4646
{ linkName: "Other Resources", href: "#otherResources" },
4747
]
4848

0 commit comments

Comments
 (0)