Skip to content

Commit b7aa64d

Browse files
committed
fix: accessibility in etiquette
1 parent 2f1d39e commit b7aa64d

6 files changed

Lines changed: 27 additions & 18 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
uses: foo-software/lighthouse-check-status-action@master
6767
with:
6868
lighthouseCheckResults: ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }}
69-
minAccessibilityScore: '93'
69+
minAccessibilityScore: '100'
7070
minBestPracticesScore: '100'
7171
- name: Prune dev dependencies
7272
run: rm -rf node_modules && pnpm install --production

src/components/externalModules/shopify/ColumnEquivalent.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,15 @@ const ColumnEquivalent = ({
7575
setToDisplay={setToDisplay}
7676
/>
7777
)}
78-
<Disclaimer
79-
language={language}
80-
comparisons={comparisons}
81-
baseValue={preciseValue}
82-
column
83-
id={animated ? 'animated' : 'static'}
84-
/>
78+
{!randomize && (
79+
<Disclaimer
80+
language={language}
81+
comparisons={comparisons}
82+
baseValue={preciseValue}
83+
column
84+
id={animated ? 'animated' : 'static'}
85+
/>
86+
)}
8587
<ul className={isAnimated ? styles.animatedComparisonsColumn : ''}>
8688
{comparisons.map((comparison, index) => (
8789
<li

src/components/externalModules/shopify/Disclaimer.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
cursor: pointer;
55
top: 0;
66
right: 0;
7-
padding: 0.25rem 0.5rem;
7+
padding: 0.325rem 0.5rem;
88
border-radius: 0rem 0.5rem 0rem 0;
99
background-color: transparent;
1010
color: var(--neutral-50);
1111
border-bottom: 2px solid var(--neutral-20);
1212
border-left: 2px solid var(--neutral-20);
1313
line-height: 1;
14-
height: 1.375rem;
14+
height: 1.5rem;
1515
font-size: 0.75rem;
1616

1717
svg {

src/components/externalModules/shopify/Equivalent.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,18 @@ const Equivalent = ({
8888
setToDisplay={setToDisplay}
8989
/>
9090
)}
91-
<Disclaimer
92-
language={language}
93-
comparisons={comparisons}
94-
baseValue={preciseValue}
95-
id={animated ? 'animated' : 'static'}
96-
/>
91+
{
92+
// On n'affiche le dislaimer que si il n'y a pas le bouton randomize, pour des soucis d'accessibilité
93+
// Aujourd'hui c'est juste sur le site donc pas de soucis. A voir comment on fera plus tard
94+
!randomize && (
95+
<Disclaimer
96+
language={language}
97+
comparisons={comparisons}
98+
baseValue={preciseValue}
99+
id={animated ? 'animated' : 'static'}
100+
/>
101+
)
102+
}
97103
<ul className={isAnimated ? styles.animatedComparisons : styles.comparisons}>
98104
{comparisons.map((comparison, index) => (
99105
<li

src/components/externalModules/shopify/Progress.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
right: 1.875rem;
1111
top: 0;
1212
cursor: pointer;
13-
padding: 0.25rem 0.5rem;
13+
padding: 0.325rem 0.5rem;
1414
border-radius: 0rem 0rem 0rem 0.5rem;
1515
color: var(--neutral-50);
1616
border-bottom: 2px solid var(--neutral-20);
1717
border-left: 2px solid var(--neutral-20);
1818
line-height: 1;
19-
height: 1.375rem;
19+
height: 1.5rem;
2020
font-size: 0.75rem;
2121

2222
svg {

src/components/outils/alimentation/AlimentationSubCategory.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const AlimentationSubCategory = ({
4545
<p>{t(name)}</p>
4646
<div className={styles.barContainer}>
4747
<div
48+
role='img'
4849
className={hasCategoryOpen ? styles.displayedBar : styles.bar}
4950
style={{ width: `${proportion * 100}%` }}
5051
aria-label={t('impact', { value: proportion * 100 })}

0 commit comments

Comments
 (0)