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

added puncuation #369

Merged
merged 3 commits into from
Oct 29, 2023
Merged
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
36 changes: 18 additions & 18 deletions components/ContentTemplates/ButtonsTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,23 +175,23 @@ export const ButtonsTemplate = () => {
</button>
<CodeBlock
codeSnippet={`<button type="button" onclick="handleClick()">
<img src="icon-url.png" alt="" />
Text
</button>`}
<img src="icon-url.png" alt="" />
Text
</button>`}
EmmaDawsonDev marked this conversation as resolved.
Show resolved Hide resolved
languageType={"html"}
/>
<CodeBlock
codeSnippet={`<button type="button" onclick="handleClick()">
<img src="icon-url.png" aria-hidden="true" />
Text
</button>`}
<img src="icon-url.png" aria-hidden="true" />
Text
</button>`}
EmmaDawsonDev marked this conversation as resolved.
Show resolved Hide resolved
languageType={"html"}
/>
<p>
An empty alt attribute has the most wide-spread support so that should
be your go to choice when using icons. However, some icon libraries
don't allow an alt attribute to be passed and that's where aria-hidden
can be useful.
An empty alt attribute has the most wide-spread support, so that
should be your go to choice when using icons. However, some icon
libraries don't allow an alt attribute to be passed and that's where
aria-hidden can be useful.
</p>
</TemplateSection>
<TemplateSection sectionName="iconOnlyButtons" title="Icon-only buttons">
Expand All @@ -210,14 +210,14 @@ export const ButtonsTemplate = () => {
</button>
<CodeBlock
codeSnippet={`<button type="button" onclick="handleClick()">
<img src="icon-url.png" alt="Save" />
</button>`}
<img src="icon-url.png" alt="Save" />
</button>`}
EmmaDawsonDev marked this conversation as resolved.
Show resolved Hide resolved
languageType={"html"}
/>
<CodeBlock
codeSnippet={`<button type="button" onclick="handleClick()">
<i class="fa-solid fa-floppy-disk" aria-label="Save"></i>
</button>`}
<i class="fa-solid fa-floppy-disk" aria-label="Save"></i>
</button>`}
EmmaDawsonDev marked this conversation as resolved.
Show resolved Hide resolved
languageType={"html"}
/>
<p>
Expand All @@ -229,17 +229,17 @@ export const ButtonsTemplate = () => {
</p>
<CodeBlock
codeSnippet={`<button type="button" onclick="handleClick()">
<i class="fa-solid fa-magnifying-glass" aria-label="Search"></i>
</button>`}
<i class="fa-solid fa-magnifying-glass" aria-label="Search"></i>
</button>`}
EmmaDawsonDev marked this conversation as resolved.
Show resolved Hide resolved
languageType={"html"}
/>
<p>
<strong>Don't do this:</strong>
</p>
<CodeBlock
codeSnippet={`<button type="button" onclick="handleClick()">
<i class="fa-solid fa-magnifying-glass" aria-label="Magnifying glass"></i>
</button>`}
<i class="fa-solid fa-magnifying-glass" aria-label="Magnifying glass"></i>
</button>`}
EmmaDawsonDev marked this conversation as resolved.
Show resolved Hide resolved
languageType={"html"}
/>
</TemplateSection>
Expand Down
10 changes: 10 additions & 0 deletions components/ContentTemplates/LinksTemplate.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.srOnly{
border: 0;
clip: rect(0,0,0,0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
Loading