bbc-a11y 0.0.14 → 0.0.15
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.
- checksums.yaml +4 -4
- data/features/check_standards/form_interactions.feature +13 -1
- data/features/check_standards/form_labels.feature +9 -0
- data/features/check_standards/headings.feature +1 -3
- data/features/mute_errors.feature +10 -96
- data/lib/bbc/a11y/standards/form_labels.rb +1 -1
- data/lib/bbc/a11y/standards/form_submit_buttons.rb +1 -1
- data/lib/bbc/a11y/version +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17ede39ffd3b5ba558b9981710dd720808ffc5b6
|
4
|
+
data.tar.gz: dc7906e1b703f766942c30cefcbe35c87a30cc10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a73e2a295bbb009a9d8e1626cee41321903010a3cdb95c52030375bc7b1db665c2cb0cee1e07c52af9ac00cd5c7eff90b2dbf1d35555ea5278a28ddb5410556
|
7
|
+
data.tar.gz: f623f9903f1f290bc2830e802116ece5c323682433f255012f7ce4a93b7156441cddcf99534e0db1730737811150c725d06ca8d3afb742d1eac010700e656884
|
@@ -18,7 +18,7 @@ Feature: Form Interactions
|
|
18
18
|
is particularly important to users with cognitive disabilities, but is also
|
19
19
|
beneficial to low vision users as an indication of the end of the form.
|
20
20
|
|
21
|
-
Scenario: Form with a submit
|
21
|
+
Scenario: Form with a submit input
|
22
22
|
Given a page with the HTML:
|
23
23
|
"""
|
24
24
|
<form action="/search">
|
@@ -43,3 +43,15 @@ Feature: Form Interactions
|
|
43
43
|
"""
|
44
44
|
Form has no submit button: /html/body/form
|
45
45
|
"""
|
46
|
+
Scenario: Form with a submit button
|
47
|
+
Given a page with the HTML:
|
48
|
+
"""
|
49
|
+
<form action="/search">
|
50
|
+
<label for="q">Search term:</label>
|
51
|
+
<input type="text" name="q" id="q">
|
52
|
+
<button type="submit">Search</button>
|
53
|
+
</form>
|
54
|
+
"""
|
55
|
+
When I validate the form submit buttons standards
|
56
|
+
Then it passes
|
57
|
+
|
@@ -53,3 +53,12 @@ Feature: Correctly use form labels
|
|
53
53
|
Field has no label or title attribute: /html/body/input[4]
|
54
54
|
Field has no label or title attribute: /html/body/input[5]
|
55
55
|
"""
|
56
|
+
|
57
|
+
Scenario: Hidden fields do not need titles
|
58
|
+
|
59
|
+
Given a page with the HTML:
|
60
|
+
"""
|
61
|
+
<input type=hidden name=a value=b>
|
62
|
+
"""
|
63
|
+
When I validate the form labels standards
|
64
|
+
Then it passes
|
@@ -39,9 +39,7 @@ Feature: Headings
|
|
39
39
|
When I validate the heading standards
|
40
40
|
Then it fails with the message:
|
41
41
|
"""
|
42
|
-
A document must have exactly one heading. Found 2 h1 elements
|
43
|
-
/html/body/h1[1]
|
44
|
-
/html/body/h1[2]
|
42
|
+
A document must have exactly one heading. Found 2 h1 elements.
|
45
43
|
"""
|
46
44
|
|
47
45
|
Scenario: Headings in ascending order
|
@@ -3,116 +3,30 @@ Feature: Mute errors
|
|
3
3
|
Things like ORB and Barlesque that we don't control will clutter up our pages
|
4
4
|
with violations.
|
5
5
|
|
6
|
-
We need a way to ignore
|
6
|
+
We need a way to ignore these kinds of problems, so
|
7
7
|
we can focus on the problems that we can actually fix.
|
8
8
|
|
9
|
-
|
9
|
+
Questions:
|
10
10
|
|
11
|
-
-
|
11
|
+
- how can we ignore / remove specific areas of the page? What are some
|
12
|
+
real examples?
|
12
13
|
|
13
|
-
Scenario: Mute
|
14
|
-
|
15
|
-
Where the standard (e.g. exactly one main heading standard) applies to the
|
16
|
-
whole page, we still report an error even when we have an ignore rule.
|
17
|
-
|
18
|
-
Given a page with no h1s
|
19
|
-
And an ignore rule for a region of the page
|
20
|
-
When I validate the exactly one main heading standard
|
21
|
-
Then it fails with the message:
|
22
|
-
"""
|
23
|
-
A document must have exactly one heading. Found 0 h1 elements.
|
24
|
-
"""
|
25
|
-
|
26
|
-
Scenario: Mute an error that mentions just one HTML element
|
27
|
-
|
28
|
-
Scenario: Mute an error that mentions one or more elements
|
14
|
+
Scenario: Mute any errors from a specific standard
|
29
15
|
Given a page with the HTML:
|
30
16
|
"""
|
31
|
-
<
|
32
|
-
<h1>I am a legacy</h1>
|
33
|
-
</div>
|
34
|
-
<h1>The real heading</h1>
|
17
|
+
<p>yo</p>
|
35
18
|
"""
|
36
19
|
When I validate the exactly one main heading standard
|
37
20
|
Then it fails with the message:
|
38
21
|
"""
|
39
|
-
A document must have exactly one heading. Found
|
40
|
-
/html/body/div/h1
|
41
|
-
/html/body/h1
|
22
|
+
A document must have exactly one heading. Found 0 h1 elements.
|
42
23
|
"""
|
43
24
|
When I add a configuration with:
|
44
25
|
"""
|
45
26
|
mute: [
|
46
|
-
|
47
|
-
standard: "exactly-one-main-heading",
|
48
|
-
css: "#dodgy-legacy-banner h1"
|
49
|
-
}
|
27
|
+
"exactly-one-main-heading"
|
50
28
|
]
|
51
29
|
"""
|
52
30
|
And I validate the exactly one main heading standard
|
53
|
-
Then it
|
54
|
-
|
55
|
-
Scenario: Mute an error about one bad element, but still see other similar problems on the page
|
56
|
-
Given a page with the HTML:
|
57
|
-
"""
|
58
|
-
<div id="dodgy-legacy-banner">
|
59
|
-
<h1>I am a legacy</h1>
|
60
|
-
</div>
|
61
|
-
<h1>The real heading</h1>
|
62
|
-
<h1>Team, fix me</h1>
|
63
|
-
"""
|
64
|
-
When I validate the exactly one main heading standard
|
65
|
-
Then it fails with the message:
|
66
|
-
"""
|
67
|
-
A document must have exactly one heading. Found 3 h1 elements:
|
68
|
-
/html/body/div/h1
|
69
|
-
/html/body/h1[1]
|
70
|
-
/html/body/h1[2]
|
71
|
-
"""
|
72
|
-
When I add a configuration with:
|
73
|
-
"""
|
74
|
-
mute: [
|
75
|
-
{
|
76
|
-
standard: "exactly-one-main-heading",
|
77
|
-
css: "#dodgy-legacy-banner h1"
|
78
|
-
}
|
79
|
-
]
|
80
|
-
"""
|
81
|
-
When I validate the exactly one main heading standard
|
82
|
-
Then it fails with the message:
|
83
|
-
"""
|
84
|
-
A document must have exactly one heading. Found 2 h1 elements:
|
85
|
-
/html/body/h1[1]
|
86
|
-
/html/body/h1[2]
|
87
|
-
"""
|
88
|
-
|
89
|
-
Scenario: Mute an error about one bad element, but still see other similar problems on the page
|
90
|
-
Given a page with the HTML:
|
91
|
-
"""
|
92
|
-
<div id="legacy">
|
93
|
-
<input type="text" name="txtName"/>
|
94
|
-
</div>
|
95
|
-
<input type="text" name="name"/>
|
96
|
-
"""
|
97
|
-
When I validate the form labels standards
|
98
|
-
Then it fails with the message:
|
99
|
-
"""
|
100
|
-
Field has no label or title attribute:
|
101
|
-
/html/body/div/input
|
102
|
-
/html/body/input
|
103
|
-
"""
|
104
|
-
When I add a configuration with:
|
105
|
-
"""
|
106
|
-
mute: [
|
107
|
-
{
|
108
|
-
standard: "form-labels",
|
109
|
-
css: "#legacy input"
|
110
|
-
}
|
111
|
-
]
|
112
|
-
"""
|
113
|
-
When I validate the form labels standard
|
114
|
-
Then it fails with the message:
|
115
|
-
"""
|
116
|
-
Field has no label or title attribute:
|
117
|
-
/html/body/input
|
118
|
-
"""
|
31
|
+
Then it shows 0 errors, 1 muted
|
32
|
+
And it passes
|
data/lib/bbc/a11y/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.15
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbc-a11y
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Wynne
|
@@ -230,7 +230,7 @@ rubyforge_project:
|
|
230
230
|
rubygems_version: 2.4.5.1
|
231
231
|
signing_key:
|
232
232
|
specification_version: 4
|
233
|
-
summary: bbc-a11y-0.0.
|
233
|
+
summary: bbc-a11y-0.0.15
|
234
234
|
test_files:
|
235
235
|
- features/README.md
|
236
236
|
- features/check_standards/focusable_controls.feature
|