Skip to content

Commit

Permalink
Merge pull request #391 from CBID2/adding-new-section
Browse files Browse the repository at this point in the history
feat: add Touch Target Minimum sections to Links and Button pages
  • Loading branch information
EmmaDawsonDev authored Feb 3, 2024
2 parents e764585 + 17ab6fd commit ab8c914
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/ContentTemplates/ButtonsTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,13 @@ export const ButtonsTemplate = () => {
</li>
</ul>
</TemplateSection>
<TemplateSection sectionName="touchTargetMinimum" title="Touch Target Minimum">
<p>
When it comes to creating accessible buttons for your websites and applications, it's important that they
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.
</p>

</TemplateSection>
<TemplateSection sectionName="otherResources" title="Other Resources">
<ul className="list">
<li>
Expand Down
9 changes: 9 additions & 0 deletions components/ContentTemplates/LinksTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,15 @@ other places on the web */`}
</li>
</ul>
</TemplateSection>
<TemplateSection
sectionName="touchTargetMinimum"
title="Touch Target Minimum">
<p>
When it comes to creating accessible links, it's important that they
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
easier for users who have motor dexterity issues to read them.
</p>
</TemplateSection>
<PageUpdated date="5th January 2024" />
</>
)
Expand Down
2 changes: 2 additions & 0 deletions data/pageNavigationLists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const buttonPageNavigation: IPageNavigationItem[] = [
{ linkName: "Button States", href: "#buttonStates" },
{ linkName: "Button or Link?", href: "#buttonOrLink" },
{ linkName: "WCAG Criteria", href: "#WCAGCriteria" },
{ linkName: "Touch Target Minimum", href: "#touchTargetMinimum" },}
{ linkName: "Other Resources", href: "#otherResources" },
]

Expand All @@ -41,6 +42,7 @@ export const linkPageNavigation: IPageNavigationItem[] = [
{ linkName: "Link State and Style", href: "#linkStates" },
{ linkName: "Image and Icon Links", href: "#linkImage" },
{ linkName: "WCAG Criteria", href: "#WCAGCriteria" },
{ linkName: "Touch Target Minimum", href: "#touchTargetMinimum" },
{ linkName: "Other Resources", href: "#otherResources" },
]

Expand Down

0 comments on commit ab8c914

Please sign in to comment.