gbu-accessibility-package 3.8.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/bin/fix.js +140 -0
- package/bin/test.js +71 -0
- package/lib/fixer.js +35 -4
- package/package.json +2 -4
- package/ENHANCED_ALT_FEATURES.md +0 -230
- package/demo/1mb-jpg-example-file.jpg +0 -0
- package/demo/advanced-test.html +0 -44
- package/demo/aria-label-test.html +0 -32
- package/demo/broken-links-test.html +0 -41
- package/demo/comprehensive-test.html +0 -21
- package/demo/dead-code-test.css +0 -68
- package/demo/dead-code-test.html +0 -36
- package/demo/dead-code-test.js +0 -77
- package/demo/demo.js +0 -73
- package/demo/duplicate-roles.html +0 -45
- package/demo/enhanced-alt-test.html +0 -150
- package/demo/form-labels-test.html +0 -87
- package/demo/heading-structure-test.html +0 -60
- package/demo/heading-structure-test.html.backup +0 -60
- package/demo/large-file-demo.css +0 -213
- package/demo/nested-controls-test.html +0 -92
- package/demo/sample.html +0 -47
- package/demo/test-external-links.html +0 -26
- package/demo/unused-files-test.html +0 -31
- package/demo/unused-image.png +0 -1
- package/demo/unused-page.html +0 -11
- package/demo/unused-script.js +0 -12
- package/demo/unused-style.css +0 -10
- package/demo/very-large-file.js +0 -2
- package/example.js +0 -121
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="ja">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Heading Structure Test - Accessibility Issues</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<h1>Heading Structure Test Cases</h1>
|
|
10
|
-
|
|
11
|
-
<!-- Test Case 1: Missing h1 (this will be converted from h2) -->
|
|
12
|
-
<h2>This should be h1</h2>
|
|
13
|
-
<p>Main content of the page</p>
|
|
14
|
-
|
|
15
|
-
<!-- Test Case 2: Multiple h1 elements -->
|
|
16
|
-
<h1>First h1 (should stay)</h1>
|
|
17
|
-
<h1>Second h1 (should become h2)</h1>
|
|
18
|
-
<h1>Third h1 (should become h2)</h1>
|
|
19
|
-
|
|
20
|
-
<!-- Test Case 3: Level skipping -->
|
|
21
|
-
<h2>Section heading</h2>
|
|
22
|
-
<h4>Subsection (skips h3 - should become h3)</h4>
|
|
23
|
-
<h6>Sub-subsection (skips h4, h5 - should become h4)</h6>
|
|
24
|
-
|
|
25
|
-
<!-- Test Case 4: Empty headings -->
|
|
26
|
-
<h3></h3>
|
|
27
|
-
<h4> </h4>
|
|
28
|
-
<h5><span></span></h5>
|
|
29
|
-
|
|
30
|
-
<!-- Test Case 5: Duplicate headings -->
|
|
31
|
-
<h2>Products</h2>
|
|
32
|
-
<p>Some content about products</p>
|
|
33
|
-
<h2>Products</h2>
|
|
34
|
-
<p>More content about products</p>
|
|
35
|
-
|
|
36
|
-
<!-- Test Case 6: Proper structure (should not be changed) -->
|
|
37
|
-
<h2>Proper Section</h2>
|
|
38
|
-
<h3>Proper Subsection</h3>
|
|
39
|
-
<h4>Proper Sub-subsection</h4>
|
|
40
|
-
<p>Content with proper heading hierarchy</p>
|
|
41
|
-
|
|
42
|
-
<!-- Test Case 7: Complex nesting with issues -->
|
|
43
|
-
<h2>Services</h2>
|
|
44
|
-
<h5>Service 1 (should be h3)</h5>
|
|
45
|
-
<h6>Details (should be h4)</h6>
|
|
46
|
-
<h3>Service 2 (correct)</h3>
|
|
47
|
-
<h5>More details (should be h4)</h5>
|
|
48
|
-
|
|
49
|
-
<!-- Test Case 8: Empty headings with context -->
|
|
50
|
-
<div class="section">
|
|
51
|
-
<h3></h3>
|
|
52
|
-
<p>This section talks about our company history and achievements.</p>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
<div class="product-info">
|
|
56
|
-
<h4> </h4>
|
|
57
|
-
<p>Our flagship product offers innovative solutions for modern businesses.</p>
|
|
58
|
-
</div>
|
|
59
|
-
</body>
|
|
60
|
-
</html>
|
package/demo/large-file-demo.css
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
/* Large CSS file for demo - exceeds 100KB threshold */
|
|
2
|
-
|
|
3
|
-
/* This CSS file is artificially large to demonstrate file size analysis */
|
|
4
|
-
|
|
5
|
-
.container {
|
|
6
|
-
max-width: 1200px;
|
|
7
|
-
margin: 0 auto;
|
|
8
|
-
padding: 20px;
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
15
|
-
min-height: 100vh;
|
|
16
|
-
font-family: 'Arial', sans-serif;
|
|
17
|
-
color: #333;
|
|
18
|
-
line-height: 1.6;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* Repeated styles to make file larger */
|
|
22
|
-
.card-1, .card-2, .card-3, .card-4, .card-5, .card-6, .card-7, .card-8, .card-9, .card-10,
|
|
23
|
-
.card-11, .card-12, .card-13, .card-14, .card-15, .card-16, .card-17, .card-18, .card-19, .card-20,
|
|
24
|
-
.card-21, .card-22, .card-23, .card-24, .card-25, .card-26, .card-27, .card-28, .card-29, .card-30,
|
|
25
|
-
.card-31, .card-32, .card-33, .card-34, .card-35, .card-36, .card-37, .card-38, .card-39, .card-40,
|
|
26
|
-
.card-41, .card-42, .card-43, .card-44, .card-45, .card-46, .card-47, .card-48, .card-49, .card-50 {
|
|
27
|
-
background: white;
|
|
28
|
-
border-radius: 12px;
|
|
29
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
30
|
-
padding: 24px;
|
|
31
|
-
margin: 16px;
|
|
32
|
-
transition: all 0.3s ease;
|
|
33
|
-
transform: translateY(0);
|
|
34
|
-
opacity: 1;
|
|
35
|
-
border: 1px solid #e1e5e9;
|
|
36
|
-
position: relative;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
align-items: flex-start;
|
|
42
|
-
justify-content: space-between;
|
|
43
|
-
min-height: 200px;
|
|
44
|
-
max-width: 300px;
|
|
45
|
-
width: 100%;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.card-1:hover, .card-2:hover, .card-3:hover, .card-4:hover, .card-5:hover, .card-6:hover, .card-7:hover, .card-8:hover, .card-9:hover, .card-10:hover,
|
|
49
|
-
.card-11:hover, .card-12:hover, .card-13:hover, .card-14:hover, .card-15:hover, .card-16:hover, .card-17:hover, .card-18:hover, .card-19:hover, .card-20:hover,
|
|
50
|
-
.card-21:hover, .card-22:hover, .card-23:hover, .card-24:hover, .card-25:hover, .card-26:hover, .card-27:hover, .card-28:hover, .card-29:hover, .card-30:hover,
|
|
51
|
-
.card-31:hover, .card-32:hover, .card-33:hover, .card-34:hover, .card-35:hover, .card-36:hover, .card-37:hover, .card-38:hover, .card-39:hover, .card-40:hover,
|
|
52
|
-
.card-41:hover, .card-42:hover, .card-43:hover, .card-44:hover, .card-45:hover, .card-46:hover, .card-47:hover, .card-48:hover, .card-49:hover, .card-50:hover {
|
|
53
|
-
transform: translateY(-8px);
|
|
54
|
-
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
|
|
55
|
-
border-color: #667eea;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* Button styles - repeated to make file larger */
|
|
59
|
-
.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-light, .btn-dark,
|
|
60
|
-
.btn-outline-primary, .btn-outline-secondary, .btn-outline-success, .btn-outline-danger, .btn-outline-warning, .btn-outline-info {
|
|
61
|
-
display: inline-block;
|
|
62
|
-
padding: 12px 24px;
|
|
63
|
-
margin: 4px 2px;
|
|
64
|
-
border: none;
|
|
65
|
-
border-radius: 6px;
|
|
66
|
-
cursor: pointer;
|
|
67
|
-
font-size: 16px;
|
|
68
|
-
font-weight: 500;
|
|
69
|
-
text-align: center;
|
|
70
|
-
text-decoration: none;
|
|
71
|
-
transition: all 0.3s ease;
|
|
72
|
-
user-select: none;
|
|
73
|
-
white-space: nowrap;
|
|
74
|
-
vertical-align: middle;
|
|
75
|
-
line-height: 1.5;
|
|
76
|
-
position: relative;
|
|
77
|
-
overflow: hidden;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Form styles - repeated */
|
|
81
|
-
.form-group, .form-control, .form-label, .form-text, .form-check, .form-switch, .form-select, .form-range,
|
|
82
|
-
.input-group, .input-group-text, .input-group-prepend, .input-group-append, .form-floating, .form-validation {
|
|
83
|
-
position: relative;
|
|
84
|
-
display: block;
|
|
85
|
-
width: 100%;
|
|
86
|
-
padding: 0.375rem 0.75rem;
|
|
87
|
-
font-size: 1rem;
|
|
88
|
-
font-weight: 400;
|
|
89
|
-
line-height: 1.5;
|
|
90
|
-
color: #212529;
|
|
91
|
-
background-color: #fff;
|
|
92
|
-
background-image: none;
|
|
93
|
-
border: 1px solid #ced4da;
|
|
94
|
-
border-radius: 0.375rem;
|
|
95
|
-
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
96
|
-
margin-bottom: 1rem;
|
|
97
|
-
box-sizing: border-box;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* Navigation styles - repeated */
|
|
101
|
-
.navbar, .nav, .nav-item, .nav-link, .navbar-brand, .navbar-nav, .navbar-toggler, .navbar-collapse,
|
|
102
|
-
.nav-tabs, .nav-pills, .nav-justified, .nav-fill, .breadcrumb, .breadcrumb-item, .pagination, .page-item, .page-link {
|
|
103
|
-
display: flex;
|
|
104
|
-
flex-wrap: wrap;
|
|
105
|
-
padding-left: 0;
|
|
106
|
-
margin-bottom: 0;
|
|
107
|
-
list-style: none;
|
|
108
|
-
align-items: center;
|
|
109
|
-
justify-content: space-between;
|
|
110
|
-
background-color: #f8f9fa;
|
|
111
|
-
border-bottom: 1px solid #dee2e6;
|
|
112
|
-
padding: 0.5rem 1rem;
|
|
113
|
-
position: relative;
|
|
114
|
-
transition: all 0.3s ease;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* Grid system - repeated */
|
|
118
|
-
.container-fluid, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl,
|
|
119
|
-
.row, .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
|
|
120
|
-
.col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
|
|
121
|
-
.col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
|
|
122
|
-
.col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,
|
|
123
|
-
.col-xl, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 {
|
|
124
|
-
position: relative;
|
|
125
|
-
width: 100%;
|
|
126
|
-
padding-right: 15px;
|
|
127
|
-
padding-left: 15px;
|
|
128
|
-
box-sizing: border-box;
|
|
129
|
-
flex-basis: 0;
|
|
130
|
-
flex-grow: 1;
|
|
131
|
-
max-width: 100%;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* Typography - repeated */
|
|
135
|
-
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
|
|
136
|
-
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
|
|
137
|
-
.lead, .text-muted, .text-primary, .text-secondary, .text-success, .text-danger, .text-warning, .text-info {
|
|
138
|
-
margin-top: 0;
|
|
139
|
-
margin-bottom: 0.5rem;
|
|
140
|
-
font-weight: 500;
|
|
141
|
-
line-height: 1.2;
|
|
142
|
-
color: inherit;
|
|
143
|
-
font-family: inherit;
|
|
144
|
-
font-style: normal;
|
|
145
|
-
font-variant: normal;
|
|
146
|
-
text-transform: none;
|
|
147
|
-
text-decoration: none;
|
|
148
|
-
letter-spacing: normal;
|
|
149
|
-
word-spacing: normal;
|
|
150
|
-
white-space: normal;
|
|
151
|
-
text-align: inherit;
|
|
152
|
-
text-indent: 0;
|
|
153
|
-
text-shadow: none;
|
|
154
|
-
text-overflow: ellipsis;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/* Utility classes - repeated to increase file size */
|
|
158
|
-
.d-none, .d-inline, .d-inline-block, .d-block, .d-table, .d-table-row, .d-table-cell, .d-flex, .d-inline-flex,
|
|
159
|
-
.d-sm-none, .d-sm-inline, .d-sm-inline-block, .d-sm-block, .d-sm-table, .d-sm-table-row, .d-sm-table-cell, .d-sm-flex, .d-sm-inline-flex,
|
|
160
|
-
.d-md-none, .d-md-inline, .d-md-inline-block, .d-md-block, .d-md-table, .d-md-table-row, .d-md-table-cell, .d-md-flex, .d-md-inline-flex,
|
|
161
|
-
.d-lg-none, .d-lg-inline, .d-lg-inline-block, .d-lg-block, .d-lg-table, .d-lg-table-row, .d-lg-table-cell, .d-lg-flex, .d-lg-inline-flex,
|
|
162
|
-
.d-xl-none, .d-xl-inline, .d-xl-inline-block, .d-xl-block, .d-xl-table, .d-xl-table-row, .d-xl-table-cell, .d-xl-flex, .d-xl-inline-flex {
|
|
163
|
-
display: none !important;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/* Spacing utilities - repeated */
|
|
167
|
-
.m-0, .m-1, .m-2, .m-3, .m-4, .m-5, .mx-0, .mx-1, .mx-2, .mx-3, .mx-4, .mx-5, .my-0, .my-1, .my-2, .my-3, .my-4, .my-5,
|
|
168
|
-
.mt-0, .mt-1, .mt-2, .mt-3, .mt-4, .mt-5, .mb-0, .mb-1, .mb-2, .mb-3, .mb-4, .mb-5, .ml-0, .ml-1, .ml-2, .ml-3, .ml-4, .ml-5, .mr-0, .mr-1, .mr-2, .mr-3, .mr-4, .mr-5,
|
|
169
|
-
.p-0, .p-1, .p-2, .p-3, .p-4, .p-5, .px-0, .px-1, .px-2, .px-3, .px-4, .px-5, .py-0, .py-1, .py-2, .py-3, .py-4, .py-5,
|
|
170
|
-
.pt-0, .pt-1, .pt-2, .pt-3, .pt-4, .pt-5, .pb-0, .pb-1, .pb-2, .pb-3, .pb-4, .pb-5, .pl-0, .pl-1, .pl-2, .pl-3, .pl-4, .pl-5, .pr-0, .pr-1, .pr-2, .pr-3, .pr-4, .pr-5 {
|
|
171
|
-
margin: 0 !important;
|
|
172
|
-
padding: 0 !important;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Color utilities */
|
|
176
|
-
.bg-primary, .bg-secondary, .bg-success, .bg-danger, .bg-warning, .bg-info, .bg-light, .bg-dark, .bg-white, .bg-transparent,
|
|
177
|
-
.text-primary, .text-secondary, .text-success, .text-danger, .text-warning, .text-info, .text-light, .text-dark, .text-muted, .text-white {
|
|
178
|
-
background-color: transparent !important;
|
|
179
|
-
color: inherit !important;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/* Border utilities */
|
|
183
|
-
.border, .border-top, .border-right, .border-bottom, .border-left, .border-0, .border-top-0, .border-right-0, .border-bottom-0, .border-left-0,
|
|
184
|
-
.border-primary, .border-secondary, .border-success, .border-danger, .border-warning, .border-info, .border-light, .border-dark, .border-white {
|
|
185
|
-
border: 1px solid #dee2e6 !important;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* Position utilities */
|
|
189
|
-
.position-static, .position-relative, .position-absolute, .position-fixed, .position-sticky,
|
|
190
|
-
.fixed-top, .fixed-bottom, .sticky-top, .sticky-bottom {
|
|
191
|
-
position: static !important;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/* This pattern repeats many times to make the file exceed 100KB threshold */
|
|
195
|
-
/* More repeated styles... */
|
|
196
|
-
.large-component-1, .large-component-2, .large-component-3, .large-component-4, .large-component-5 {
|
|
197
|
-
background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
|
|
198
|
-
padding: 40px;
|
|
199
|
-
margin: 20px;
|
|
200
|
-
border-radius: 20px;
|
|
201
|
-
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
|
202
|
-
transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
|
|
203
|
-
transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
204
|
-
animation: pulse 2s infinite;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
@keyframes pulse {
|
|
208
|
-
0% { transform: scale(1); }
|
|
209
|
-
50% { transform: scale(1.05); }
|
|
210
|
-
100% { transform: scale(1); }
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/* Many more repetitive styles to reach the size threshold... */
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="ja">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Nested Interactive Controls Test - Accessibility Issues</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<h1>Nested Interactive Controls Test Cases</h1>
|
|
10
|
-
|
|
11
|
-
<!-- Test Case 1: div[role="button"] containing links (like in the axe error) -->
|
|
12
|
-
<div class="card-buttons">
|
|
13
|
-
<a href="https://business.mobile.rakuten.co.jp/solution/service/rakuten-ai-for-business/?scid=we_solution09_2504" class="btn btn-secondary" target="_blank" role="link">詳細を見る</a>
|
|
14
|
-
<a href="https://business.mobile.rakuten.co.jp/solution/ai/inquiry/?l=id=solution_ai_inquiry1&scid=we_solution10_2504" class="btn btn-primary" target="_blank" role="link">お問い合わせ</a>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<!-- Test Case 2: Button containing links -->
|
|
18
|
-
<button type="button" onclick="handleClick()" role="button">
|
|
19
|
-
<a href="/page1" role="link">Link inside button</a>
|
|
20
|
-
<span>Click me</span>
|
|
21
|
-
</button>
|
|
22
|
-
|
|
23
|
-
<!-- Test Case 3: Link containing button -->
|
|
24
|
-
<a href="/page2" role="link">
|
|
25
|
-
<button type="button">Button inside link</button>
|
|
26
|
-
</a>
|
|
27
|
-
|
|
28
|
-
<!-- Test Case 4: div[role="button"] containing input -->
|
|
29
|
-
<div>
|
|
30
|
-
<input type="text" placeholder="Search..." aria-label="Search..." title="Search..." id="text_019757">
|
|
31
|
-
<span>Submit</span>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<!-- Test Case 5: Link containing select -->
|
|
35
|
-
<a href="/settings" role="link">
|
|
36
|
-
<select name="language" aria-label="Language" title="Language" id="language_input">
|
|
37
|
-
<option value="ja">Japanese</option>
|
|
38
|
-
<option value="en">English</option>
|
|
39
|
-
</select>
|
|
40
|
-
Settings
|
|
41
|
-
</a>
|
|
42
|
-
|
|
43
|
-
<!-- Test Case 6: Button containing textarea -->
|
|
44
|
-
<button type="submit">
|
|
45
|
-
<textarea name="comment" placeholder="Enter comment" aria-label="Enter comment" title="Enter comment" id="comment_input"></textarea>
|
|
46
|
-
<span>Send</span>
|
|
47
|
-
</button>
|
|
48
|
-
|
|
49
|
-
<!-- Test Case 7: Multiple levels of nesting -->
|
|
50
|
-
<div>
|
|
51
|
-
<div class="container">
|
|
52
|
-
<a href="/nested" role="link">
|
|
53
|
-
<button type="button">Deeply nested</button>
|
|
54
|
-
</a>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<!-- Test Case 8: div[role="button"] with tabindex containing interactive elements -->
|
|
59
|
-
<div>
|
|
60
|
-
<input type="checkbox" id="agree">
|
|
61
|
-
<label for="agree">I agree</label>
|
|
62
|
-
<a href="/terms" role="link">Terms</a>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<!-- Test Case 9: Link containing details/summary -->
|
|
66
|
-
<a href="/info" role="link">
|
|
67
|
-
<details>
|
|
68
|
-
<summary>More info</summary>
|
|
69
|
-
<p>Details content</p>
|
|
70
|
-
</details>
|
|
71
|
-
</a>
|
|
72
|
-
|
|
73
|
-
<!-- Test Case 10: Form elements nested in buttons -->
|
|
74
|
-
<button type="button" class="form-button">
|
|
75
|
-
<input type="radio" name="choice" value="1">
|
|
76
|
-
<input type="radio" name="choice" value="2">
|
|
77
|
-
<span>Choose option</span>
|
|
78
|
-
</button>
|
|
79
|
-
|
|
80
|
-
<!-- Test Case 11: Correct structure (should not be flagged) -->
|
|
81
|
-
<div class="card-buttons">
|
|
82
|
-
<a href="/page1" class="btn btn-secondary" role="link">詳細を見る</a>
|
|
83
|
-
<a href="/page2" class="btn btn-primary" role="link">お問い合わせ</a>
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<!-- Test Case 12: Another correct structure -->
|
|
87
|
-
<button type="button" onclick="handleClick()" role="button">
|
|
88
|
-
<span>Click me</span>
|
|
89
|
-
<i class="icon"></i>
|
|
90
|
-
</button>
|
|
91
|
-
</body>
|
|
92
|
-
</html>
|
package/demo/sample.html
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="ja">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Demo HTML for Accessibility Testing</title>
|
|
5
|
-
</head>
|
|
6
|
-
<body>
|
|
7
|
-
<h1>Sample Website</h1>
|
|
8
|
-
|
|
9
|
-
<!-- Images without alt or role -->
|
|
10
|
-
<img src="logo.png" alt="Sample Website" role="img" aria-label="Sample Website">
|
|
11
|
-
<img src="banner.jpg" alt="Sample Website" role="img" aria-label="Sample Website">
|
|
12
|
-
<img src="icon.svg" alt="Home Icon" role="img" aria-label="Home Icon">
|
|
13
|
-
|
|
14
|
-
<!-- Links without role -->
|
|
15
|
-
<a href="/home" role="link">Home</a>
|
|
16
|
-
<a href="/about" role="link">About Us</a>
|
|
17
|
-
|
|
18
|
-
<!-- Buttons without role -->
|
|
19
|
-
<button onclick="submit()" role="button">Submit Form</button>
|
|
20
|
-
<button type="button">Regular Button</button>
|
|
21
|
-
|
|
22
|
-
<!-- Clickable elements -->
|
|
23
|
-
<div onclick="navigate()" class="btn" role="button">Click Me</div>
|
|
24
|
-
<span onclick="toggle()" role="button">Toggle</span>
|
|
25
|
-
|
|
26
|
-
<!-- Navigation -->
|
|
27
|
-
<nav>
|
|
28
|
-
<ul class="nav-menu" role="menubar">
|
|
29
|
-
<li class="nav-item" role="menuitem"><a href="/products" role="link">Products</a></li>
|
|
30
|
-
<li class="nav-item" role="menuitem"><a href="/services" role="link">Services</a></li>
|
|
31
|
-
</ul>
|
|
32
|
-
</nav>
|
|
33
|
-
|
|
34
|
-
<!-- More content -->
|
|
35
|
-
<main>
|
|
36
|
-
<article>
|
|
37
|
-
<h2>Article Title</h2>
|
|
38
|
-
<p>Some content here...</p>
|
|
39
|
-
<img src="article-image.jpg" alt="Article Title" role="img" aria-label="Article Title">
|
|
40
|
-
</article>
|
|
41
|
-
</main>
|
|
42
|
-
|
|
43
|
-
<footer>
|
|
44
|
-
<p>© 2024 Demo Company</p>
|
|
45
|
-
</footer>
|
|
46
|
-
</body>
|
|
47
|
-
</html>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>External Links Test</title>
|
|
6
|
-
</head>
|
|
7
|
-
<body>
|
|
8
|
-
<h1>External Links Test</h1>
|
|
9
|
-
|
|
10
|
-
<!-- Working external link -->
|
|
11
|
-
<a href="https://www.google.com" role="link">Google (should work)</a>
|
|
12
|
-
|
|
13
|
-
<!-- Broken external link -->
|
|
14
|
-
<a href="https://this-domain-does-not-exist-12345.com" role="link">Broken external link (should fail)</a>
|
|
15
|
-
|
|
16
|
-
<!-- Local link (should be skipped in external-only mode) -->
|
|
17
|
-
<a href="sample.html" role="link">Local link (should be skipped)</a>
|
|
18
|
-
|
|
19
|
-
<!-- Local image (should be skipped in external-only mode) -->
|
|
20
|
-
<img src="missing-image.jpg" alt="Local image (should be skipped)" role="img" aria-label="Local image (should be skipped)">
|
|
21
|
-
|
|
22
|
-
<!-- Skip patterns -->
|
|
23
|
-
<a href="#anchor" role="link">Anchor (should be skipped)</a>
|
|
24
|
-
<a href="mailto:test@example.com" role="link">Email (should be skipped)</a>
|
|
25
|
-
</body>
|
|
26
|
-
</html>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="ja">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Unused Files Test</title>
|
|
6
|
-
<!-- Referenced CSS -->
|
|
7
|
-
<link rel="stylesheet" href="used-style.css">
|
|
8
|
-
<!-- Referenced JavaScript -->
|
|
9
|
-
<script src="used-script.js"></script>
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<h1>Unused Files Test</h1>
|
|
13
|
-
|
|
14
|
-
<!-- Referenced image -->
|
|
15
|
-
<img src="used-image.jpg" alt="This image is referenced" role="img" aria-label="This image is referenced">
|
|
16
|
-
|
|
17
|
-
<!-- Referenced local link -->
|
|
18
|
-
<a href="used-page.html" role="link">This page is referenced</a>
|
|
19
|
-
|
|
20
|
-
<!-- Note: The following files will be detected as unused:
|
|
21
|
-
- unused-image.png (not referenced anywhere)
|
|
22
|
-
- unused-style.css (not referenced anywhere)
|
|
23
|
-
- unused-script.js (not referenced anywhere)
|
|
24
|
-
- unused-page.html (not referenced anywhere)
|
|
25
|
-
- orphaned-document.pdf (not referenced anywhere)
|
|
26
|
-
-->
|
|
27
|
-
|
|
28
|
-
<p>This page references some files but not others.
|
|
29
|
-
Run <code>gbu-a11y --unused-files</code> to see which files are not referenced.</p>
|
|
30
|
-
</body>
|
|
31
|
-
</html>
|
package/demo/unused-image.png
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
This is an image file placeholder - unused image
|
package/demo/unused-page.html
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="ja">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Unused Page</title>
|
|
6
|
-
</head>
|
|
7
|
-
<body>
|
|
8
|
-
<h1>This page is not referenced anywhere</h1>
|
|
9
|
-
<p>This HTML file exists but is not linked from any other page, so it should be detected as unused.</p>
|
|
10
|
-
</body>
|
|
11
|
-
</html>
|
package/demo/unused-script.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// This JavaScript file is not referenced in any HTML - should be detected as unused
|
|
2
|
-
|
|
3
|
-
function completelyUnusedFunction() {
|
|
4
|
-
console.log('This entire file is unused');
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const unusedData = {
|
|
8
|
-
name: 'Unused',
|
|
9
|
-
value: 42
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
// Even though this file has code, it's never loaded by any HTML file
|