a11y_agent 0.0.5.pre.alpha.4 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fixtures/react/.eslintrc +13 -0
- data/fixtures/react/.gitignore +3 -0
- data/fixtures/react/package-lock.json +16453 -0
- data/fixtures/react/package.json +42 -0
- data/fixtures/react/public/index.html +19 -0
- data/fixtures/react/readme.md +42 -0
- data/fixtures/react/src/index.js +16 -0
- data/fixtures/react/src/todo/app.css +87 -0
- data/fixtures/react/src/todo/app.jsx +20 -0
- data/fixtures/react/src/todo/components/footer.jsx +46 -0
- data/fixtures/react/src/todo/components/header.jsx +15 -0
- data/fixtures/react/src/todo/components/input.jsx +46 -0
- data/fixtures/react/src/todo/components/item.jsx +55 -0
- data/fixtures/react/src/todo/components/main.jsx +45 -0
- data/fixtures/react/src/todo/constants.js +7 -0
- data/fixtures/react/src/todo/reducer.js +64 -0
- data/fixtures/react/webpack.common.js +43 -0
- data/fixtures/react/webpack.dev.js +18 -0
- data/fixtures/react/webpack.prod.js +35 -0
- data/fixtures/sample.html +93 -0
- data/lib/a11y_agent/version.rb +1 -1
- data/lib/agents/a11y_agent.rb +60 -89
- data/lib/generators/confirmable_fix_generator.rb +56 -0
- data/lib/tasks/release.rake +3 -3
- data/package.json +12 -12
- data/yarn.lock +105 -2459
- metadata +80 -8
- data/lib/bin/axe.ts +0 -19
- data/lib/generators/hydrate_document_generator.rb +0 -27
metadata
CHANGED
@@ -1,15 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: a11y_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Cundiff
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-04 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: axe-core-api
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '4.9'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - "~>"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '4.9'
|
13
26
|
- !ruby/object:Gem::Dependency
|
14
27
|
name: diffy
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,6 +37,20 @@ dependencies:
|
|
24
37
|
- - "~>"
|
25
38
|
- !ruby/object:Gem::Version
|
26
39
|
version: '3.4'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: dotenv
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '3.1'
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '3.1'
|
27
54
|
- !ruby/object:Gem::Dependency
|
28
55
|
name: rainbow
|
29
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +65,20 @@ dependencies:
|
|
38
65
|
- - "~>"
|
39
66
|
- !ruby/object:Gem::Version
|
40
67
|
version: '3.0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: selenium-webdriver
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '4.23'
|
75
|
+
type: :runtime
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '4.23'
|
41
82
|
- !ruby/object:Gem::Dependency
|
42
83
|
name: sublayer
|
43
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,6 +109,20 @@ dependencies:
|
|
68
109
|
version: '0.23'
|
69
110
|
- !ruby/object:Gem::Dependency
|
70
111
|
name: rake
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '13.2'
|
117
|
+
type: :development
|
118
|
+
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '13.2'
|
124
|
+
- !ruby/object:Gem::Dependency
|
125
|
+
name: rubocop
|
71
126
|
requirement: !ruby/object:Gem::Requirement
|
72
127
|
requirements:
|
73
128
|
- - ">="
|
@@ -92,12 +147,31 @@ files:
|
|
92
147
|
- LICENSE
|
93
148
|
- README.md
|
94
149
|
- Rakefile
|
150
|
+
- fixtures/react/.eslintrc
|
151
|
+
- fixtures/react/.gitignore
|
152
|
+
- fixtures/react/package-lock.json
|
153
|
+
- fixtures/react/package.json
|
154
|
+
- fixtures/react/public/index.html
|
155
|
+
- fixtures/react/readme.md
|
156
|
+
- fixtures/react/src/index.js
|
157
|
+
- fixtures/react/src/todo/app.css
|
158
|
+
- fixtures/react/src/todo/app.jsx
|
159
|
+
- fixtures/react/src/todo/components/footer.jsx
|
160
|
+
- fixtures/react/src/todo/components/header.jsx
|
161
|
+
- fixtures/react/src/todo/components/input.jsx
|
162
|
+
- fixtures/react/src/todo/components/item.jsx
|
163
|
+
- fixtures/react/src/todo/components/main.jsx
|
164
|
+
- fixtures/react/src/todo/constants.js
|
165
|
+
- fixtures/react/src/todo/reducer.js
|
166
|
+
- fixtures/react/webpack.common.js
|
167
|
+
- fixtures/react/webpack.dev.js
|
168
|
+
- fixtures/react/webpack.prod.js
|
169
|
+
- fixtures/sample.html
|
95
170
|
- fixtures/sample.tsx
|
96
171
|
- lib/a11y_agent/version.rb
|
97
172
|
- lib/agents/a11y_agent.rb
|
98
|
-
- lib/
|
173
|
+
- lib/generators/confirmable_fix_generator.rb
|
99
174
|
- lib/generators/fix_a11y_generator.rb
|
100
|
-
- lib/generators/hydrate_document_generator.rb
|
101
175
|
- lib/tasks/release.rake
|
102
176
|
- package.json
|
103
177
|
- trigger.txt
|
@@ -109,7 +183,6 @@ metadata:
|
|
109
183
|
allowed_push_host: https://rubygems.org
|
110
184
|
homepage_uri: https://github.com/accesslint/a11y-agent
|
111
185
|
source_code_uri: https://github.com/accesslint/a11y-agent
|
112
|
-
post_install_message:
|
113
186
|
rdoc_options: []
|
114
187
|
require_paths:
|
115
188
|
- lib
|
@@ -124,8 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
197
|
- !ruby/object:Gem::Version
|
125
198
|
version: '0'
|
126
199
|
requirements: []
|
127
|
-
rubygems_version: 3.
|
128
|
-
signing_key:
|
200
|
+
rubygems_version: 3.6.2
|
129
201
|
specification_version: 4
|
130
202
|
summary: AI agent that fixes accessibility issues
|
131
203
|
test_files: []
|
data/lib/bin/axe.ts
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
|
3
|
-
import { readFileSync } from "node:fs";
|
4
|
-
import axe from "axe-core"
|
5
|
-
import { JSDOM } from "jsdom";
|
6
|
-
|
7
|
-
const markup = readFileSync(process.argv[2], "utf8");
|
8
|
-
const { window: { document } } = new JSDOM(markup);
|
9
|
-
|
10
|
-
const config = {
|
11
|
-
rules: {
|
12
|
-
'color-contrast': { enabled: false },
|
13
|
-
'region': { enabled: false },
|
14
|
-
}
|
15
|
-
};
|
16
|
-
|
17
|
-
axe.run(document.body, config).then((results) => {
|
18
|
-
console.log(JSON.stringify(results.violations));
|
19
|
-
});
|
@@ -1,27 +0,0 @@
|
|
1
|
-
class HydrateDocumentGenerator < Sublayer::Generators::Base
|
2
|
-
llm_output_adapter type: :single_string,
|
3
|
-
name: 'hydrate_web_document_with_fake_variables',
|
4
|
-
description: 'Given a web document template, generate a new file with fake data interpolated into the template.'
|
5
|
-
|
6
|
-
def initialize(contents:, extension: '')
|
7
|
-
@contents = contents
|
8
|
-
@extension = extension
|
9
|
-
end
|
10
|
-
|
11
|
-
def generate
|
12
|
-
super
|
13
|
-
end
|
14
|
-
|
15
|
-
def prompt
|
16
|
-
<<~PROMPT
|
17
|
-
Given the following #{@extension} template contents, generate a new file by
|
18
|
-
replacing any undefined variables with fake data. Only replace undefined variables,
|
19
|
-
do not generate new markup.
|
20
|
-
|
21
|
-
#{@extension} code:
|
22
|
-
#{@contents}
|
23
|
-
|
24
|
-
Return the contents with the fake data interpolated.
|
25
|
-
PROMPT
|
26
|
-
end
|
27
|
-
end
|