Skip to content

Commit 32c60ee

Browse files
author
Jonathan Vallet
committed
version 0.26.0
2 parents 052d3a5 + 55ab3e8 commit 32c60ee

File tree

15 files changed

+270
-26
lines changed

15 files changed

+270
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Que vous travailliez sur des sites en développement ou que vous souhaitiez éva
6767
| 8.7 | || | | |
6868
| 8.8 | ||| | |
6969
| 8.10 | || | | |
70-
| 9.1 | ||| | |
70+
| 9.1 | ||| | Vérifie si la hiérarchie des titres est correcte. |
7171
| 9.3 | | | || Met en avant les listes |
7272
| 9.4 | | | || Met en avant les citations |
7373
| 10.1 | || | | |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "accessibility-extension",
3-
"version": "0.25.1",
3+
"version": "0.26.0",
44
"description": "Extension d'accessibilité",
55
"repository": {
66
"type": "git",

styleguide/assets/manifest_chrome.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
]
3232
}
3333
],
34+
"permissions": [
35+
"storage"
36+
],
3437
"devtools_page": "rgaa-checker-devtools.html",
3538
"web_accessible_resources": [
3639
{

styleguide/assets/manifest_firefox.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88
"96": "images/icon96.png"
99
},
1010
"browser_action": {
11-
"default_popup": "rgaa-checker-panel.html",
11+
"default_popup": "rgaa-checker-popup.html",
1212
"default_icon": {
1313
"48": "images/icon48.png",
1414
"96": "images/icon96.png"
1515
}
1616
},
1717
"permissions": [
18-
"activeTab",
19-
"scripting"
18+
"storage"
2019
],
2120
"background": {
2221
"scripts": ["background.js"],

styleguide/assets/scripts/extension/criteria/Criterion1_1.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default class Criterion1_1 extends BaseCriterion {
2929
this.messageList = {
3030
'NT': 'Toutes les images de la page ont une alternative textuelle.' + warningMessage,
3131
'NC': 'Toutes les images de la page n\'ont pas d\'alternative textuelle.' + warningMessage,
32-
'NA': 'Aucune image n\'a été trouvée dans la page.' + warningMessage
32+
'NA': 'Aucune image n\'a été trouvée dans la page.'
3333
}
3434
}
3535

@@ -149,7 +149,7 @@ export default class Criterion1_1 extends BaseCriterion {
149149
this.logResults('1.1 - Liste des images sans alternative textuelle', $noLabelImageList);
150150
}
151151

152-
this.elementList = $noLabelImageList;
152+
this.elementList = Array.from($allImageList) as HTMLElement[];
153153

154154
return this.status;
155155
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Criterion3_2.ts - Copyright (c) 2023-2024 - Arneo
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import BaseCriterion from '../common/BaseCriterion';
18+
19+
/**
20+
* Dans chaque page web, le contraste entre la couleur du texte et la couleur de son arrière-plan est-il suffisamment élevé (hors cas particuliers) ?
21+
* Traite: C, NC
22+
*/
23+
export default class Criterion2_2 extends BaseCriterion {
24+
constructor(isTestMode: boolean = false) {
25+
super(isTestMode);
26+
this.messageList = {
27+
'C': 'Le contraste entre la couleur du texte et la couleur de son arrière-plan est suffisamment élevé pour tous les éléments textuels.',
28+
'NC': 'Le contraste entre la couleur du texte et la couleur de son arrière-plan n\'est pas suffisamment élevé pour tous les éléments textuels.'
29+
}
30+
}
31+
32+
runTest() {
33+
this.status = 'NA';
34+
35+
return this.status;
36+
}
37+
}
38+

styleguide/assets/scripts/extension/criteria/Criterion5_6.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default class Criterion5_6 extends BaseCriterion {
3535

3636
let $tableList = document.querySelectorAll(this.querySelector);
3737
if ($tableList.length) {
38+
this.status = 'NT';
3839
}
3940

4041
if ($tableList.length > 0) {

styleguide/assets/scripts/extension/criteria/Criterion9_1.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export default class Criterion9_1 extends BaseCriterion {
2525
super(isTestMode);
2626
this.querySelector = 'h1, h2, h3, h4, h5, h6, [role="heading"][aria-level]';
2727
this.messageList = {
28-
'NT': 'Vérifiez si les titres sont présents et correctement balisés.',
28+
'NT': 'La hiérachie des titres est correcte.<br />Vérifiez si les titres sont présents et correctement balisés.',
2929
'NA': "Aucun titre n'a été trouvé",
3030
'NC': 'La hiérarchie des titres n\'est pas respectée.',
31-
'C': 'La hiérarchie des titres est respectée.'
31+
'C': 'La hiérarchie des titres est respectée et les titres sont correctement balisés.'
3232
};
3333
}
3434

styleguide/components/20-organisms/summary/_summary.scss

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@
1212
display: flex;
1313
justify-content: space-between;
1414
align-items: center;
15+
flex-wrap: wrap;
1516
gap: 6px;
1617
}
1718

19+
.o-summary__top__url {
20+
flex-shrink: 0;
21+
font-size: 12px;
22+
font-weight: 500;
23+
width: 100%;
24+
}
25+
1826
.o-summary__top__title {
1927
font-size: 14px;
2028
font-weight: 800;
@@ -31,6 +39,53 @@
3139
display: none;
3240
}
3341

42+
.o-summary__differences {
43+
display: flex;
44+
flex-direction: column;
45+
width: 100%;
46+
flex-shrink: 0;
47+
gap: 6px;
48+
margin-top: 8px;
49+
margin-bottom: 8px;
50+
background-color: $color-white;
51+
}
52+
53+
.o-summary__differences__title {
54+
font-size: 12px;
55+
font-weight: 700;
56+
}
57+
58+
.o-summary__differences__list {
59+
padding-left: 16px;
60+
font-size: 12px;
61+
62+
li {
63+
list-style: disc;
64+
}
65+
66+
span {
67+
display: inline-block;
68+
padding: 4px;
69+
border-radius: 4px;
70+
font-weight: 700;
71+
72+
&.-status-c {
73+
background-color: var(--secondary-color-green-soft);
74+
color: var(--secondary-color-green);
75+
}
76+
77+
&.-status-nc {
78+
background-color: var(--secondary-color-red-soft);
79+
color: var(--secondary-color-red);
80+
}
81+
82+
&.-status-na {
83+
background-color: var(--secondary-color-orange-soft);
84+
color: var(--secondary-color-orange);
85+
}
86+
}
87+
}
88+
3489
.o-summary__frame {
3590
padding: 8px;
3691
border-radius: 8px;

styleguide/components/20-organisms/summary/summary.html.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
{% endfor %}
1818
<{{ tag }}{% for attribute, value in attributeList %} {{ attribute }}="{{ value }}"{% endfor %}>
1919
<div class="o-summary__top">
20+
<p class="o-summary__top__url"><strong>URL testée :</strong> <span class="js-summary__host"></span><span class="js-summary__url"></span></p>
21+
<div class="o-summary__differences o-summary__frame -hidden js-summary__differences">
22+
<h2 class="o-summary__differences__title">Différences depuis les derniers tests:</h2>
23+
<ul class="o-summary__differences__list js-summary__differences__list"></ul>
24+
</div>
2025
<h2 class="o-summary__top__title">Simplifiez votre audit</h2>
2126
<button class="o-summary__top__download js-summary__copyButton">Copier le résultat</button>
2227
<textarea id="summary__result" class="js-summary__textarea o-summary__top__textarea"></textarea>

0 commit comments

Comments
 (0)