5个版本
0.0.5 | 2024年2月19日 |
---|---|
0.0.4 | 2024年2月19日 |
0.0.3 | 2024年2月19日 |
0.0.2 | 2024年2月19日 |
0.0.1 | 2024年2月18日 |
6 在 可访问性
80 每月下载量
22KB
345 行
kayle_cli
kayle CLI,用于网络可访问性审计。[进行中]
要求
需要Node.js。
安装
如果已安装Rust。
cargo install kayle_cli
# or with node.
npm install kayle_cli
入门
确保您已安装自动化库。使用参数--automation-lib
从默认的puppeteer切换到playwright。
kayle_cli --automation-lib puppeteer install
# configure the audits
kayle_cli --automation-lib puppeteer --standard wcag2aa configure
传入URL列表以获取结果。
The kayle CLI for web accessibility auditing
Usage: kayle_cli [OPTIONS] [ALLOW_IMAGES] [CLIP] [CLIP_DIR] [CLIP_2_BASE64] <COMMAND>
Commands:
upgrade Upgrade kayle and the dependencies required
install Install kayle and the dependencies required
configure Configure the audit to disk to re-use across runs
help Print this message or the help of the given subcommand(s)
Arguments:
[ALLOW_IMAGES]
Allow images to render, useful when setting clip option for bounding box
[possible values: true, false]
[CLIP]
Get the bounding box of an element
[possible values: true, false]
[CLIP_DIR]
The directory to store clip images
[CLIP_2_BASE64]
Convert the clip to a base64 image
[possible values: true, false]
Options:
-s, --standard <STANDARD>
The accessibility standard to run
Possible values:
- wcag2a: WCAG2A
- wcag2aa: WCAG2AA
- wcag2aaa: WCAG2AAA
- section508: Section508
--include-warnings <INCLUDE_WARNINGS>
Include warnings in the audit
[possible values: true, false]
--include-notices <INCLUDE_NOTICES>
Include notices in the audit
[possible values: true, false]
-r, --runners <RUNNERS>
The accessibility runner to use htmlcs, axecore, or kayle
Possible values:
- kayle: Kayle
- htmlcs: htmlcs
- axe: axe
-w, --wait-for <WAIT_FOR>
WaitFor event for content to exist
Possible values:
- load: Waits till the window load event
- domcontent-loaded: The dom loaded content first
- commit: Wait for the commit event. Playwright only
- network-idle: Waits till there are no more network connections for at least 500 ms. Playwright only
- network-idle1: Waits till there are no more network connections for at least 500 ms. Puppeteer only
- network-idle2: Waits till there are no more than 2 network connections for at least 500 ms. Puppeteer only
--automation-lib <AUTOMATION_LIB>
The automation lib to use either puppeteer or playwright
Possible values:
- puppeteer: The puppeteer library. Defaults to this
- playwright: The playwright library by microsoft
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
kayle_cli https://www.drake.com
{"documentTitle":"Drake Industries | Custom, Durable, High-Quality Labels, Asset Tags and Custom Server Bezels","pageUrl":"https://www.drake.com/","issues":[{"context":"<h5 class=\"normal\">\n<div class=\"span12 widget-span ...</h5>","selector":"body>:nth-child(2)>:nth-child(1)>:nth-child(2)>:nth-child(1)>:nth-child(1)>:nth-child(2)>:nth-child(1)>:nth-child(1)>:nth-child(2)>:nth-child(1)>:nth-child(1)","code":"WCAG2AA.Principle1.Guideline1_3.1_3_1_A.G141","type":"error","typeCode":1,"message":"The heading structure is not logically nested. This h5 element should be an h2 to be properly nested.","runner":"htmlcs","recurrence":0},{"context":"<h5>Labels</h5>","selector":"#hs_cos_wrapper_module_1569856007055222>:nth-child(1)>:nth-child(2)>:nth-child(1)","code":"WCAG2AA.Principle1.Guideline1_3.1_3_1_A.G141","type":"error","typeCode":1,"message":"The heading structure is not logically nested. This h5 element should be an h3 to be properly nested.","runner":"htmlcs","recurrence":0},{"context":"<a href=\"https://www.drake.com/labels?hsLang=en\">Learn more</a>","selector":"#hs_cos_wrapper_module_1569856007055222>:nth-child(1)>:nth-child(3)>:nth-child(1)","code":"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail","type":"error","typeCode":1,"message":"This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.44:1. Recommendation: change text colour to #00171d.","runner":"htmlcs","recurrence":0},{"context":"<a href=\"https://www.drake.com/name-plates?hsLang=en\">Learn more</a>","selector":"#hs_cos_wrapper_module_1569856034269224>:nth-child(1)>:nth-child(3)>:nth-child(1)","code":"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail","type":"error","typeCode":1,"message":"This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.44:1. Recommendation: change text colour to #00171d.","runner":"htmlcs","recurrence":0},{"context":"<a href=\"https://www.drake.com/equipment-panel-overlays?hsLang=en\">Learn more</a>","selector":"#hs_cos_wrapper_module_1569856037305225>:nth-child(1)>:nth-child(3)>:nth-child(1)","code":"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail","type":"error","typeCode":1,"message":"This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.44:1. Recommendation: change text colour to #00171d.","runner":"htmlcs","recurrence":0},{"context":"<a href=\"https://www.drake.com/membrane-switches?hsLang=en\">Learn more</a>","selector":"#hs_cos_wrapper_module_1569856084644237>:nth-child(1)>:nth-child(3)>:nth-child(1)","code":"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail","type":"error","typeCode":1,"message":"This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.44:1. Recommendation: change text colour to #00171d.","runner":"htmlcs","recurrence":0},{"context":"<a href=\"https://www.drake.com/oem-bezel-re-branding?hsLang=en\">Learn more</a>","selector":"#hs_cos_wrapper_module_1569856082608235>:nth-child(1)>:nth-child(3)>:nth-child(1)","code":"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail","type":"error","typeCode":1,"message":"This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.44:1. Recommendation: change text colour to #00171d.","runner":"htmlcs","recurrence":0},{"context":"<a href=\"https://www.drake.com/safety?hsLang=en\">Learn more</a>","selector":"#hs_cos_wrapper_module_1569856080132233>:nth-child(1)>:nth-child(3)>:nth-child(1)","code":"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail","type":"error","typeCode":1,"message":"This element has insufficient contrast at this conformance level. Expected a contrast ratio of at least 4.5:1, but text in this element has a contrast ratio of 3.44:1. Recommendation: change text colour to #00171d.","runner":"htmlcs","recurrence":0},{"context":"<a class=\"expandMenu\"><i></i><i></i><i></i></a>","selector":"#hs_cos_wrapper_module_14725592865174>:nth-child(1)","code":"WCAG2AA.Principle4.Guideline4_1.4_1_2.H91.A.EmptyNoId","type":"error","typeCode":1,"message":"Anchor element found with no link content and no name and/or ID attribute.","runner":"htmlcs","recurrence":0}],"meta":{"errorCount":9,"warningCount":0,"noticeCount":0,"accessScore":100},"automateable":{"missingAltIndexs":[]}}%
依赖项
~1.6–2.7MB
~51K SLoC