a11y-test-mcp 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/functions.js +2 -2
- package/build/index.js +6 -1
- package/package.json +14 -17
package/build/functions.js
CHANGED
|
@@ -32,9 +32,9 @@ const convertWcagTag = (tags) => {
|
|
|
32
32
|
* @returns {string} A formatted string representing the violation, suitable for display in reports or logs.
|
|
33
33
|
*/
|
|
34
34
|
const formatViolation = (v) => {
|
|
35
|
-
const violationHeader = ` - [${
|
|
35
|
+
const violationHeader = ` - [${v.impact?.toUpperCase() ?? 'N/A'}] ${v.id}: ${v.description} (Nodes: ${v.nodes.length.toString()}, Help: ${v.helpUrl})`;
|
|
36
36
|
const violationNodes = v.nodes
|
|
37
|
-
.map((node, index) => ` Node ${
|
|
37
|
+
.map((node, index) => ` Node ${(index + 1).toString()}: ${node.html}`)
|
|
38
38
|
.join('\n');
|
|
39
39
|
return `${violationHeader}\n${violationNodes}`;
|
|
40
40
|
};
|
package/build/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
@@ -9,7 +10,11 @@ const server = new mcp_js_1.McpServer({
|
|
|
9
10
|
name: 'accessibility-tester',
|
|
10
11
|
version: '0.1.1',
|
|
11
12
|
});
|
|
12
|
-
server.
|
|
13
|
+
server.registerTool('exec-a11y-test', {
|
|
14
|
+
title: 'Execute Accessibility Test',
|
|
15
|
+
description: 'Obtains a list of specified list of URL and a list of WCAG indicators and returns the results',
|
|
16
|
+
inputSchema: { urls: zod_1.z.array(zod_1.z.string().url()), wcagStandards: zod_1.z.array(zod_1.z.string()).optional() },
|
|
17
|
+
}, async ({ urls, wcagStandards }) => {
|
|
13
18
|
const structuredResults = await (0, functions_1.execTest)(urls, wcagStandards);
|
|
14
19
|
return {
|
|
15
20
|
content: [{
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "a11y-test-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "npx -y playwright install",
|
|
7
|
-
"build": "
|
|
7
|
+
"build": "tsc && chmod 755 build/index.js",
|
|
8
|
+
"build:tsgo": "tsgo && chmod 755 build/index.js",
|
|
8
9
|
"start": "node build/index.js",
|
|
9
10
|
"lint": "npm run lint:e && npm run lint:d",
|
|
10
11
|
"lint:e": "eslint .",
|
|
@@ -37,23 +38,19 @@
|
|
|
37
38
|
"description": "",
|
|
38
39
|
"homepage": "https://github.com/noriyuki-shimizu/a11y-test-mcp/blob/main/README.md",
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"@axe-core/playwright": "^4.
|
|
41
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
42
|
-
"playwright": "^1.
|
|
43
|
-
"zod": "^3.
|
|
41
|
+
"@axe-core/playwright": "^4.11.0",
|
|
42
|
+
"@modelcontextprotocol/sdk": "^1.21.1",
|
|
43
|
+
"playwright": "^1.56.1",
|
|
44
|
+
"zod": "^3.25.76"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
|
-
"@eslint/js": "^9.
|
|
47
|
-
"@types/node": "^22.
|
|
48
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
49
|
-
"dprint": "^0.
|
|
50
|
-
"eslint": "^9.
|
|
47
|
+
"@eslint/js": "^9.39.1",
|
|
48
|
+
"@types/node": "^22.19.0",
|
|
49
|
+
"@typescript/native-preview": "^7.0.0-dev.20251108.1",
|
|
50
|
+
"dprint": "^0.50.2",
|
|
51
|
+
"eslint": "^9.39.1",
|
|
51
52
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
52
|
-
"typescript": "^5.
|
|
53
|
-
"typescript-eslint": "^8.
|
|
54
|
-
},
|
|
55
|
-
"volta": {
|
|
56
|
-
"node": "22.15.0",
|
|
57
|
-
"npm": "10.9.2"
|
|
53
|
+
"typescript": "^5.9.3",
|
|
54
|
+
"typescript-eslint": "^8.46.3"
|
|
58
55
|
}
|
|
59
56
|
}
|