entree 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ea2fc0302c380e238bf85c53b6431547992282d
4
- data.tar.gz: 41b7226457ea08c5ebe0535cfaa4346a7fadedbc
3
+ metadata.gz: 41e4e64522c4c72ef3cc911ebdd4cdfb63028e31
4
+ data.tar.gz: d453eb085f40236bfd3273d96ca3819875ef87f0
5
5
  SHA512:
6
- metadata.gz: 14dc75f4f7648e7145e0a7050d44d208703780386c683565781d1acfcbc90ac14ecfa956a3793b23f8e19d475b9438277949162f60346563e2b0b971e8a1d9ee
7
- data.tar.gz: a676c99e4fad9e4a56e4a6b475173b98040f8ecbf7a6e7d6cfbc4baf0abcc4108348335da00d855648ec279e2fbb14159234821b58b25b6ea27e9101b5dfbceb
6
+ metadata.gz: bb474a0b372dbf0c95a2090a691b350d2a8d2cef82b0f5ca61aaf77201cf18ab9bceb2c5fcfabdaf4cb2642b4c27ef745cbab383fa723fe2b2b4a874c9725dfb
7
+ data.tar.gz: efc5a9ed89020d6e1840fb4cb4ca58cb4bbaa85f709f238d92a7dbaa0695acd3b3454d4c928714b246697867187f302425a0aaef96a9e01098207fdbbaa1a779
data/README.md CHANGED
@@ -45,22 +45,56 @@ Run the audit from a Ruby application like so
45
45
 
46
46
  ### Results Object
47
47
 
48
+ ```
49
+ {
50
+ "ERROR"=>[
48
51
  {
49
- "PASS": [ # Status group
50
- {
51
- "element_names": ["<p class=\"foo\">relevant element</p>"], # applicable DOM elements
52
- "severity": "WARNING", # 'WARNING' or 'SEVERE'
53
- "status": "PASS", # 'PASS', 'FAIL', or 'NA'
54
- "title": "Some description" # rule description
55
- },
56
- { ... }
57
- ],
58
- "NA": [ { ... } ],
59
- "FAIL": [ { ... }]
60
- ]
52
+ "type"=>"ERROR",
53
+ "code"=>"WCAG2AA.Principle4.Guideline4_1.4_1_2",
54
+ "nodeName"=>"input",
55
+ "id"=>"#mce-EMAIL",
56
+ "msg"=>"This email input element does not have a name available to an accessibility API. Valid names are: element content.",
57
+ "outerHTML"=>"<input type=\"email\" value=\"\" name=\"EMAIL\" class=\"required email form-control\" id=\"mce-EMAIL\" placeholder=\"Email address\"></input>",
58
+ "techniques"=>["H91"]
59
+ }
60
+ ],
61
+ "WARNING"=>[
62
+ {
63
+ "type"=>"WARNING",
64
+ "code"=>"WCAG2AA.Principle1.Guideline1_4.1_4_3",
65
+ "nodeName"=>"label",
66
+ "id"=>"",
67
+ "msg"=>"This element is absolutely positioned and the background color can not be determined. Ensure the contrast ratio between the text and all covered parts of the background are at least 4.5:1.",
68
+ "outerHTML"=>"<label class=\"sr-only\" for=\"mce-EMAIL\">...</label>",
69
+ "techniques"=>["G18"]
70
+ }
71
+ ],
72
+ "NOTICE"=>[
73
+ {
74
+ "type"=>"NOTICE",
75
+ "code"=>"WCAG2AA.Principle2.Guideline2_4.2_4_2",
76
+ "nodeName"=>"title",
77
+ "id"=>"",
78
+ "msg"=>"Check that the title element describes the document.",
79
+ "outerHTML"=>"<title>...</title>",
80
+ "techniques"=>["H25"]
81
+ },
82
+ ]
83
+ }
84
+ ```
85
+
86
+ ## Building
87
+
88
+ Currently just notes for myself.
89
+
90
+ From HTML_CodeSnippets.js,
91
+
92
+ * copy `HTML_CodeSniffer/Contrib/PhantomJS/HTMLCS_Run.js` to `vendor`
93
+ * copy `HTML_CodeSniffer/build/HTMLCS.js` to `vendor`
61
94
 
62
95
  ## Rules
63
96
 
97
+ *Currently displaying access_lint.rb rules*
64
98
  For full descriptions of the audit rules, visit the [Accessibility Developer Tools project wiki](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules).
65
99
 
66
100
  Code | Title
data/lib/entree/audit.rb CHANGED
@@ -31,7 +31,7 @@ module Entree
31
31
  if record["code"][0..3] == "WCAG"
32
32
  record["code"].match /(WCAG2A+\.\w+?\.Guideline(\d_\d)\.\2_\d)\.((?:[A-Z]+\d+,?)+)/
33
33
  record["code"] = $1
34
- record["techniques"] = $3.split /,/
34
+ record["infractions"] = $3.split /,/
35
35
  end
36
36
 
37
37
  record
@@ -1,3 +1,3 @@
1
1
  module Entree
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Mullen