Skip to content

Commit c903050

Browse files
committed
Fix WCAG issues where available
Added aria-label where possible
1 parent 36d7298 commit c903050

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

components/Cart/Cart.component.jsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,20 @@ const Cart = () => {
1919
return (
2020
<>
2121
<Link href="/handlekurv">
22-
<a className="inline-block pl-3 no-underline hover:text-black">
22+
<a className="inline-block pl-3 no-underline hover:text-black" aria-label="Handlekurv">
2323
<svg
2424
className="fill-current hover:text-black"
2525
xmlns="http://www.w3.org/2000/svg"
2626
width="24"
2727
height="24"
2828
viewBox="0 0 24 24"
29+
aria-label="Handlekurv"
2930
>
30-
<path d="M21,7H7.462L5.91,3.586C5.748,3.229,5.392,3,5,3H2v2h2.356L9.09,15.414C9.252,15.771,9.608,16,10,16h8 c0.4,0,0.762-0.238,0.919-0.606l3-7c0.133-0.309,0.101-0.663-0.084-0.944C21.649,7.169,21.336,7,21,7z M17.341,14h-6.697L8.371,9 h11.112L17.341,14z" />
31-
<circle cx="10.5" cy="18.5" r="1.5" />
32-
<circle cx="17.5" cy="18.5" r="1.5" />
31+
<path d="M21,7H7.462L5.91,3.586C5.748,3.229,5.392,3,5,3H2v2h2.356L9.09,15.414C9.252,15.771,9.608,16,10,16h8 c0.4,0,0.762-0.238,0.919-0.606l3-7c0.133-0.309,0.101-0.663-0.084-0.944C21.649,7.169,21.336,7,21,7z M17.341,14h-6.697L8.371,9 h11.112L17.341,14z"
32+
aria-label="Handlekurv"
33+
/>
34+
<circle cx="10.5" cy="18.5" r="1.5" aria-label="Handlekurv"/>
35+
<circle cx="17.5" cy="18.5" r="1.5" aria-label="Handlekurv"/>
3336
</svg>
3437
</a>
3538
</Link>

components/Header/Navbar.component.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@ const Navbar = () => {
4848
width="24"
4949
height="24"
5050
viewBox="0 0 24 24"
51+
aria-label="Nettbutikk logo"
5152
>
52-
<path d="M5,22h14c1.103,0,2-0.897,2-2V9c0-0.553-0.447-1-1-1h-3V7c0-2.757-2.243-5-5-5S7,4.243,7,7v1H4C3.447,8,3,8.447,3,9v11 C3,21.103,3.897,22,5,22z M9,7c0-1.654,1.346-3,3-3s3,1.346,3,3v1H9V7z M5,10h2v2h2v-2h6v2h2v-2h2l0.002,10H5V10z" />
53+
<path
54+
d="M5,22h14c1.103,0,2-0.897,2-2V9c0-0.553-0.447-1-1-1h-3V7c0-2.757-2.243-5-5-5S7,4.243,7,7v1H4C3.447,8,3,8.447,3,9v11 C3,21.103,3.897,22,5,22z M9,7c0-1.654,1.346-3,3-3s3,1.346,3,3v1H9V7z M5,10h2v2h2v-2h6v2h2v-2h2l0.002,10H5V10z"
55+
aria-label="Nettbutikk logo"
56+
/>
5357
</svg>
5458
NETTBUTIKK
5559
</a>

components/Search/AlgoliaSearchBox.component.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ const AlgoliaSearchBox = () => {
2525
<div className="">
2626
<InstantSearch
2727
indexName={WOO_CONFIG.ALGOLIA_INDEX_NAME}
28-
searchClient={searchClient}
28+
searchClient={searchClient}
2929
>
3030
{/*We need to conditionally add a border because the element has position:fixed*/}
31+
3132
<SearchBox
33+
aria-label="Søk her"
3234
translations={{
3335
submitTitle: 'Søk',
3436
resetTitle: 'Slett søketekst',
35-
placeholder: 'Søk her ...',
37+
placeholder: 'Søk etter produkter',
3638
}}
3739
className={`px-4 py-2 text-base bg-white border outline-none rounded ${
3840
hasFocus ? 'border-black' : 'border-gray-400'

components/Search/MobileSearch.component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const MobileSearch = () => {
2727
translations={{
2828
submitTitle: 'Søk',
2929
resetTitle: 'Slett søketekst',
30-
placeholder: 'Søk her ...',
30+
placeholder: 'Søk etter produkter',
3131
}}
3232
className={`px-4 py-2 text-base bg-white border outline-none rounded ${
3333
hasFocus ? 'border-black' : 'border-gray-400'

0 commit comments

Comments
 (0)