@yuktishaalaa/yuktai 2.0.14 → 2.0.17
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/README.md +2 -4
- package/dist/{index.d.cts → index.d.mts} +33 -2
- package/dist/index.d.ts +33 -2
- package/dist/index.js +288 -185
- package/dist/index.mjs +390 -0
- package/dist/renderer.global.js +282 -162
- package/package.json +76 -42
- package/dist/index.cjs +0 -287
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @yuktishaalaa/yuktai
|
|
2
2
|
|
|
3
|
-
> Universal runtime accessibility plugin — automatically fixes WCAG 2.2 violations on every page, for every user, with zero configuration.
|
|
3
|
+
> Universal runtime accessibility plugin — automatically fixes WCAG 2.2 violations on every page, for every user, with zero configuration.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@yuktishaalaa/yuktai)
|
|
6
6
|
[](https://www.npmjs.com/package/@yuktishaalaa/yuktai)
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
## What's new in v2.0.0
|
|
13
13
|
|
|
14
|
-
- ✅ No JAWS needed — works with NVDA, VoiceOver, TalkBack, Narrator
|
|
15
14
|
- ✅ Built-in SpeechSynthesis — browser speaks on focus, zero install
|
|
16
15
|
- ✅ Visual alerts — sliding banner for deaf users, no audio needed
|
|
17
16
|
- ✅ Keyboard navigation — arrow keys, Escape, focus trap, no AT needed
|
|
@@ -459,7 +458,7 @@ After clicking **Apply settings**, the panel shows:
|
|
|
459
458
|
✓ 0 fixes needed · 534 nodes clean · 0.8ms · Score: 100/100
|
|
460
459
|
```
|
|
461
460
|
|
|
462
|
-
|
|
461
|
+
> **Note:** A score of 100/100 means yuktai found no issues it could automatically detect and fix. Automated scanning covers a significant portion of WCAG criteria but cannot substitute for manual testing and real user feedback. We recommend combining yuktai with periodic manual audits for comprehensive accessibility coverage.
|
|
463
462
|
|
|
464
463
|
---
|
|
465
464
|
|
|
@@ -468,7 +467,6 @@ After clicking **Apply settings**, the panel shows:
|
|
|
468
467
|
- **Zero id attributes** — no injected node ever gets an `id`. All injected nodes tracked via module-level JavaScript references. Never collides with host app ids.
|
|
469
468
|
- **Zero API keys** — runs entirely in the browser. No external calls, no telemetry, no cost.
|
|
470
469
|
- **Zero framework lock-in** — `core/renderer.ts` has no framework imports. Works in Node.js, browsers, and test environments.
|
|
471
|
-
- **Zero JAWS dependency** — uses standard browser APIs. Works with NVDA, VoiceOver, TalkBack, Narrator — all free.
|
|
472
470
|
- **One engine, many adapters** — all adapters import from `core/renderer.ts`. WCAG logic written once.
|
|
473
471
|
|
|
474
472
|
---
|
|
@@ -38,6 +38,13 @@ interface A11yConfig {
|
|
|
38
38
|
showSkipLinks?: boolean;
|
|
39
39
|
largeTargets?: boolean;
|
|
40
40
|
timeoutWarning?: number;
|
|
41
|
+
dyslexiaFont?: boolean;
|
|
42
|
+
localFont?: string;
|
|
43
|
+
plainEnglish?: boolean;
|
|
44
|
+
summarisePage?: boolean;
|
|
45
|
+
translateLanguage?: string;
|
|
46
|
+
voiceControl?: boolean;
|
|
47
|
+
smartLabels?: boolean;
|
|
41
48
|
}
|
|
42
49
|
interface A11yFix {
|
|
43
50
|
tag: string;
|
|
@@ -56,6 +63,11 @@ declare function speak(text: string, priority?: "polite" | "assertive"): void;
|
|
|
56
63
|
declare function showVisualAlert(message: string, type?: AlertType): void;
|
|
57
64
|
declare function announce(message: string, type?: AlertType, useSpeech?: boolean): void;
|
|
58
65
|
declare function trapFocus(modal: HTMLElement): void;
|
|
66
|
+
declare function handlePlainEnglish(enabled: boolean): Promise<void>;
|
|
67
|
+
declare function handleSummarisePage(enabled: boolean): Promise<void>;
|
|
68
|
+
declare function handleTranslate(language: string): Promise<void>;
|
|
69
|
+
declare function handleVoiceControl(enabled: boolean): Promise<void>;
|
|
70
|
+
declare function handleSmartLabels(enabled: boolean): Promise<void>;
|
|
59
71
|
declare const wcagPlugin: {
|
|
60
72
|
name: string;
|
|
61
73
|
version: string;
|
|
@@ -69,13 +81,23 @@ declare const wcagPlugin: {
|
|
|
69
81
|
speak: typeof speak;
|
|
70
82
|
showVisualAlert: typeof showVisualAlert;
|
|
71
83
|
trapFocus: typeof trapFocus;
|
|
84
|
+
handlePlainEnglish: typeof handlePlainEnglish;
|
|
85
|
+
handleSummarisePage: typeof handleSummarisePage;
|
|
86
|
+
handleTranslate: typeof handleTranslate;
|
|
87
|
+
handleVoiceControl: typeof handleVoiceControl;
|
|
88
|
+
handleSmartLabels: typeof handleSmartLabels;
|
|
89
|
+
SUPPORTED_LANGUAGES: {
|
|
90
|
+
code: string;
|
|
91
|
+
label: string;
|
|
92
|
+
}[];
|
|
72
93
|
};
|
|
73
94
|
|
|
74
95
|
interface YuktAIWrapperProps {
|
|
75
|
-
children?: ReactNode;
|
|
76
96
|
position?: "left" | "right";
|
|
97
|
+
children: ReactNode;
|
|
98
|
+
config?: Partial<A11yConfig>;
|
|
77
99
|
}
|
|
78
|
-
declare function YuktAIWrapper({ children,
|
|
100
|
+
declare function YuktAIWrapper({ position, children, config: configOverrides, }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
|
|
79
101
|
|
|
80
102
|
declare const aiPlugin: {
|
|
81
103
|
name: string;
|
|
@@ -104,6 +126,15 @@ declare const YuktAI: {
|
|
|
104
126
|
speak: (text: string, priority?: "polite" | "assertive") => void;
|
|
105
127
|
showVisualAlert: (message: string, type?: AlertType) => void;
|
|
106
128
|
trapFocus: (modal: HTMLElement) => void;
|
|
129
|
+
handlePlainEnglish: (enabled: boolean) => Promise<void>;
|
|
130
|
+
handleSummarisePage: (enabled: boolean) => Promise<void>;
|
|
131
|
+
handleTranslate: (language: string) => Promise<void>;
|
|
132
|
+
handleVoiceControl: (enabled: boolean) => Promise<void>;
|
|
133
|
+
handleSmartLabels: (enabled: boolean) => Promise<void>;
|
|
134
|
+
SUPPORTED_LANGUAGES: {
|
|
135
|
+
code: string;
|
|
136
|
+
label: string;
|
|
137
|
+
}[];
|
|
107
138
|
};
|
|
108
139
|
list(): string[];
|
|
109
140
|
use(name: string): Plugin | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,13 @@ interface A11yConfig {
|
|
|
38
38
|
showSkipLinks?: boolean;
|
|
39
39
|
largeTargets?: boolean;
|
|
40
40
|
timeoutWarning?: number;
|
|
41
|
+
dyslexiaFont?: boolean;
|
|
42
|
+
localFont?: string;
|
|
43
|
+
plainEnglish?: boolean;
|
|
44
|
+
summarisePage?: boolean;
|
|
45
|
+
translateLanguage?: string;
|
|
46
|
+
voiceControl?: boolean;
|
|
47
|
+
smartLabels?: boolean;
|
|
41
48
|
}
|
|
42
49
|
interface A11yFix {
|
|
43
50
|
tag: string;
|
|
@@ -56,6 +63,11 @@ declare function speak(text: string, priority?: "polite" | "assertive"): void;
|
|
|
56
63
|
declare function showVisualAlert(message: string, type?: AlertType): void;
|
|
57
64
|
declare function announce(message: string, type?: AlertType, useSpeech?: boolean): void;
|
|
58
65
|
declare function trapFocus(modal: HTMLElement): void;
|
|
66
|
+
declare function handlePlainEnglish(enabled: boolean): Promise<void>;
|
|
67
|
+
declare function handleSummarisePage(enabled: boolean): Promise<void>;
|
|
68
|
+
declare function handleTranslate(language: string): Promise<void>;
|
|
69
|
+
declare function handleVoiceControl(enabled: boolean): Promise<void>;
|
|
70
|
+
declare function handleSmartLabels(enabled: boolean): Promise<void>;
|
|
59
71
|
declare const wcagPlugin: {
|
|
60
72
|
name: string;
|
|
61
73
|
version: string;
|
|
@@ -69,13 +81,23 @@ declare const wcagPlugin: {
|
|
|
69
81
|
speak: typeof speak;
|
|
70
82
|
showVisualAlert: typeof showVisualAlert;
|
|
71
83
|
trapFocus: typeof trapFocus;
|
|
84
|
+
handlePlainEnglish: typeof handlePlainEnglish;
|
|
85
|
+
handleSummarisePage: typeof handleSummarisePage;
|
|
86
|
+
handleTranslate: typeof handleTranslate;
|
|
87
|
+
handleVoiceControl: typeof handleVoiceControl;
|
|
88
|
+
handleSmartLabels: typeof handleSmartLabels;
|
|
89
|
+
SUPPORTED_LANGUAGES: {
|
|
90
|
+
code: string;
|
|
91
|
+
label: string;
|
|
92
|
+
}[];
|
|
72
93
|
};
|
|
73
94
|
|
|
74
95
|
interface YuktAIWrapperProps {
|
|
75
|
-
children?: ReactNode;
|
|
76
96
|
position?: "left" | "right";
|
|
97
|
+
children: ReactNode;
|
|
98
|
+
config?: Partial<A11yConfig>;
|
|
77
99
|
}
|
|
78
|
-
declare function YuktAIWrapper({ children,
|
|
100
|
+
declare function YuktAIWrapper({ position, children, config: configOverrides, }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
|
|
79
101
|
|
|
80
102
|
declare const aiPlugin: {
|
|
81
103
|
name: string;
|
|
@@ -104,6 +126,15 @@ declare const YuktAI: {
|
|
|
104
126
|
speak: (text: string, priority?: "polite" | "assertive") => void;
|
|
105
127
|
showVisualAlert: (message: string, type?: AlertType) => void;
|
|
106
128
|
trapFocus: (modal: HTMLElement) => void;
|
|
129
|
+
handlePlainEnglish: (enabled: boolean) => Promise<void>;
|
|
130
|
+
handleSummarisePage: (enabled: boolean) => Promise<void>;
|
|
131
|
+
handleTranslate: (language: string) => Promise<void>;
|
|
132
|
+
handleVoiceControl: (enabled: boolean) => Promise<void>;
|
|
133
|
+
handleSmartLabels: (enabled: boolean) => Promise<void>;
|
|
134
|
+
SUPPORTED_LANGUAGES: {
|
|
135
|
+
code: string;
|
|
136
|
+
label: string;
|
|
137
|
+
}[];
|
|
107
138
|
};
|
|
108
139
|
list(): string[];
|
|
109
140
|
use(name: string): Plugin | undefined;
|