axe-core-rspec 2.6.1.pre.78a535c → 4.0.0.pre.2bf4a90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -33
  3. data/lib/axe-rspec.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed5a1f1282a5c214e3d0c694e2f7924d3f38415b8d7e439c061b6fb0606ef998
4
- data.tar.gz: cd0201ab2dd0787c537213406047785c09883f890f47b2de3d9d08184f2dbfcf
3
+ metadata.gz: 3235564c366edadaa474f1292e957832bf8c3a2c679f588d1ffbd349f3218dc2
4
+ data.tar.gz: e11acdf3ab3b684da836704bef576d55743735c3043aa529d18370ce2ef4cd55
5
5
  SHA512:
6
- metadata.gz: ef58477be616f30157e5a896fd75797b9659580f37d468f3a25b91308d95f2bff1cae3498d6edbe9b24f9f2886fce40ab45d326814f065a263fade27277ca1ac
7
- data.tar.gz: d3d64c7a024105ded224993684023bff3a548fdc0c6c47bd77e694923238840f84a1f45700ece1c5d367f44ee1fd72b46cc85bec7af7e3d96a5204c1948a68b4
6
+ metadata.gz: 277439b4c053dcd3b49db02b8219f7509abf6298c0abe46bf7af34769fbf11e9eb9b6f7e6c03d1a848bb07206b382f1191309a5ea6fbf12e9fab52269af36bcc
7
+ data.tar.gz: 8914c5a059577945b0f5eb971b0333e11d53861ce460f94e02b501962cb469f3755ab44d96ea7fee1bb9e3cbbaea78628dceef6f3be4152b433e90080a8b681b
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # `axe-core-rspec`
2
2
 
3
- The `axe-core-rspec` gem provides a custom matchers `BeAccessible` , which can be instantiated using the `be_accessible` helper method.
3
+ The `axe-core-rspec` gem provides a custom matchers `BeAxeClean` , which can be instantiated using the `be_axe_clean` helper method.
4
4
 
5
5
  > See a list of [RSpec built-in matchers](https://relishapp.com/rspec/rspec-expectations/docs/built-in-matchers)
6
6
 
@@ -14,7 +14,7 @@ source "https://rubygems.org"
14
14
  gem 'axe-core-rspec'
15
15
  ```
16
16
 
17
- - Simply requrire `axe-rspec` which extends `RSpec` with the custom matcher `BeAccessible` .
17
+ - Simply requrire `axe-rspec` which extends `RSpec` with the custom matcher `BeAxeClean` .
18
18
 
19
19
  ``` rb
20
20
  require 'axe-rspec'
@@ -24,13 +24,13 @@ require 'axe-rspec'
24
24
 
25
25
  ## Matcher
26
26
 
27
- ### BeAccessible
27
+ ### BeAxeClean
28
28
 
29
- To construct an axe accessibility RSpec check, begin with `expect(page).to be_accessible` , and append any clauses necessary, where `page` object is provided by the webdriver of choice.
29
+ To construct an axe accessibility RSpec check, begin with `expect(page).to be_axe_clean` , and append any clauses necessary, where `page` object is provided by the webdriver of choice.
30
30
 
31
31
  #### Clauses
32
32
 
33
- Clauses are chainable methods for the `be_accessible` custom matcher.Configurable clauses allows for greater granularity with testing and expectaions.
33
+ Clauses are chainable methods for the `be_axe_clean` custom matcher.Configurable clauses allows for greater granularity with testing and expectaions.
34
34
 
35
35
  ##### `within` - Inclusion clause
36
36
 
@@ -42,24 +42,24 @@ Examples:
42
42
 
43
43
  ``` rb
44
44
  # Simple selector
45
- expect(page).to be_accessible.within '#selector1'
45
+ expect(page).to be_axe_clean.within '#selector1'
46
46
 
47
47
  # Compound selector
48
48
  # Include all elements with the class 'selector2' inside the element with id 'selector1'
49
- expect(page).to be_accessible.within '#selector1 .selector2'
49
+ expect(page).to be_axe_clean.within '#selector1 .selector2'
50
50
 
51
51
  # Multiple selectors
52
52
  # Include the element with id 'selector1' *and* all elements with class 'selector2'
53
- expect(page).to be_accessible.within '#selector1', '.selector2'
53
+ expect(page).to be_axe_clean.within '#selector1', '.selector2'
54
54
 
55
55
  # IFrame selector
56
56
  # Include the element with id 'selector1' inside the IFrame with id 'frame1'
57
- expect(page).to be_accessible.within iframe: '#frame1', selector: '#selector1'
57
+ expect(page).to be_axe_clean.within iframe: '#frame1', selector: '#selector1'
58
58
 
59
59
  # Multiple IFrame selectors
60
60
  # Include the element with id 'selector1' inside the IFrame with id 'frame1'
61
61
  # Include the element with id 'selector2' inside the IFrame with id 'frame2'
62
- expect(page).to be_accessible.within(
62
+ expect(page).to be_axe_clean.within(
63
63
  {iframe: '#frame1', selector: '#selector1'},
64
64
  {iframe: '#frame2', selector: '#selector2'}
65
65
  )
@@ -67,12 +67,12 @@ expect(page).to be_accessible.within(
67
67
  # Simple selectors *and* IFrame selector
68
68
  # Include the element with id 'selector1' *and* all elements with class 'selector2'
69
69
  # Include the element with id 'selector3' inside the IFrame with id 'frame'
70
- expect(page).to be_accessible.within '#selector1', '.selector2', iframe: '#frame', selector: '#selector3'
70
+ expect(page).to be_axe_clean.within '#selector1', '.selector2', iframe: '#frame', selector: '#selector3'
71
71
 
72
72
  # Nested IFrame selectors
73
73
  # Include the element selector1 inside the IFrame with id 'frame2',
74
74
  # inside the IFrame with id 'frame1'
75
- expect(page).to be_accessible.within(iframe: '#frame1', selector:
75
+ expect(page).to be_axe_clean.within(iframe: '#frame1', selector:
76
76
  {iframe: '#frame2', selector: '#selector1'}
77
77
  )
78
78
  ```
@@ -87,24 +87,24 @@ Examples:
87
87
 
88
88
  ```rb
89
89
  # Simple selector
90
- expect(page).to be_accessible.excluding '#selector1'
90
+ expect(page).to be_axe_clean.excluding '#selector1'
91
91
 
92
92
  # Compound selector
93
93
  # Exclude all elements with the class 'selector2' inside the element with id 'selector1'
94
- expect(page).to be_accessible.excluding '#selector1 .selector2'
94
+ expect(page).to be_axe_clean.excluding '#selector1 .selector2'
95
95
 
96
96
  # Multiple selectors
97
97
  # Exclude the element with id 'selector1' *and* all elements with class 'selector2'
98
- expect(page).to be_accessible.excluding '#selector1', '.selector2'
98
+ expect(page).to be_axe_clean.excluding '#selector1', '.selector2'
99
99
 
100
100
  # IFrame selector
101
101
  # Exclude the element with id 'selector1' inside the IFrame with id 'frame1'
102
- expect(page).to be_accessible.excluding iframe: '#frame1', selector: '#selector1'
102
+ expect(page).to be_axe_clean.excluding iframe: '#frame1', selector: '#selector1'
103
103
 
104
104
  # Multiple IFrame selectors
105
105
  # Exclude the element with id 'selector1' inside the IFrame with id 'frame1'
106
106
  # Exclude the element with id 'selector2' inside the IFrame with id 'frame2'
107
- expect(page).to be_accessible.excluding(
107
+ expect(page).to be_axe_clean.excluding(
108
108
  {iframe: '#frame1', selector: '#selector1'},
109
109
  {iframe: '#frame2', selector: '#selector2'}
110
110
  )
@@ -112,12 +112,12 @@ expect(page).to be_accessible.excluding(
112
112
  # Simple selectors with IFrame selector
113
113
  # Exclude the element with id 'selector1' *and* all elements with class 'selector2'
114
114
  # Exclude the element with id 'selector3' inside the IFrame with id 'frame'
115
- expect(page).to be_accessible.excluding '#selector1', '.selector2', iframe: '#frame', selector: '#selector3'
115
+ expect(page).to be_axe_clean.excluding '#selector1', '.selector2', iframe: '#frame', selector: '#selector3'
116
116
 
117
117
  # Nested IFrame selectors
118
118
  # Exclude the element selector1 inside the IFrame with id 'frame2',
119
119
  # inside the IFrame with id 'frame1'
120
- expect(page).to be_accessible.excluding(iframe: '#frame1', selector:
120
+ expect(page).to be_axe_clean.excluding(iframe: '#frame1', selector:
121
121
  {iframe: '#frame2', selector: '#selector1'}
122
122
  )
123
123
  ```
@@ -130,10 +130,10 @@ The acceptable [tag names are documented][options-param] as well as a [complete
130
130
 
131
131
  ```rb
132
132
  # Single standard
133
- expect(page).to be_accessible.according_to :wcag2a
133
+ expect(page).to be_axe_clean.according_to :wcag2a
134
134
 
135
135
  # Multiple standards
136
- expect(page).to be_accessible.according_to :wcag2a, :section508
136
+ expect(page).to be_axe_clean.according_to :wcag2a, :section508
137
137
  ```
138
138
 
139
139
  ##### `checking` - Checking Rules clause
@@ -144,13 +144,13 @@ The checking-rules clause specifies which *additional* rules to check (in additi
144
144
 
145
145
  ```rb
146
146
  # Checking a single rule
147
- expect(page).to be_accessible.checking :label
147
+ expect(page).to be_axe_clean.checking :label
148
148
 
149
149
  # Checking multiple rules
150
- expect(page).to be_accessible.checking :label, :tabindex
150
+ expect(page).to be_axe_clean.checking :label, :tabindex
151
151
 
152
152
  # Example specifying an additional best practice rule in addition to all rules in the WCAG2A standard
153
- expect(page).to be_accessible.according_to(:wcag2a).checking(:tabindex)
153
+ expect(page).to be_axe_clean.according_to(:wcag2a).checking(:tabindex)
154
154
  ```
155
155
 
156
156
  ##### `checking_only` - Exclusive Rules clause
@@ -159,10 +159,10 @@ The checking only rules clause specifies which rules to exclusively check. Using
159
159
 
160
160
  ```rb
161
161
  # Checking a single rule
162
- expect(page).to be_accessible.checking_only :label
162
+ expect(page).to be_axe_clean.checking_only :label
163
163
 
164
164
  # Checking multiple rules
165
- expect(page).to be_accessible.checking_only :label, :tabindex
165
+ expect(page).to be_axe_clean.checking_only :label, :tabindex
166
166
  ```
167
167
 
168
168
  ##### `skipping` - Skipping Rules clause
@@ -173,13 +173,13 @@ The skipping-rules clause specifies which rules to skip. This allows an accessib
173
173
 
174
174
  ```rb
175
175
  # Skipping a single rule
176
- expect(page).to be_accessible.skipping :label
176
+ expect(page).to be_axe_clean.skipping :label
177
177
 
178
178
  # Skipping multiple rules
179
- expect(page).to be_accessible.skipping :label, :tabindex
179
+ expect(page).to be_axe_clean.skipping :label, :tabindex
180
180
 
181
181
  # Example specifying an additional best practice rule in addition to all rules in the WCAG2A standard
182
- expect(page).to be_accessible.according_to(:wcag2a).skipping(:label)
182
+ expect(page).to be_axe_clean.according_to(:wcag2a).skipping(:label)
183
183
  ```
184
184
 
185
185
  ##### Interoperability between clauses
@@ -187,13 +187,13 @@ expect(page).to be_accessible.according_to(:wcag2a).skipping(:label)
187
187
  All of the described clauses may be mixed and matched with method chaining. Below are some examples.
188
188
 
189
189
  ```rb
190
- expect(page).to be_accessible.within('.main', '.header').excluding('.footer')
190
+ expect(page).to be_axe_clean.within('.main', '.header').excluding('.footer')
191
191
 
192
- expect(page).to be_accessible.excluding('#sidebar').according_to(:wcag2a, :wcag2aa).skipping(:color-contrast)
192
+ expect(page).to be_axe_clean.excluding('#sidebar').according_to(:wcag2a, :wcag2aa).skipping(:color-contrast)
193
193
 
194
- expect(page).to be_accessible.within('.main').checking_only :document-title, :label
194
+ expect(page).to be_axe_clean.within('.main').checking_only :document-title, :label
195
195
 
196
- expect(page).to be_accessible.according_to(:best-practice).checking(:aria-roles, :definition-list)
196
+ expect(page).to be_axe_clean.according_to(:best-practice).checking(:aria-roles, :definition-list)
197
197
  ```
198
198
 
199
199
  [context-param]: https://github.com/dequelabs/axe-core/blob/master/doc/API.md#context-parameter
data/lib/axe-rspec.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "rspec/core"
2
2
 
3
- require "axe/matchers/be_accessible"
3
+ require "axe/matchers/be_axe_clean"
4
4
 
5
5
  RSpec.configure do |config|
6
6
  config.include Axe::Matchers
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axe-core-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1.pre.78a535c
4
+ version: 4.0.0.pre.2bf4a90
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deque Systems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-25 00:00:00.000000000 Z
11
+ date: 2021-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dumb_delegator