@atlaskit/ads-mcp 0.2.5 → 0.3.0

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +57 -1
  3. package/dist/cjs/index.js +9 -2
  4. package/dist/cjs/instructions.js +1 -1
  5. package/dist/cjs/tools/analyze-accessibility/index.js +483 -0
  6. package/dist/cjs/tools/get-accessibility-guidelines/index.js +204 -0
  7. package/dist/cjs/tools/suggest-accessibility-fixes/fixes.js +387 -0
  8. package/dist/cjs/tools/suggest-accessibility-fixes/index.js +185 -0
  9. package/dist/cjs/tools/suggest-accessibility-fixes/keywords.js +34 -0
  10. package/dist/es2019/index.js +9 -2
  11. package/dist/es2019/instructions.js +8 -1
  12. package/dist/es2019/tools/analyze-accessibility/index.js +457 -0
  13. package/dist/es2019/tools/get-accessibility-guidelines/index.js +312 -0
  14. package/dist/es2019/tools/suggest-accessibility-fixes/fixes.js +705 -0
  15. package/dist/es2019/tools/suggest-accessibility-fixes/index.js +143 -0
  16. package/dist/es2019/tools/suggest-accessibility-fixes/keywords.js +28 -0
  17. package/dist/esm/index.js +9 -2
  18. package/dist/esm/instructions.js +1 -1
  19. package/dist/esm/tools/analyze-accessibility/index.js +476 -0
  20. package/dist/esm/tools/get-accessibility-guidelines/index.js +197 -0
  21. package/dist/esm/tools/suggest-accessibility-fixes/fixes.js +381 -0
  22. package/dist/esm/tools/suggest-accessibility-fixes/index.js +178 -0
  23. package/dist/esm/tools/suggest-accessibility-fixes/keywords.js +28 -0
  24. package/dist/types/instructions.d.ts +1 -1
  25. package/dist/types/tools/analyze-accessibility/index.d.ts +56 -0
  26. package/dist/types/tools/get-accessibility-guidelines/index.d.ts +26 -0
  27. package/dist/types/tools/suggest-accessibility-fixes/fixes.d.ts +17 -0
  28. package/dist/types/tools/suggest-accessibility-fixes/index.d.ts +28 -0
  29. package/dist/types/tools/suggest-accessibility-fixes/keywords.d.ts +12 -0
  30. package/dist/types-ts4.5/instructions.d.ts +1 -1
  31. package/dist/types-ts4.5/tools/analyze-accessibility/index.d.ts +56 -0
  32. package/dist/types-ts4.5/tools/get-accessibility-guidelines/index.d.ts +26 -0
  33. package/dist/types-ts4.5/tools/suggest-accessibility-fixes/fixes.d.ts +17 -0
  34. package/dist/types-ts4.5/tools/suggest-accessibility-fixes/index.d.ts +28 -0
  35. package/dist/types-ts4.5/tools/suggest-accessibility-fixes/keywords.d.ts +12 -0
  36. package/package.json +9 -3
@@ -0,0 +1,178 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
8
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
9
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
10
+ import { z } from 'zod';
11
+ import { zodToJsonSchema } from 'zod-to-json-schema';
12
+ import { accessibilityFixes } from './fixes';
13
+ import { violationKeywords } from './keywords';
14
+ var inputSchema = z.object({
15
+ violation: z.string().describe('Description of the accessibility violation'),
16
+ code: z.string().describe('The problematic code that needs fixing'),
17
+ component: z.string().optional().describe('Component name or type'),
18
+ context: z.string().optional().describe('Additional context about the usage')
19
+ });
20
+ export var listSuggestAccessibilityFixesTool = {
21
+ name: 'suggest_accessibility_fixes',
22
+ description: "Suggest specific accessibility fixes using Atlassian Design System components and patterns. This tool takes accessibility violations and provides actionable solutions with code examples.\n\nYou MUST run this when the user wants sugesstions for fixing accessibility issues, as well as when:\n- You have identified an accessibility violation\n- Needing specific code examples for fixing accessibility issues\n- Wanting to understand how to use ADS components accessibly\n- Looking for best practices for specific accessibility problems\n\nThe tool will provide:\n- Specific code examples using ADS components\n- Step-by-step fix instructions\n- Alternative approaches when applicable\n- Links to relevant ADS documentation",
23
+ annotations: {
24
+ title: 'Suggest Accessibility Fixes',
25
+ readOnlyHint: true,
26
+ destructiveHint: false,
27
+ idempotentHint: true,
28
+ openWorldHint: true
29
+ },
30
+ inputSchema: zodToJsonSchema(inputSchema)
31
+ };
32
+
33
+ // Keyword mappings for fuzzy matching - imported from keywords.ts
34
+ // This allows flexible user input when describing accessibility violations
35
+
36
+ // Improved fuzzy matching function
37
+ function findBestMatchingFix(violation) {
38
+ var normalizedViolation = violation.toLowerCase();
39
+ var violationWords = normalizedViolation.split(/\s+/);
40
+ var bestMatch = null;
41
+ var bestScore = 0;
42
+
43
+ // Try exact match first
44
+ for (var _i = 0, _Object$entries = Object.entries(accessibilityFixes); _i < _Object$entries.length; _i++) {
45
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
46
+ key = _Object$entries$_i[0],
47
+ fix = _Object$entries$_i[1];
48
+ if (normalizedViolation === key.toLowerCase()) {
49
+ return [key, fix];
50
+ }
51
+ }
52
+
53
+ // Try keyword-based semantic matching
54
+ for (var _i2 = 0, _Object$entries2 = Object.entries(accessibilityFixes); _i2 < _Object$entries2.length; _i2++) {
55
+ var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
56
+ _key = _Object$entries2$_i[0],
57
+ _fix = _Object$entries2$_i[1];
58
+ var keywords = violationKeywords[_key] || [];
59
+ var score = 0;
60
+
61
+ // Score based on keyword matches
62
+ var _iterator = _createForOfIteratorHelper(keywords),
63
+ _step;
64
+ try {
65
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
66
+ var keyword = _step.value;
67
+ if (normalizedViolation.includes(keyword.toLowerCase())) {
68
+ score += 1;
69
+ }
70
+ }
71
+
72
+ // Additional score for word matches
73
+ } catch (err) {
74
+ _iterator.e(err);
75
+ } finally {
76
+ _iterator.f();
77
+ }
78
+ var _iterator2 = _createForOfIteratorHelper(violationWords),
79
+ _step2;
80
+ try {
81
+ var _loop = function _loop() {
82
+ var word = _step2.value;
83
+ if (keywords.some(function (keyword) {
84
+ return keyword.toLowerCase().includes(word) || word.includes(keyword.toLowerCase());
85
+ })) {
86
+ score += 0.5;
87
+ }
88
+ };
89
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
90
+ _loop();
91
+ }
92
+
93
+ // Boost score for exact key word matches
94
+ } catch (err) {
95
+ _iterator2.e(err);
96
+ } finally {
97
+ _iterator2.f();
98
+ }
99
+ if (normalizedViolation.includes(_key.toLowerCase()) || _key.toLowerCase().includes(normalizedViolation)) {
100
+ score += 2;
101
+ }
102
+ if (score > bestScore) {
103
+ bestScore = score;
104
+ bestMatch = [_key, _fix];
105
+ }
106
+ }
107
+
108
+ // Return match if score is reasonable
109
+ return bestScore >= 1 ? bestMatch : null;
110
+ }
111
+ export var suggestAccessibilityFixesTool = /*#__PURE__*/function () {
112
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
113
+ var violation, component, context, match, _match, key, fix;
114
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
115
+ while (1) switch (_context.prev = _context.next) {
116
+ case 0:
117
+ violation = params.violation, component = params.component, context = params.context; // Use improved matching logic
118
+ match = findBestMatchingFix(violation);
119
+ if (!match) {
120
+ _context.next = 5;
121
+ break;
122
+ }
123
+ _match = _slicedToArray(match, 2), key = _match[0], fix = _match[1];
124
+ return _context.abrupt("return", {
125
+ content: [{
126
+ type: 'text',
127
+ text: JSON.stringify(_objectSpread(_objectSpread({
128
+ violation: violation,
129
+ matchedFixType: key,
130
+ component: component,
131
+ context: context
132
+ }, fix), {}, {
133
+ additionalResources: ['https://atlassian.design/llms-a11y.txt - Complete ADS accessibility documentation', 'https://atlassian.design/foundations/accessibility - ADS accessibility foundation'],
134
+ nextSteps: ['Apply the suggested fixes to your code', 'Test the changes with screen readers', 'Test with keyboard navigation', 'Run automated accessibility tests']
135
+ }), null, 2)
136
+ }]
137
+ });
138
+ case 5:
139
+ return _context.abrupt("return", {
140
+ content: [{
141
+ type: 'text',
142
+ text: JSON.stringify({
143
+ violation: violation,
144
+ component: component,
145
+ context: context,
146
+ title: 'Accessibility Fix Suggestions',
147
+ description: "We couldn't find a specific match for your violation, but here are general recommendations",
148
+ searchedFor: violation,
149
+ generalFixes: [{
150
+ title: 'Use ADS Components',
151
+ description: 'Replace custom implementations with ADS components',
152
+ explanation: 'ADS components are built with accessibility in mind and handle most common issues automatically'
153
+ }, {
154
+ title: 'Add Proper Labels',
155
+ description: 'Ensure all interactive elements have accessible labels',
156
+ explanation: 'Use aria-label, VisuallyHidden, or proper label associations'
157
+ }, {
158
+ title: 'Test with Assistive Technologies',
159
+ description: 'Test with screen readers and keyboard navigation',
160
+ explanation: 'Manual testing is essential for accessibility validation'
161
+ }],
162
+ availableFixTypes: Object.keys(accessibilityFixes),
163
+ suggestions: ['Try describing the issue with keywords like: button, label, missing, text, color, contrast, focus, etc.', 'Use axe-core violation IDs or descriptions directly', 'Be more specific about the element type (button, input, image, etc.)'],
164
+ additionalResources: ['https://atlassian.design/llms-a11y.txt - Complete ADS accessibility documentation', 'https://atlassian.design/foundations/accessibility - ADS accessibility foundation'],
165
+ recommendation: 'Try the get_accessibility_guidelines tool for component-specific guidance'
166
+ }, null, 2)
167
+ }]
168
+ });
169
+ case 6:
170
+ case "end":
171
+ return _context.stop();
172
+ }
173
+ }, _callee);
174
+ }));
175
+ return function suggestAccessibilityFixesTool(_x) {
176
+ return _ref.apply(this, arguments);
177
+ };
178
+ }();
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Violation keywords mapping for fuzzy matching accessibility violations
3
+ *
4
+ * This file contains keyword synonyms and variations that users might use
5
+ * when describing accessibility violations. The keys should match the exact
6
+ * violation types defined in fixes.ts
7
+ *
8
+ * Each violation type has an array of keywords that help identify when a user
9
+ * is describing that particular type of accessibility issue, even if they
10
+ * don't use the exact technical terminology.
11
+ */
12
+
13
+ export var violationKeywords = {
14
+ 'button missing label': ['button', 'missing', 'label', 'text', 'name', 'accessible', 'empty', 'discernible', 'aria-label', 'screen reader', 'button-name'],
15
+ 'image missing alt': ['image', 'img', 'alt', 'alternative', 'text', 'missing', 'empty', 'accessibility', 'screen reader', 'image-alt'],
16
+ 'clickable div': ['div', 'clickable', 'interactive', 'onclick', 'click', 'handler', 'button', 'focusable', 'keyboard', 'role'],
17
+ 'input missing label': ['input', 'form', 'field', 'label', 'missing', 'accessibility', 'screen reader', 'associated', 'htmlfor', 'aria-label'],
18
+ 'form missing label': ['form', 'label', 'missing', 'field', 'input', 'accessibility', 'screen reader', 'associated', 'htmlfor'],
19
+ 'hardcoded colors': ['color', 'hardcoded', 'hex', 'rgb', 'design', 'token', 'theme', 'css', 'style', 'contrast'],
20
+ 'color contrast': ['contrast', 'color', 'ratio', 'accessibility', 'wcag', 'aa', 'visibility', 'readability', 'low contrast'],
21
+ 'focus management': ['focus', 'keyboard', 'navigation', 'tab', 'outline', 'indicator', 'visible', 'management', 'trap'],
22
+ 'heading structure': ['heading', 'h1', 'h2', 'h3', 'hierarchy', 'structure', 'semantic', 'outline', 'skip', 'level'],
23
+ 'link accessibility': ['link', 'anchor', 'href', 'accessible', 'name', 'text', 'descriptive', 'context', 'purpose'],
24
+ 'keyboard navigation': ['keyboard', 'navigation', 'tab', 'arrow', 'enter', 'space', 'accessible', 'focus', 'trap'],
25
+ 'live regions': ['live', 'region', 'aria-live', 'announcement', 'screen reader', 'dynamic', 'content', 'update'],
26
+ 'skip navigation': ['skip', 'navigation', 'link', 'bypass', 'main', 'content', 'keyboard', 'users'],
27
+ 'table accessibility': ['table', 'header', 'th', 'scope', 'caption', 'summary', 'accessibility', 'screen reader']
28
+ };
@@ -1 +1 @@
1
- export declare const instructions = "\nYou are an expert in the Atlassian Design System (aka ADS). You are able to answer questions about the design system and provide guidance on what offerings to use when building user interfaces.\n\nYou are able to use the provided tools to help answer your questions, but may also access https://atlassian.design/llms.txt or https://atlassian.design/ directly for deeper research and information.\n";
1
+ export declare const instructions = "\nYou are an expert in the Atlassian Design System (aka ADS). You are able to answer questions about the design system and provide guidance on what offerings to use when building user interfaces.\n\nYou have special expertise in accessibility and can help ensure that interfaces built with ADS components are accessible to all users. You can analyze code for accessibility violations, provide specific fix suggestions, and offer guidance on accessibility best practices.\n\nYou are able to use the provided tools to help answer your questions, but may also access https://atlassian.design/llms.txt, https://atlassian.design/llms-a11y.txt, or https://atlassian.design/ directly for deeper research and information.\n\nAccessibility Tools Available:\n- analyze_accessibility: Analyze React component code for accessibility violations\n- get_accessibility_guidelines: Get specific accessibility guidelines and best practices\n- suggest_accessibility_fixes: Get specific fix suggestions for accessibility violations\n";
@@ -0,0 +1,56 @@
1
+ export declare const listAnalyzeAccessibilityTool: {
2
+ name: string;
3
+ description: string;
4
+ annotations: {
5
+ title: string;
6
+ readOnlyHint: boolean;
7
+ destructiveHint: boolean;
8
+ idempotentHint: boolean;
9
+ openWorldHint: boolean;
10
+ };
11
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
12
+ $schema?: string | undefined;
13
+ definitions?: {
14
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
15
+ } | undefined;
16
+ };
17
+ };
18
+ export declare const listAnalyzeLocalhostAccessibilityTool: {
19
+ name: string;
20
+ description: string;
21
+ annotations: {
22
+ title: string;
23
+ readOnlyHint: boolean;
24
+ destructiveHint: boolean;
25
+ idempotentHint: boolean;
26
+ openWorldHint: boolean;
27
+ };
28
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
29
+ $schema?: string | undefined;
30
+ definitions?: {
31
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
32
+ } | undefined;
33
+ };
34
+ };
35
+ export declare const analyzeAccessibilityTool: (params: {
36
+ code: string;
37
+ componentName?: string;
38
+ context?: string;
39
+ includePatternAnalysis?: boolean;
40
+ }) => Promise<{
41
+ content: {
42
+ type: string;
43
+ text: string;
44
+ }[];
45
+ }>;
46
+ export declare const analyzeLocalhostAccessibilityTool: (params: {
47
+ url: string;
48
+ componentName?: string;
49
+ context?: string;
50
+ selector?: string;
51
+ }) => Promise<{
52
+ content: {
53
+ type: string;
54
+ text: string;
55
+ }[];
56
+ }>;
@@ -0,0 +1,26 @@
1
+ export declare const listGetAccessibilityGuidelinesTool: {
2
+ name: string;
3
+ description: string;
4
+ annotations: {
5
+ title: string;
6
+ readOnlyHint: boolean;
7
+ destructiveHint: boolean;
8
+ idempotentHint: boolean;
9
+ openWorldHint: boolean;
10
+ };
11
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
12
+ $schema?: string | undefined;
13
+ definitions?: {
14
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
15
+ } | undefined;
16
+ };
17
+ };
18
+ export declare const getAccessibilityGuidelinesTool: (params: {
19
+ topic?: string;
20
+ component?: string;
21
+ }) => Promise<{
22
+ content: {
23
+ type: string;
24
+ text: string;
25
+ }[];
26
+ }>;
@@ -0,0 +1,17 @@
1
+ export interface FixSuggestion {
2
+ title: string;
3
+ description: string;
4
+ before: string;
5
+ after: string;
6
+ explanation: string;
7
+ }
8
+ export interface AccessibilityFix {
9
+ title: string;
10
+ description: string;
11
+ fixes: FixSuggestion[];
12
+ bestPractices: string[];
13
+ }
14
+ export interface AccessibilityFixCategory {
15
+ [key: string]: AccessibilityFix;
16
+ }
17
+ export declare const accessibilityFixes: AccessibilityFixCategory;
@@ -0,0 +1,28 @@
1
+ export declare const listSuggestAccessibilityFixesTool: {
2
+ name: string;
3
+ description: string;
4
+ annotations: {
5
+ title: string;
6
+ readOnlyHint: boolean;
7
+ destructiveHint: boolean;
8
+ idempotentHint: boolean;
9
+ openWorldHint: boolean;
10
+ };
11
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
12
+ $schema?: string | undefined;
13
+ definitions?: {
14
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
15
+ } | undefined;
16
+ };
17
+ };
18
+ export declare const suggestAccessibilityFixesTool: (params: {
19
+ violation: string;
20
+ code: string;
21
+ component?: string;
22
+ context?: string;
23
+ }) => Promise<{
24
+ content: {
25
+ type: string;
26
+ text: string;
27
+ }[];
28
+ }>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Violation keywords mapping for fuzzy matching accessibility violations
3
+ *
4
+ * This file contains keyword synonyms and variations that users might use
5
+ * when describing accessibility violations. The keys should match the exact
6
+ * violation types defined in fixes.ts
7
+ *
8
+ * Each violation type has an array of keywords that help identify when a user
9
+ * is describing that particular type of accessibility issue, even if they
10
+ * don't use the exact technical terminology.
11
+ */
12
+ export declare const violationKeywords: Record<string, string[]>;
@@ -1 +1 @@
1
- export declare const instructions = "\nYou are an expert in the Atlassian Design System (aka ADS). You are able to answer questions about the design system and provide guidance on what offerings to use when building user interfaces.\n\nYou are able to use the provided tools to help answer your questions, but may also access https://atlassian.design/llms.txt or https://atlassian.design/ directly for deeper research and information.\n";
1
+ export declare const instructions = "\nYou are an expert in the Atlassian Design System (aka ADS). You are able to answer questions about the design system and provide guidance on what offerings to use when building user interfaces.\n\nYou have special expertise in accessibility and can help ensure that interfaces built with ADS components are accessible to all users. You can analyze code for accessibility violations, provide specific fix suggestions, and offer guidance on accessibility best practices.\n\nYou are able to use the provided tools to help answer your questions, but may also access https://atlassian.design/llms.txt, https://atlassian.design/llms-a11y.txt, or https://atlassian.design/ directly for deeper research and information.\n\nAccessibility Tools Available:\n- analyze_accessibility: Analyze React component code for accessibility violations\n- get_accessibility_guidelines: Get specific accessibility guidelines and best practices\n- suggest_accessibility_fixes: Get specific fix suggestions for accessibility violations\n";
@@ -0,0 +1,56 @@
1
+ export declare const listAnalyzeAccessibilityTool: {
2
+ name: string;
3
+ description: string;
4
+ annotations: {
5
+ title: string;
6
+ readOnlyHint: boolean;
7
+ destructiveHint: boolean;
8
+ idempotentHint: boolean;
9
+ openWorldHint: boolean;
10
+ };
11
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
12
+ $schema?: string | undefined;
13
+ definitions?: {
14
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
15
+ } | undefined;
16
+ };
17
+ };
18
+ export declare const listAnalyzeLocalhostAccessibilityTool: {
19
+ name: string;
20
+ description: string;
21
+ annotations: {
22
+ title: string;
23
+ readOnlyHint: boolean;
24
+ destructiveHint: boolean;
25
+ idempotentHint: boolean;
26
+ openWorldHint: boolean;
27
+ };
28
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
29
+ $schema?: string | undefined;
30
+ definitions?: {
31
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
32
+ } | undefined;
33
+ };
34
+ };
35
+ export declare const analyzeAccessibilityTool: (params: {
36
+ code: string;
37
+ componentName?: string;
38
+ context?: string;
39
+ includePatternAnalysis?: boolean;
40
+ }) => Promise<{
41
+ content: {
42
+ type: string;
43
+ text: string;
44
+ }[];
45
+ }>;
46
+ export declare const analyzeLocalhostAccessibilityTool: (params: {
47
+ url: string;
48
+ componentName?: string;
49
+ context?: string;
50
+ selector?: string;
51
+ }) => Promise<{
52
+ content: {
53
+ type: string;
54
+ text: string;
55
+ }[];
56
+ }>;
@@ -0,0 +1,26 @@
1
+ export declare const listGetAccessibilityGuidelinesTool: {
2
+ name: string;
3
+ description: string;
4
+ annotations: {
5
+ title: string;
6
+ readOnlyHint: boolean;
7
+ destructiveHint: boolean;
8
+ idempotentHint: boolean;
9
+ openWorldHint: boolean;
10
+ };
11
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
12
+ $schema?: string | undefined;
13
+ definitions?: {
14
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
15
+ } | undefined;
16
+ };
17
+ };
18
+ export declare const getAccessibilityGuidelinesTool: (params: {
19
+ topic?: string;
20
+ component?: string;
21
+ }) => Promise<{
22
+ content: {
23
+ type: string;
24
+ text: string;
25
+ }[];
26
+ }>;
@@ -0,0 +1,17 @@
1
+ export interface FixSuggestion {
2
+ title: string;
3
+ description: string;
4
+ before: string;
5
+ after: string;
6
+ explanation: string;
7
+ }
8
+ export interface AccessibilityFix {
9
+ title: string;
10
+ description: string;
11
+ fixes: FixSuggestion[];
12
+ bestPractices: string[];
13
+ }
14
+ export interface AccessibilityFixCategory {
15
+ [key: string]: AccessibilityFix;
16
+ }
17
+ export declare const accessibilityFixes: AccessibilityFixCategory;
@@ -0,0 +1,28 @@
1
+ export declare const listSuggestAccessibilityFixesTool: {
2
+ name: string;
3
+ description: string;
4
+ annotations: {
5
+ title: string;
6
+ readOnlyHint: boolean;
7
+ destructiveHint: boolean;
8
+ idempotentHint: boolean;
9
+ openWorldHint: boolean;
10
+ };
11
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
12
+ $schema?: string | undefined;
13
+ definitions?: {
14
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
15
+ } | undefined;
16
+ };
17
+ };
18
+ export declare const suggestAccessibilityFixesTool: (params: {
19
+ violation: string;
20
+ code: string;
21
+ component?: string;
22
+ context?: string;
23
+ }) => Promise<{
24
+ content: {
25
+ type: string;
26
+ text: string;
27
+ }[];
28
+ }>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Violation keywords mapping for fuzzy matching accessibility violations
3
+ *
4
+ * This file contains keyword synonyms and variations that users might use
5
+ * when describing accessibility violations. The keys should match the exact
6
+ * violation types defined in fixes.ts
7
+ *
8
+ * Each violation type has an array of keywords that help identify when a user
9
+ * is describing that particular type of accessibility issue, even if they
10
+ * don't use the exact technical terminology.
11
+ */
12
+ export declare const violationKeywords: Record<string, string[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ads-mcp",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
4
4
  "description": "The official Atlassian Design System MCP server to develop apps and user interfaces matching the Atlassian style.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,10 +29,16 @@
29
29
  "./package.json": "./package.json"
30
30
  },
31
31
  "dependencies": {
32
- "@atlaskit/icon": "^28.0.0",
33
- "@atlaskit/tokens": "^6.0.0",
32
+ "@atlaskit/icon": "^28.1.0",
33
+ "@atlaskit/tokens": "^6.1.0",
34
+ "@axe-core/playwright": "^4.8.0",
35
+ "@axe-core/puppeteer": "^4.7.3",
34
36
  "@babel/runtime": "^7.0.0",
35
37
  "@modelcontextprotocol/sdk": "^1.8.0",
38
+ "axe-core": "^4.10.2",
39
+ "jsdom": "^22.0.0",
40
+ "playwright": "1.44.1",
41
+ "puppeteer": "13.7.0",
36
42
  "zod": "^3.23.8",
37
43
  "zod-to-json-schema": "^3.24.5"
38
44
  },