gbu-accessibility-package 3.2.0 → 3.3.0
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 +20 -0
- package/QUICK_START.md +38 -0
- package/README-vi.md +130 -28
- package/README.md +103 -15
- package/cli.js +21 -1
- package/demo/broken-links-test.html +41 -0
- package/demo/form-labels-test.html +87 -0
- package/index.js +1 -2
- package/lib/fixer.js +3579 -1232
- package/package.json +5 -4
- package/lib/enhanced-alt-checker.js +0 -632
- package/lib/enhanced-alt-generator.js +0 -741
|
@@ -0,0 +1,87 @@
|
|
|
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>Form Labels Test - Accessibility Issues</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<h1>Form Labels Test Cases</h1>
|
|
10
|
+
|
|
11
|
+
<!-- Test Case 1: Input without any label -->
|
|
12
|
+
<div>
|
|
13
|
+
<input type="text" name="username">
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<!-- Test Case 2: Input with empty label -->
|
|
17
|
+
<div>
|
|
18
|
+
<label for="email"></label>
|
|
19
|
+
<input type="email" id="email" name="email">
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- Test Case 3: Input without aria-label -->
|
|
23
|
+
<div>
|
|
24
|
+
<input type="password" name="password" placeholder="Enter password">
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- Test Case 4: Input with invalid aria-labelledby -->
|
|
28
|
+
<div>
|
|
29
|
+
<input type="tel" name="phone" aria-labelledby="nonexistent-id">
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<!-- Test Case 5: Input without title attribute -->
|
|
33
|
+
<div>
|
|
34
|
+
<input type="url" name="website">
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<!-- Test Case 6: Textarea without proper labeling -->
|
|
38
|
+
<div>
|
|
39
|
+
<textarea name="comments"></textarea>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<!-- Test Case 7: Select without proper labeling -->
|
|
43
|
+
<div>
|
|
44
|
+
<select name="country">
|
|
45
|
+
<option value="">Choose country</option>
|
|
46
|
+
<option value="jp">Japan</option>
|
|
47
|
+
<option value="us">USA</option>
|
|
48
|
+
</select>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<!-- Test Case 8: Input with implicit label but empty text -->
|
|
52
|
+
<div>
|
|
53
|
+
<label><input type="checkbox" name="agree"></label>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<!-- Test Case 9: Input with aria-labelledby pointing to empty element -->
|
|
57
|
+
<div>
|
|
58
|
+
<span id="empty-label"></span>
|
|
59
|
+
<input type="number" name="age" aria-labelledby="empty-label">
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<!-- Test Case 10: Input without role override -->
|
|
63
|
+
<div>
|
|
64
|
+
<input type="range" name="volume" min="0" max="100">
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<!-- Test Case 11: Multiple inputs without proper structure -->
|
|
68
|
+
<form>
|
|
69
|
+
<input type="text" name="firstname">
|
|
70
|
+
<input type="text" name="lastname">
|
|
71
|
+
<input type="email" name="user_email">
|
|
72
|
+
<textarea name="message"></textarea>
|
|
73
|
+
<select name="priority">
|
|
74
|
+
<option value="low">Low</option>
|
|
75
|
+
<option value="high">High</option>
|
|
76
|
+
</select>
|
|
77
|
+
<input type="submit" value="Submit">
|
|
78
|
+
</form>
|
|
79
|
+
|
|
80
|
+
<!-- Test Case 12: Inputs with only placeholder (not sufficient) -->
|
|
81
|
+
<div>
|
|
82
|
+
<input type="search" name="query" placeholder="Search...">
|
|
83
|
+
<input type="date" name="birthdate" placeholder="Select date">
|
|
84
|
+
<input type="time" name="appointment" placeholder="Select time">
|
|
85
|
+
</div>
|
|
86
|
+
</body>
|
|
87
|
+
</html>
|
package/index.js
CHANGED