axe-core-api 4.5.1 → 4.6.0.pre.094e546
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/axe/api/context.rb +2 -2
- data/lib/axe/api/selector.rb +12 -0
- data/node_modules/axe-core/axe.min.js +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25e4de4ad734fb6207582545b0eea32cd475ee2ec5260f17bf2cf54936cdf933
|
4
|
+
data.tar.gz: 51ac546b1aabe1c0ed05bbedbff3ff5393973688fe1794d7159fb54123e10176
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4db262d589a3ff7678f86f7cc538e40423776ff6bcf6311486fa97976cef1bb0dcb300f51b03b2ec8d033f9a0a2739e7a0d86dfda9aca5364f157983eb3613b
|
7
|
+
data.tar.gz: 7e9c7f0d0f938b2a347a65ebeafae7eb1e0dc3f1735709206beecbfa6f8c6f265995c29c28a128de1b9c90157c9c36d561d010fc658169d42883dbf51f2c899f
|
data/lib/axe/api/context.rb
CHANGED
@@ -9,11 +9,11 @@ module Axe
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def within(*selectors)
|
12
|
-
@inclusion.concat selectors.map { |s|
|
12
|
+
@inclusion.concat selectors.map { |s| Selector::normalize s }
|
13
13
|
end
|
14
14
|
|
15
15
|
def excluding(*selectors)
|
16
|
-
@exclusion.concat selectors.map { |s|
|
16
|
+
@exclusion.concat selectors.map { |s| Selector::normalize s }
|
17
17
|
end
|
18
18
|
|
19
19
|
def to_h
|
data/lib/axe/api/selector.rb
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
module Axe
|
2
2
|
module API
|
3
3
|
class Selector
|
4
|
+
def self.normalize(s)
|
5
|
+
if s.is_a? Hash
|
6
|
+
if s.key? :iframe and s.key? :selector
|
7
|
+
Array(Selector.new s)
|
8
|
+
else
|
9
|
+
s
|
10
|
+
end
|
11
|
+
else
|
12
|
+
Array(Selector.new s)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
4
16
|
def initialize(s)
|
5
17
|
@selector = case s
|
6
18
|
when Array then s
|