@chat21/chat21-web-widget 5.1.34 → 5.2.1
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/.angular-mcp-cache/package.json +1 -0
- package/.cursor/angular18-accessibility-auditor-skill.md +442 -0
- package/.cursor/mcp.json +15 -0
- package/.github/workflows/playwright.yml +27 -0
- package/CHANGELOG.md +25 -0
- package/Dockerfile +4 -5
- package/README.md +1 -1
- package/angular.json +21 -3
- package/docs/ACCESSIBILITY-STATEMENT.md +388 -0
- package/docs/TILEDESK_WIDGET_ACCESSIBILITY_ALIGNMENT.md +60 -0
- package/docs/TILEDESK_WIDGET_ACCESSIBILITY_STATEMENT_COMPLETE.md +386 -0
- package/env.sample +3 -2
- package/mocks/voice-websocket-mock/server.cjs +245 -0
- package/package.json +10 -3
- package/playwright.config.ts +41 -0
- package/src/app/app.component.html +2 -2
- package/src/app/app.component.scss +25 -14
- package/src/app/app.component.spec.ts +21 -6
- package/src/app/app.module.ts +13 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.html +25 -11
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +38 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.spec.ts +644 -75
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +70 -2
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +25 -13
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.spec.ts +123 -5
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.ts +1 -0
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +23 -10
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +18 -0
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +241 -149
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +8 -5
- package/src/app/component/conversation-detail/conversation-emojii/conversation-emojii.component.spec.ts +53 -3
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +203 -110
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +212 -1
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.spec.ts +458 -78
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +288 -76
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +113 -53
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.scss +12 -4
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.spec.ts +274 -29
- package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.html +23 -9
- package/src/app/component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component.spec.ts +80 -8
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.html +29 -23
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.spec.ts +185 -16
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.ts +34 -14
- package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.html +46 -0
- package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.scss +83 -0
- package/src/app/component/conversation-detail/stream-audio-spectrum/stream-audio-spectrum.component.ts +192 -0
- package/src/app/component/error-alert/error-alert.component.spec.ts +65 -5
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.html +16 -7
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.scss +21 -0
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.spec.ts +89 -7
- package/src/app/component/form/form-builder/form-builder.component.html +1 -1
- package/src/app/component/form/form-builder/form-builder.component.spec.ts +163 -21
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.html +8 -4
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.scss +10 -5
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.spec.ts +90 -16
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +26 -0
- package/src/app/component/form/inputs/form-label/form-label.component.spec.ts +45 -11
- package/src/app/component/form/inputs/form-radio-button/form-radio-button.component.spec.ts +24 -6
- package/src/app/component/form/inputs/form-select/form-select.component.spec.ts +14 -5
- package/src/app/component/form/inputs/form-text/form-text.component.html +14 -12
- package/src/app/component/form/inputs/form-text/form-text.component.scss +11 -1
- package/src/app/component/form/inputs/form-text/form-text.component.spec.ts +113 -17
- package/src/app/component/form/inputs/form-text/form-text.component.ts +35 -3
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.html +13 -11
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.scss +6 -5
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.spec.ts +149 -13
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +26 -0
- package/src/app/component/form/prechat-form/prechat-form.component.html +14 -11
- package/src/app/component/form/prechat-form/prechat-form.component.spec.ts +102 -10
- package/src/app/component/form/prechat-form/prechat-form.component.ts +8 -1
- package/src/app/component/form/prechat-form-test-mock.ts +35 -0
- package/src/app/component/home/home.component.html +38 -31
- package/src/app/component/home/home.component.scss +4 -2
- package/src/app/component/home/home.component.spec.ts +226 -11
- package/src/app/component/home-conversations/home-conversations.component.html +30 -26
- package/src/app/component/home-conversations/home-conversations.component.scss +3 -0
- package/src/app/component/home-conversations/home-conversations.component.spec.ts +212 -36
- package/src/app/component/last-message/last-message.component.html +15 -9
- package/src/app/component/last-message/last-message.component.scss +16 -2
- package/src/app/component/last-message/last-message.component.spec.ts +204 -23
- package/src/app/component/launcher-button/launcher-button.component.html +8 -13
- package/src/app/component/launcher-button/launcher-button.component.spec.ts +104 -8
- package/src/app/component/list-all-conversations/list-all-conversations.component.html +12 -17
- package/src/app/component/list-all-conversations/list-all-conversations.component.scss +2 -0
- package/src/app/component/list-conversations/list-conversations.component.html +22 -22
- package/src/app/component/menu-options/menu-options.component.html +30 -20
- package/src/app/component/menu-options/menu-options.component.spec.ts +125 -9
- package/src/app/component/message/audio/audio.component.html +13 -15
- package/src/app/component/message/audio/audio.component.spec.ts +140 -5
- package/src/app/component/message/audio/audio.component.ts +1 -5
- package/src/app/component/message/audio-sync/audio-sync.component.html +18 -0
- package/src/app/component/message/audio-sync/audio-sync.component.scss +65 -0
- package/src/app/component/message/audio-sync/audio-sync.component.spec.ts +112 -0
- package/src/app/component/message/audio-sync/audio-sync.component.ts +714 -0
- package/src/app/component/message/avatar/avatar.component.html +2 -2
- package/src/app/component/message/avatar/avatar.component.spec.ts +99 -7
- package/src/app/component/message/bubble-message/bubble-message.component.html +41 -51
- package/src/app/component/message/bubble-message/bubble-message.component.scss +54 -1
- package/src/app/component/message/bubble-message/bubble-message.component.spec.ts +147 -57
- package/src/app/component/message/bubble-message/bubble-message.component.ts +95 -13
- package/src/app/component/message/buttons/action-button/action-button.component.html +3 -4
- package/src/app/component/message/buttons/action-button/action-button.component.spec.ts +49 -5
- package/src/app/component/message/buttons/link-button/link-button.component.scss +5 -8
- package/src/app/component/message/buttons/link-button/link-button.component.spec.ts +50 -5
- package/src/app/component/message/buttons/text-button/text-button.component.spec.ts +44 -5
- package/src/app/component/message/carousel/carousel.component.html +29 -16
- package/src/app/component/message/carousel/carousel.component.scss +20 -8
- package/src/app/component/message/carousel/carousel.component.spec.ts +80 -3
- package/src/app/component/message/carousel/carousel.component.ts +16 -0
- package/src/app/component/message/frame/frame.component.html +9 -4
- package/src/app/component/message/frame/frame.component.spec.ts +34 -15
- package/src/app/component/message/frame/frame.component.ts +7 -2
- package/src/app/component/message/html/html.component.html +1 -1
- package/src/app/component/message/html/html.component.scss +1 -1
- package/src/app/component/message/html/html.component.spec.ts +24 -7
- package/src/app/component/message/image/image.component.html +12 -10
- package/src/app/component/message/image/image.component.scss +16 -0
- package/src/app/component/message/image/image.component.spec.ts +101 -15
- package/src/app/component/message/image/image.component.ts +90 -51
- package/src/app/component/message/info-message/info-message.component.spec.ts +26 -14
- package/src/app/component/message/json-sources/json-sources.component.html +6 -5
- package/src/app/component/message/json-sources/json-sources.component.scss +26 -18
- package/src/app/component/message/json-sources/json-sources.component.ts +41 -0
- package/src/app/component/message/like-unlike/like-unlike.component.html +7 -9
- package/src/app/component/message/like-unlike/like-unlike.component.spec.ts +31 -3
- package/src/app/component/message/return-receipt/return-receipt.component.spec.ts +38 -17
- package/src/app/component/message/text/text.component.html +3 -3
- package/src/app/component/message/text/text.component.scss +80 -86
- package/src/app/component/message/text/text.component.spec.ts +106 -13
- package/src/app/component/message-attachment/message-attachment.component.spec.ts +134 -13
- package/src/app/component/selection-department/selection-department.component.html +21 -23
- package/src/app/component/selection-department/selection-department.component.spec.ts +159 -14
- package/src/app/component/selection-department/selection-department.component.ts +8 -1
- package/src/app/component/send-button/send-button.component.html +5 -13
- package/src/app/component/send-button/send-button.component.spec.ts +2 -2
- package/src/app/component/star-rating-widget/star-rating-widget.component.html +51 -81
- package/src/app/directives/tooltip.directive.spec.ts +8 -4
- package/src/app/modals/confirm-close/confirm-close.component.html +20 -8
- package/src/app/modals/confirm-close/confirm-close.component.scss +3 -0
- package/src/app/modals/confirm-close/confirm-close.component.spec.ts +13 -4
- package/src/app/modals/confirm-close/confirm-close.component.ts +8 -1
- package/src/app/pipe/html-entites-encode.pipe.spec.ts +35 -2
- package/src/app/pipe/marked.pipe.spec.ts +38 -2
- package/src/app/pipe/marked.pipe.ts +51 -41
- package/src/app/providers/app-config.service.ts +4 -2
- package/src/app/providers/brand.service.spec.ts +23 -2
- package/src/app/providers/brand.service.ts +1 -1
- package/src/app/providers/global-settings.service.spec.ts +1009 -14
- package/src/app/providers/global-settings.service.ts +40 -2
- package/src/app/providers/json-sources-parser.service.ts +13 -1
- package/src/app/providers/translator.service.ts +24 -7
- package/src/app/providers/tts-audio-playback-coordinator.service.spec.ts +116 -0
- package/src/app/providers/tts-audio-playback-coordinator.service.ts +122 -0
- package/src/app/providers/voice/STT&TTS/openai-voice.config.ts +12 -0
- package/src/app/providers/voice/STT&TTS/openai-voice.provider.ts +156 -0
- package/src/app/providers/voice/STT&TTS/speech-provider.abstract.ts +39 -0
- package/src/app/providers/voice/audio.types.ts +40 -0
- package/src/app/providers/voice/vad.service.spec.ts +28 -0
- package/src/app/providers/voice/vad.service.ts +70 -0
- package/src/app/providers/voice/voice-streaming.service.spec.ts +23 -0
- package/src/app/providers/voice/voice-streaming.service.ts +702 -0
- package/src/app/providers/voice/voice-streaming.types.ts +112 -0
- package/src/app/providers/voice/voice.service.spec.ts +227 -0
- package/src/app/providers/voice/voice.service.ts +969 -0
- package/src/app/sass/_variables.scss +2 -0
- package/src/app/sass/animations.scss +19 -1
- package/src/app/shims/onnxruntime-web-wasm.ts +4 -0
- package/src/app/utils/globals.ts +14 -0
- package/src/app/utils/utils-resources.ts +1 -1
- package/src/assets/i18n/en.json +128 -100
- package/src/assets/i18n/es.json +128 -100
- package/src/assets/i18n/fr.json +128 -100
- package/src/assets/i18n/it.json +128 -98
- package/src/assets/onnx/ort-wasm-simd-threaded.mjs +59 -0
- package/src/assets/onnx/ort-wasm-simd-threaded.wasm +0 -0
- package/src/assets/sounds/keyboard.mp3 +0 -0
- package/src/assets/vad/silero_vad_legacy.onnx +0 -0
- package/src/assets/vad/vad.worklet.bundle.min.js +1 -0
- package/src/chat21-core/models/message.ts +2 -1
- package/src/chat21-core/providers/chat-manager.spec.ts +72 -0
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +3 -2
- package/src/chat21-core/providers/firebase/firebase-init-service.ts +5 -5
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +12 -0
- package/src/chat21-core/providers/scripts/script.service.spec.ts +12 -2
- package/src/chat21-core/utils/utils-message.ts +7 -0
- package/src/widget-config-template.json +3 -1
- package/src/widget-config.json +28 -27
- package/tests/widget-form-rich.spec.ts +67 -0
- package/tests/widget-index-dev-settings.spec.ts +52 -0
- package/tests/widget-twp-iframe.spec.ts +39 -0
- package/tsconfig.json +5 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"private":true,"name":"angular-mcp-cache"}
|
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
# Angular 18 Accessibility Auditor Skill
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
|
|
5
|
+
You are an expert Angular 18 architect and accessibility auditor specialized in:
|
|
6
|
+
|
|
7
|
+
- Angular standalone architecture
|
|
8
|
+
- Dynamic bootstrap systems (`launch.js`)
|
|
9
|
+
- iframe-hosted Angular applications
|
|
10
|
+
- WCAG 2.2 AA compliance
|
|
11
|
+
- WAI-ARIA best practices
|
|
12
|
+
- Semantic HTML validation
|
|
13
|
+
- Keyboard navigation analysis
|
|
14
|
+
- Screen reader compatibility
|
|
15
|
+
- Component API inspection
|
|
16
|
+
- UI accessibility remediation
|
|
17
|
+
|
|
18
|
+
Your task is to inspect an Angular 18 project loaded through an iframe and bootstrapped by a `launch.js` file.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Objectives
|
|
23
|
+
|
|
24
|
+
Analyze the entire Angular application and produce:
|
|
25
|
+
|
|
26
|
+
1. Full component inventory
|
|
27
|
+
2. Component hierarchy map
|
|
28
|
+
3. Inputs and Outputs analysis
|
|
29
|
+
4. Accessibility audit
|
|
30
|
+
5. WCAG 2.2 violations
|
|
31
|
+
6. ARIA compliance report
|
|
32
|
+
7. Keyboard navigation issues
|
|
33
|
+
8. Screen reader compatibility issues
|
|
34
|
+
9. Semantic HTML problems
|
|
35
|
+
10. Accessibility remediation suggestions
|
|
36
|
+
11. Severity classification
|
|
37
|
+
12. Suggested code fixes
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
# Project Context
|
|
42
|
+
|
|
43
|
+
The Angular application:
|
|
44
|
+
|
|
45
|
+
- Uses Angular 18
|
|
46
|
+
- Is bootstrapped dynamically through `launch.js`
|
|
47
|
+
- Is rendered inside an iframe
|
|
48
|
+
- May use standalone components
|
|
49
|
+
- May use signals
|
|
50
|
+
- May use lazy routes
|
|
51
|
+
- May use custom UI libraries
|
|
52
|
+
- May use Shadow DOM
|
|
53
|
+
- May use dynamic rendering
|
|
54
|
+
|
|
55
|
+
You must inspect:
|
|
56
|
+
|
|
57
|
+
- `launch.js`
|
|
58
|
+
- `main.ts`
|
|
59
|
+
- `app.config.ts`
|
|
60
|
+
- routing configuration
|
|
61
|
+
- all Angular components
|
|
62
|
+
- templates (`.html`)
|
|
63
|
+
- inline templates
|
|
64
|
+
- directives
|
|
65
|
+
- pipes
|
|
66
|
+
- services involved in UI rendering
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
# Mandatory Analysis Rules
|
|
71
|
+
|
|
72
|
+
## Component Discovery
|
|
73
|
+
|
|
74
|
+
You MUST identify:
|
|
75
|
+
|
|
76
|
+
- selector
|
|
77
|
+
- standalone or module-based
|
|
78
|
+
- templateUrl or inline template
|
|
79
|
+
- styleUrls
|
|
80
|
+
- imported dependencies
|
|
81
|
+
- nested components
|
|
82
|
+
- dynamic component rendering
|
|
83
|
+
- projected content (`ng-content`)
|
|
84
|
+
- structural directives
|
|
85
|
+
|
|
86
|
+
For every component extract:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
@Input()
|
|
90
|
+
@Output()
|
|
91
|
+
signal()
|
|
92
|
+
computed()
|
|
93
|
+
effect()
|
|
94
|
+
viewChild()
|
|
95
|
+
contentChild()
|
|
96
|
+
hostBinding()
|
|
97
|
+
hostListener()
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
# Accessibility Audit Rules
|
|
103
|
+
|
|
104
|
+
For every component evaluate:
|
|
105
|
+
|
|
106
|
+
## 1. Semantic HTML
|
|
107
|
+
|
|
108
|
+
Detect misuse or absence of:
|
|
109
|
+
|
|
110
|
+
- button
|
|
111
|
+
- nav
|
|
112
|
+
- main
|
|
113
|
+
- section
|
|
114
|
+
- article
|
|
115
|
+
- header
|
|
116
|
+
- footer
|
|
117
|
+
- aside
|
|
118
|
+
- label
|
|
119
|
+
- fieldset
|
|
120
|
+
- legend
|
|
121
|
+
- table semantics
|
|
122
|
+
|
|
123
|
+
Flag:
|
|
124
|
+
|
|
125
|
+
- clickable divs
|
|
126
|
+
- clickable spans
|
|
127
|
+
- missing labels
|
|
128
|
+
- invalid heading hierarchy
|
|
129
|
+
- missing alt text
|
|
130
|
+
- empty buttons
|
|
131
|
+
- duplicate IDs
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 2. WCAG 2.2 Compliance
|
|
136
|
+
|
|
137
|
+
Evaluate against:
|
|
138
|
+
|
|
139
|
+
### Perceivable
|
|
140
|
+
|
|
141
|
+
- text alternatives
|
|
142
|
+
- contrast risks
|
|
143
|
+
- resize behavior
|
|
144
|
+
- responsive accessibility
|
|
145
|
+
|
|
146
|
+
### Operable
|
|
147
|
+
|
|
148
|
+
- keyboard navigation
|
|
149
|
+
- focus trapping
|
|
150
|
+
- tab order
|
|
151
|
+
- focus visibility
|
|
152
|
+
- skip links
|
|
153
|
+
- hover-only interactions
|
|
154
|
+
|
|
155
|
+
### Understandable
|
|
156
|
+
|
|
157
|
+
- label clarity
|
|
158
|
+
- form instructions
|
|
159
|
+
- error messages
|
|
160
|
+
- consistent navigation
|
|
161
|
+
|
|
162
|
+
### Robust
|
|
163
|
+
|
|
164
|
+
- ARIA validity
|
|
165
|
+
- semantic correctness
|
|
166
|
+
- screen reader compatibility
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 3. ARIA Validation
|
|
171
|
+
|
|
172
|
+
Validate:
|
|
173
|
+
|
|
174
|
+
- aria-label
|
|
175
|
+
- aria-labelledby
|
|
176
|
+
- aria-describedby
|
|
177
|
+
- aria-hidden
|
|
178
|
+
- role
|
|
179
|
+
- live regions
|
|
180
|
+
- dialog accessibility
|
|
181
|
+
- menu accessibility
|
|
182
|
+
- tabs accessibility
|
|
183
|
+
- accordion accessibility
|
|
184
|
+
|
|
185
|
+
Detect:
|
|
186
|
+
|
|
187
|
+
- invalid ARIA roles
|
|
188
|
+
- redundant ARIA
|
|
189
|
+
- conflicting ARIA attributes
|
|
190
|
+
- inaccessible custom controls
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 4. Forms Accessibility
|
|
195
|
+
|
|
196
|
+
Check:
|
|
197
|
+
|
|
198
|
+
- labels association
|
|
199
|
+
- required indicators
|
|
200
|
+
- error handling
|
|
201
|
+
- aria-invalid
|
|
202
|
+
- autocomplete
|
|
203
|
+
- focus management
|
|
204
|
+
- keyboard operability
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## 5. Keyboard Navigation
|
|
209
|
+
|
|
210
|
+
Detect:
|
|
211
|
+
|
|
212
|
+
- inaccessible controls
|
|
213
|
+
- tabindex misuse
|
|
214
|
+
- focus loss
|
|
215
|
+
- inaccessible modal dialogs
|
|
216
|
+
- inaccessible dropdowns
|
|
217
|
+
- inaccessible popovers
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 6. Dynamic UI Accessibility
|
|
222
|
+
|
|
223
|
+
Because the app is iframe-hosted and dynamically bootstrapped:
|
|
224
|
+
|
|
225
|
+
Analyze:
|
|
226
|
+
|
|
227
|
+
- iframe title
|
|
228
|
+
- focus transfer into iframe
|
|
229
|
+
- dynamic DOM rendering
|
|
230
|
+
- lazy-loaded accessibility
|
|
231
|
+
- async content announcements
|
|
232
|
+
- Angular CDK overlays
|
|
233
|
+
- dialogs
|
|
234
|
+
- portals
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
# Severity Levels
|
|
239
|
+
|
|
240
|
+
Each issue must include:
|
|
241
|
+
|
|
242
|
+
| Severity | Meaning |
|
|
243
|
+
|---|---|
|
|
244
|
+
| Critical | Blocks accessibility completely |
|
|
245
|
+
| High | Serious usability issue |
|
|
246
|
+
| Medium | Partial accessibility degradation |
|
|
247
|
+
| Low | Minor improvement |
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
# Output Format
|
|
252
|
+
|
|
253
|
+
Always produce output in this structure:
|
|
254
|
+
|
|
255
|
+
# Angular Accessibility Audit Report
|
|
256
|
+
|
|
257
|
+
## Project Overview
|
|
258
|
+
|
|
259
|
+
- Angular version
|
|
260
|
+
- Bootstrap mode
|
|
261
|
+
- iframe integration
|
|
262
|
+
- routing strategy
|
|
263
|
+
- standalone usage
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
# Component Inventory
|
|
268
|
+
|
|
269
|
+
## Component: ExampleComponent
|
|
270
|
+
|
|
271
|
+
### Metadata
|
|
272
|
+
|
|
273
|
+
- Selector:
|
|
274
|
+
- Standalone:
|
|
275
|
+
- Template:
|
|
276
|
+
- Style:
|
|
277
|
+
- Inputs:
|
|
278
|
+
- Outputs:
|
|
279
|
+
|
|
280
|
+
### Accessibility Findings
|
|
281
|
+
|
|
282
|
+
| Severity | Rule | Problem | Recommendation |
|
|
283
|
+
|---|---|---|---|
|
|
284
|
+
|
|
285
|
+
### WCAG 2.2 Violations
|
|
286
|
+
|
|
287
|
+
| WCAG Ref | Description |
|
|
288
|
+
|---|---|
|
|
289
|
+
|
|
290
|
+
### ARIA Findings
|
|
291
|
+
|
|
292
|
+
| Type | Issue |
|
|
293
|
+
|---|---|
|
|
294
|
+
|
|
295
|
+
### Keyboard Accessibility
|
|
296
|
+
|
|
297
|
+
| Issue | Recommendation |
|
|
298
|
+
|---|---|
|
|
299
|
+
|
|
300
|
+
### Suggested Fix
|
|
301
|
+
|
|
302
|
+
```html
|
|
303
|
+
<!-- before -->
|
|
304
|
+
<div (click)="save()"></div>
|
|
305
|
+
|
|
306
|
+
<!-- after -->
|
|
307
|
+
<button type="button" (click)="save()">
|
|
308
|
+
Save
|
|
309
|
+
</button>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
# Global Accessibility Issues
|
|
315
|
+
|
|
316
|
+
## Routing Accessibility
|
|
317
|
+
|
|
318
|
+
## Dialog Accessibility
|
|
319
|
+
|
|
320
|
+
## Overlay Accessibility
|
|
321
|
+
|
|
322
|
+
## Focus Management
|
|
323
|
+
|
|
324
|
+
## Screen Reader Compatibility
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
# Final Accessibility Score
|
|
329
|
+
|
|
330
|
+
| Area | Score |
|
|
331
|
+
|---|---|
|
|
332
|
+
| Semantic HTML | |
|
|
333
|
+
| Keyboard Accessibility | |
|
|
334
|
+
| ARIA Compliance | |
|
|
335
|
+
| Forms Accessibility | |
|
|
336
|
+
| WCAG 2.2 Compliance | |
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
# Final Recommendations
|
|
341
|
+
|
|
342
|
+
Provide:
|
|
343
|
+
|
|
344
|
+
1. Immediate fixes
|
|
345
|
+
2. Structural improvements
|
|
346
|
+
3. Refactoring recommendations
|
|
347
|
+
4. Angular CDK accessibility recommendations
|
|
348
|
+
5. aria-live recommendations
|
|
349
|
+
6. Focus management improvements
|
|
350
|
+
7. Design system accessibility improvements
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
# Additional Technical Requirements
|
|
355
|
+
|
|
356
|
+
When analyzing Angular 18 code:
|
|
357
|
+
|
|
358
|
+
- Understand signals API
|
|
359
|
+
- Understand standalone components
|
|
360
|
+
- Understand control flow syntax:
|
|
361
|
+
- @if
|
|
362
|
+
- @for
|
|
363
|
+
- @switch
|
|
364
|
+
- Understand deferred loading
|
|
365
|
+
- Understand hydration
|
|
366
|
+
- Understand SSR accessibility implications
|
|
367
|
+
- Understand Angular CDK a11y utilities
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
# Accessibility Best Practices Reference
|
|
372
|
+
|
|
373
|
+
Use these standards as authoritative references:
|
|
374
|
+
|
|
375
|
+
- WCAG 2.2 AA
|
|
376
|
+
- WAI-ARIA 1.2
|
|
377
|
+
- HTML Living Standard
|
|
378
|
+
- Angular CDK Accessibility
|
|
379
|
+
- MDN Accessibility Guidelines
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
# Behavioral Instructions
|
|
384
|
+
|
|
385
|
+
You must:
|
|
386
|
+
|
|
387
|
+
- Be extremely strict
|
|
388
|
+
- Never assume accessibility exists unless verified
|
|
389
|
+
- Prefer semantic HTML over ARIA
|
|
390
|
+
- Explain WHY something is inaccessible
|
|
391
|
+
- Suggest production-grade fixes
|
|
392
|
+
- Consider screen readers:
|
|
393
|
+
- NVDA
|
|
394
|
+
- JAWS
|
|
395
|
+
- VoiceOver
|
|
396
|
+
- Consider keyboard-only users
|
|
397
|
+
- Consider low vision users
|
|
398
|
+
- Consider cognitive accessibility
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
# Extra Analysis
|
|
403
|
+
|
|
404
|
+
If possible also detect:
|
|
405
|
+
|
|
406
|
+
- inaccessible animations
|
|
407
|
+
- reduced-motion support
|
|
408
|
+
- color dependency issues
|
|
409
|
+
- inaccessible charts
|
|
410
|
+
- inaccessible SVGs
|
|
411
|
+
- inaccessible icons
|
|
412
|
+
- missing i18n accessibility
|
|
413
|
+
- RTL accessibility problems
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
# Advanced Angular-Specific Checks
|
|
418
|
+
|
|
419
|
+
Validate:
|
|
420
|
+
|
|
421
|
+
- CDK Dialog accessibility
|
|
422
|
+
- Material accessibility
|
|
423
|
+
- OverlayContainer focus management
|
|
424
|
+
- Dynamic component injection
|
|
425
|
+
- Renderer2 misuse
|
|
426
|
+
- HostListener keyboard traps
|
|
427
|
+
- signal-driven DOM updates
|
|
428
|
+
- custom form controls
|
|
429
|
+
- ControlValueAccessor accessibility
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
# Final Rule
|
|
434
|
+
|
|
435
|
+
Never provide generic accessibility advice.
|
|
436
|
+
|
|
437
|
+
Every finding MUST reference:
|
|
438
|
+
|
|
439
|
+
- the exact component
|
|
440
|
+
- the exact template section
|
|
441
|
+
- the exact issue
|
|
442
|
+
- the exact remediation
|
package/.cursor/mcp.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"angular-cli": {
|
|
4
|
+
"command": "/Users/gabriele95/.angular-mcp-runner/run-angular-mcp.sh",
|
|
5
|
+
"args": []
|
|
6
|
+
},
|
|
7
|
+
"playwright": {
|
|
8
|
+
"command": "npx",
|
|
9
|
+
"args": ["-y", "@playwright/mcp@latest", "--caps=testing"],
|
|
10
|
+
"env": {
|
|
11
|
+
"PATH": "/Users/gabriele95/.nvm/versions/node/v20.19.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Playwright Tests
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [ main, master ]
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [ main, master ]
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
timeout-minutes: 60
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-node@v4
|
|
14
|
+
with:
|
|
15
|
+
node-version: lts/*
|
|
16
|
+
- name: Install dependencies
|
|
17
|
+
run: npm ci
|
|
18
|
+
- name: Install Playwright Browsers
|
|
19
|
+
run: npx playwright install --with-deps
|
|
20
|
+
- name: Run Playwright tests
|
|
21
|
+
run: npx playwright test
|
|
22
|
+
- uses: actions/upload-artifact@v4
|
|
23
|
+
if: ${{ !cancelled() }}
|
|
24
|
+
with:
|
|
25
|
+
name: playwright-report
|
|
26
|
+
path: playwright-report/
|
|
27
|
+
retention-days: 30
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,31 @@
|
|
|
6
6
|
### **Copyrigth**:
|
|
7
7
|
*Tiledesk SRL*
|
|
8
8
|
|
|
9
|
+
|
|
10
|
+
# 5.2.1
|
|
11
|
+
- **bug fixed**: prevent avatar display when audio stream is active in conversation content
|
|
12
|
+
- **changed**: refined message margin logic and updated widget/firebase configuration for local development
|
|
13
|
+
- **changed**: simplified textarea background color and removed unused image in conversation footer
|
|
14
|
+
- **changed**: updated `remoteConfigUrl` settings for widget configuration
|
|
15
|
+
- **changed**: switched Docker builder stage base image to `node:20.12.2-bookworm-slim`
|
|
16
|
+
- **changed**: upgraded Angular and build tool dependencies to align with version 5.2.1
|
|
17
|
+
- **changed**: cleaned up and enhanced unit tests for conversation and audio components
|
|
18
|
+
- **added**: integrated Playwright for end-to-end testing
|
|
19
|
+
- **added**: comprehensive accessibility documentation for the Tiledesk Web Widget
|
|
20
|
+
|
|
21
|
+
# 5.2.0
|
|
22
|
+
|
|
23
|
+
# 5.1.32-rc13
|
|
24
|
+
- **added**: VAD speech state events (`speechStart$`, `speechEnd$`) to improve UI/state transitions around user speech
|
|
25
|
+
- **changed**: stream audio footer UI — stream button expands into a “Terminate” pill with animated level bars driven by mic intensity; recorder icon hidden while streaming; textarea width adjusted while streaming
|
|
26
|
+
- **changed**: `StreamAudioSpectrum` — consolidated stream spectrum + stream button visuals into a single component with improved silence vs speaking handling and volume-driven bar heights
|
|
27
|
+
- **changed**: conversation layout while streaming — adjusted received bubble sizing (`fullSizeMessage`) and loading spinner spacing (`fullSize`) for full-width stream mode
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# 5.1.35
|
|
32
|
+
- **bug fixed**: updated url preview, added displayed fields
|
|
33
|
+
|
|
9
34
|
# 5.1.34
|
|
10
35
|
- **bug fixed**: if last message is ulr_preview shows previous message buttons
|
|
11
36
|
|
package/Dockerfile
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
### STAGE 1: Build ###
|
|
2
2
|
|
|
3
3
|
# We label our stage as ‘builder’
|
|
4
|
-
FROM node:20.12.2-
|
|
4
|
+
FROM --platform=$BUILDPLATFORM node:20.12.2-bookworm-slim AS builder
|
|
5
5
|
|
|
6
6
|
COPY package.json package-lock.json ./
|
|
7
7
|
|
|
8
8
|
## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
|
|
9
9
|
|
|
10
|
-
RUN npm ci && mkdir /ng-app && mv ./node_modules ./ng-app
|
|
10
|
+
RUN npm install -g npm@10.9.2 && npm ci && mkdir /ng-app && mv ./node_modules ./ng-app
|
|
11
11
|
|
|
12
12
|
WORKDIR /ng-app
|
|
13
13
|
|
|
@@ -19,8 +19,7 @@ RUN npx ng build --configuration="prod" --output-path=dist --base-href=./ --outp
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
### STAGE 2: Setup ###
|
|
22
|
-
|
|
23
|
-
FROM nginx:1.14.1-alpine
|
|
22
|
+
FROM --platform=$BUILDPLATFORM nginx:1.14.1-alpine
|
|
24
23
|
|
|
25
24
|
## Copy our default nginx config
|
|
26
25
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
@@ -33,4 +32,4 @@ COPY --from=builder /ng-app/dist/browser /usr/share/nginx/html
|
|
|
33
32
|
|
|
34
33
|
RUN echo "Chat21 Web Widget Started!!"
|
|
35
34
|
|
|
36
|
-
CMD ["/bin/sh",
|
|
35
|
+
CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/widget-config-template.json > /usr/share/nginx/html/widget-config.json && exec nginx -g 'daemon off;'"]
|
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ export const environment = {
|
|
|
67
67
|
production: true,
|
|
68
68
|
version: require('../../package.json').version,
|
|
69
69
|
remoteConfig: false, // for performance don't load settings from remote
|
|
70
|
-
remoteConfigUrl: '/widget-config.json',
|
|
70
|
+
remoteConfigUrl: '/widget-config-aws-stage.json',
|
|
71
71
|
loadRemoteTranslations: true,
|
|
72
72
|
remoteTranslationsUrl: 'https://<YOUR_REMOTE_TRANSLATIONS_URL>/',
|
|
73
73
|
chatEngine: "mqtt", // OR YOUR CUSTOM CHAT ENGINE
|
package/angular.json
CHANGED
|
@@ -61,7 +61,9 @@
|
|
|
61
61
|
"idb",
|
|
62
62
|
"accept-language-parser",
|
|
63
63
|
"file-saver",
|
|
64
|
-
"dayjs"
|
|
64
|
+
"dayjs",
|
|
65
|
+
"onnxruntime-web",
|
|
66
|
+
"@ricky0123/vad-web"
|
|
65
67
|
],
|
|
66
68
|
"sourceMap": true,
|
|
67
69
|
"optimization": false,
|
|
@@ -160,7 +162,19 @@
|
|
|
160
162
|
"src/styles.scss"
|
|
161
163
|
],
|
|
162
164
|
"scripts": [],
|
|
163
|
-
"codeCoverage": true
|
|
165
|
+
"codeCoverage": true,
|
|
166
|
+
"codeCoverageExclude": [
|
|
167
|
+
"src/chat21-core/providers/firebase/**/*.ts",
|
|
168
|
+
"src/chat21-core/providers/mqtt/**/*.ts",
|
|
169
|
+
"src/main.ts",
|
|
170
|
+
"src/polyfills.ts",
|
|
171
|
+
"src/zone-flag.ts",
|
|
172
|
+
"src/models/**/*.ts",
|
|
173
|
+
"src/chat21-core/models/**/*.ts",
|
|
174
|
+
"src/chat21-core/providers/native/**/*.ts",
|
|
175
|
+
"src/chat21-core/providers/logger/customLogger.ts",
|
|
176
|
+
"src/chat21-core/providers/logger/loggerInstance.ts"
|
|
177
|
+
]
|
|
164
178
|
}
|
|
165
179
|
},
|
|
166
180
|
"e2e": {
|
|
@@ -182,5 +196,9 @@
|
|
|
182
196
|
"defaultConfiguration": "development"
|
|
183
197
|
}
|
|
184
198
|
}
|
|
185
|
-
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"cli": {
|
|
202
|
+
"analytics": false
|
|
203
|
+
}
|
|
186
204
|
}
|