Repository navigation
Expand file tree
/
Copy pathreference.html
More file actions
576 lines (511 loc) · 26.2 KB
/
Copy pathreference.html
File metadata and controls
576 lines (511 loc) · 26.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ailly | Ultimate Feature Reference</title>
<link rel="stylesheet" href="/src/style.css">
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@600;700&display=swap"
rel="stylesheet">
<style>
:root {
--feature-bg: rgba(255, 255, 255, 0.03);
--feature-border: rgba(255, 255, 255, 0.1);
--feature-accent: var(--color-accent);
}
body {
background-color: #0a0a0c;
color: #e0e0e0;
overflow-y: auto !important;
/* Allow scrolling for reference */
}
.reference-hero {
padding: var(--space-12) 0 var(--space-6);
background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15), transparent 70%);
border-bottom: 1px solid var(--glass-border);
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: var(--space-6);
padding: var(--space-8) 0;
}
.feature-section {
padding: var(--space-12) 0;
}
.feature-card {
background: var(--feature-bg);
border: 1px solid var(--feature-border);
border-radius: var(--radius-xl);
padding: var(--space-6);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.feature-card:hover {
border-color: var(--color-primary);
background: rgba(255, 255, 255, 0.05);
transform: translateY(-4px);
}
.feature-status {
position: absolute;
top: var(--space-4);
right: var(--space-4);
font-size: var(--text-xs);
font-weight: 700;
padding: 2px 8px;
border-radius: var(--radius-full);
text-transform: uppercase;
}
.status-ready {
background: rgba(34, 197, 94, 0.2);
color: #4ade80;
}
.status-experimental {
background: rgba(245, 158, 11, 0.2);
color: #fbbf24;
}
.demo-container {
margin-top: var(--space-4);
padding: var(--space-4);
background: rgba(0, 0, 0, 0.3);
border-radius: var(--radius-md);
border: 1px dashed rgba(255, 255, 255, 0.1);
}
.demo-box {
height: 100px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
color: var(--color-accent);
position: relative;
}
/* Specialized Demos */
.demo-contrast {
background: #fff;
color: #ddd;
/* Intentional low contrast */
border-radius: 4px;
}
.demo-text-heavy {
font-size: 10px;
line-height: 1.2;
color: #aaa;
text-align: left;
overflow: hidden;
}
.complex-layout {
display: grid;
grid-template-columns: 1fr 2fr;
gap: 5px;
font-size: 8px;
}
.sidebar {
background: #222;
height: 100%;
border-radius: 2px;
}
.content-area {
background: #333;
height: 100%;
border-radius: 2px;
}
.tag-cloud {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.tag {
background: var(--color-primary);
padding: 2px 6px;
border-radius: 10px;
font-size: 9px;
color: white;
}
</style>
</head>
<body>
<div class="animated-bg" aria-hidden="true">
<div class="gradient-orb gradient-orb-1"></div>
<div class="gradient-orb gradient-orb-2"></div>
</div>
<header class="reference-hero">
<div class="container">
<div class="flex-between">
<div>
<h1 class="heading-hero" style="font-size: var(--text-5xl);">Ailly Feature Reference</h1>
<p class="text-body-large">The Gold Standard for Accessibility AI Verification</p>
</div>
<div class="badge status-ready">
<span>v0.0.0-MVP</span>
</div>
</div>
</div>
</header>
<main class="container" style="padding-bottom: 120px;">
<!-- FLOATING TEST CONTROLLER -->
<!-- Keeps ID 'hero-workbench' to maintain compatibility with ui-plugin.ts -->
<div id="hero-workbench" class="card card-glow"
style="position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; padding: 12px 20px; width: auto; max-width: 90vw; border-radius: 50px; background: rgba(10, 10, 12, 0.9); backdrop-filter: blur(20px); border: 1px solid var(--border-color, rgba(255,255,255,0.1)); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);">
<!-- IDLE STATE: Start Buttons -->
<div id="workbench-idle" style="display: flex; align-items: center; gap: 12px;">
<span class="text-caption"
style="font-weight: 600; color: var(--color-text-primary); margin-right: 8px;">Ailly
Controller</span>
<div style="height: 20px; width: 1px; background: rgba(255,255,255,0.2);"></div>
<button class="btn btn-primary btn-sm" id="btn-hero-webcam"
style="border-radius: 20px; padding: 8px 16px;">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
class="mr-2">
<circle cx="12" cy="13" r="4"></circle>
</svg>
Webcam
</button>
<button class="btn btn-secondary btn-sm" id="btn-hero-screen"
style="border-radius: 20px; padding: 8px 16px;">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
class="mr-2">
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect>
</svg>
Screen
</button>
</div>
<!-- ACTIVE STATE: Stop Controls -->
<div id="workbench-active" style="display: none; align-items: center; gap: 12px;">
<div class="badge"
style="background: rgba(34, 197, 94, 0.2); color: #4ade80; border: none; padding: 4px 12px;">
<span
style="width: 8px; height: 8px; background: #4ade80; border-radius: 50%; display: inline-block; margin-right: 6px; box-shadow: 0 0 8px #4ade80;"></span>
Running
</div>
<div style="height: 20px; width: 1px; background: rgba(255,255,255,0.2);"></div>
<button class="btn btn-secondary btn-sm" id="btn-hero-focus" style="display: none;">Focus</button>
<button id="btn-hero-fullscreen" style="display: none;"></button> <!-- Hidden but kept for ID ref -->
<div style="height: 20px; width: 1px; background: rgba(255,255,255,0.2);"></div>
<button class="btn btn-danger btn-sm" id="btn-hero-stop"
style="border-radius: 20px; padding: 8px 16px;">
Stop Session
</button>
</div>
<p id="workbench-caption" class="sr-only"></p>
</div>
<!-- TEST SUITE: Multimedia & Vision -->
<section id="test-multimedia" class="feature-section">
<h2 class="heading-section mb-6">1. Multimedia & Vision Test</h2>
<div class="feature-grid">
<!-- VIDEO TEST -->
<div class="feature-card">
<span class="feature-status status-ready">Video Analysis</span>
<h3 class="heading-card mb-2">HTML5 Video</h3>
<p class="text-body mb-4">Test captioning, frame analysis, and temporal denoising.</p>
<div class="demo-container" style="padding: 0; overflow: hidden;">
<video controls style="width: 100%; border-radius: 4px;" crossorigin="anonymous">
<source
src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerBlazes.mp4"
type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
</div>
<!-- IMAGE TEST -->
<div class="feature-card">
<span class="feature-status status-ready">Image Description</span>
<h3 class="heading-card mb-2">Complex Scene</h3>
<p class="text-body mb-4">Test object detection and scene description (Alt Text Gen).</p>
<div class="demo-container" style="padding: 0; overflow: hidden; height: 180px;">
<img src="https://images.unsplash.com/photo-1496181133206-80ce9b88a853?q=80&w=500&auto=format&fit=crop"
alt="Laptop on desk with code" style="width: 100%; height: 100%; object-fit: cover;">
</div>
</div>
<!-- SUPER RESOLUTION / BLUR TEST -->
<div class="feature-card">
<span class="feature-status status-experimental">Vision Enhancement</span>
<h3 class="heading-card mb-2">Low Res / Blur</h3>
<p class="text-body mb-4">Test super-resolution and sharpening verification.</p>
<div class="demo-container" style="display: flex; gap: 10px;">
<img src="/vite.svg" style="width: 40px; filter: blur(2px);" alt="Blurred Logo">
<div class="demo-box demo-text-heavy" style="filter: blur(1.5px);">
The quick brown fox jumps over the lazy dog.<br>
Blurry text for edge enhancement test.
</div>
</div>
</div>
</div>
</section>
<!-- TEST SUITE: Web Elements & Accessibility -->
<section id="test-web-elements" class="feature-section">
<h2 class="heading-section mb-6">2. Web Elements & A11y Audit</h2>
<div class="feature-grid">
<!-- FORM ELEMENTS -->
<div class="feature-card">
<span class="feature-status status-ready">Form Interaction</span>
<h3 class="heading-card mb-2">Input Fields</h3>
<p class="text-body mb-4">Test label association and focus states.</p>
<form onsubmit="event.preventDefault();">
<div class="mb-4">
<label for="test-email" class="text-caption"
style="display: block; margin-bottom: 4px;">Accessible Label</label>
<input type="email" id="test-email" placeholder="email@example.com"
style="width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #444; background: #222; color: white;">
</div>
<div class="mb-4">
<!-- ACCESSIBILITY VIOLATION: Missing Label -->
<input type="text" placeholder="I have no label (Bad)"
style="width: 100%; padding: 8px; border-radius: 4px; border: 1px solid red; background: #222; color: white;">
</div>
</form>
</div>
<!-- CONTRAST TEST -->
<div class="feature-card">
<span class="feature-status status-ready">Contrast Check</span>
<h3 class="heading-card mb-2">Color & Contrast</h3>
<p class="text-body mb-4">Test contrast ratios and Daltonization filters.</p>
<div class="demo-container"
style="display: flex; flex-direction: column; gap: 8px; background: #fff; color: #000; padding: 12px;">
<div style="color: #000; font-weight: bold;">High Contrast (21:1)</div>
<div style="color: #767676;">Medium Contrast (4.5:1)</div>
<div style="color: #ccc;">Low Contrast Fail (Fail)</div>
<div class="tag-cloud mt-2">
<div style="width: 20px; height: 20px; background: red;"></div>
<div style="width: 20px; height: 20px; background: green;"></div>
<div style="width: 20px; height: 20px; background: blue;"></div>
</div>
</div>
</div>
<!-- OCR & DYNAMIC CONTENT -->
<div class="feature-card">
<span class="feature-status status-ready">OCR & Dynamic</span>
<h3 class="heading-card mb-2">Text Recognition</h3>
<p class="text-body mb-4">Test OCR on non-selectable text (Canvas/Image).</p>
<div class="demo-container">
<!-- Canvas with Text drawn on it -->
<canvas id="ocr-canvas" width="300" height="80" style="background: #222; width: 100%;"></canvas>
<script>
const ctx = document.getElementById('ocr-canvas').getContext('2d');
ctx.fillStyle = '#eee';
ctx.font = '20px Arial';
ctx.fillText('This is Pixel Text', 10, 30);
ctx.font = '14px Arial';
ctx.fillStyle = '#aaa';
ctx.fillText('Select me with OCR', 10, 60);
</script>
</div>
</div>
</div>
</section>
<!-- Usage Guide -->
<section id="usage-guide" class="feature-section">
<h2 class="heading-section mb-6">Getting Started</h2>
<div class="feature-grid">
<div class="feature-card">
<h3 class="heading-card mb-2">1. Quick Start</h3>
<p class="text-body mb-4">Launch Ailly by clicking "Webcam" or "Screen" in the Test Controller
below.</p>
<ul style="list-style: none; padding: 0; color: var(--color-text-secondary); line-height: 1.8;">
<li>🎥 <strong>Webcam</strong>: Analyze your physical environment</li>
<li>🖥️ <strong>Screen</strong>: Process any webpage or application</li>
<li>⌨️ <strong>Shortcuts</strong>: Press 'S' for screen, 'W' for webcam</li>
</ul>
</div>
<div class="feature-card">
<h3 class="heading-card mb-2">2. Features Overview</h3>
<p class="text-body mb-4">Ailly provides real-time on-device AI capabilities:</p>
<ul style="list-style: none; padding: 0; color: var(--color-text-secondary); line-height: 1.8;">
<li>📝 <strong>OCR</strong>: Extract text from images and video</li>
<li>👁️ <strong>Object Detection</strong>: Identify and track objects</li>
<li>🎯 <strong>Magnifier</strong>: AI-powered zoom with enhancement</li>
<li>♿ <strong>Accessibility</strong>: Screen reader compatible overlays</li>
</ul>
</div>
<div class="feature-card">
<h3 class="heading-card mb-2">3. Privacy & Performance</h3>
<p class="text-body mb-4">All processing happens on your device:</p>
<ul style="list-style: none; padding: 0; color: var(--color-text-secondary); line-height: 1.8;">
<li>🔒 <strong>100% Private</strong>: No data leaves your device (by default)</li>
<li>⚡ <strong>WebGPU Powered</strong>: Desktop-class performance in browser</li>
<li>🌐 <strong>Offline Ready</strong>: Works without internet connection</li>
<li>🎚️ <strong>Quality Profiles</strong>: Adjust performance vs quality in Settings</li>
</ul>
</div>
<div class="feature-card">
<h3 class="heading-card mb-2">4. Browser Extension</h3>
<p class="text-body mb-4">Use Ailly on any website:</p>
<ul style="list-style: none; padding: 0; color: var(--color-text-secondary); line-height: 1.8;">
<li>🧩 Load as unpacked extension in Chrome/Edge</li>
<li>🎯 Click the extension icon to activate overlay</li>
<li>⚙️ Settings sync across all tabs</li>
</ul>
<p class="text-caption" style="margin-top: 12px; opacity: 0.6;">See <code>extension/README.md</code>
for installation instructions</p>
</div>
</div>
</section>
<!-- Model Credits -->
<section id="model-credits" class="feature-section">
<h2 class="heading-section mb-6">Model Attribution</h2>
<div class="card card-glow" style="max-width: 800px; margin: 0 auto; padding: var(--space-8);">
<p class="text-body mb-6">Ailly integrates best-in-class open source models for on-device AI:</p>
<div style="display: grid; gap: var(--space-6);">
<div>
<h3 class="heading-card mb-2">🔤 OCR - PaddleOCR</h3>
<p class="text-body mb-2">Multilingual text detection and recognition</p>
<p class="text-caption" style="opacity: 0.6;">
<a href="https://github.com/PaddlePaddle/PaddleOCR" target="_blank"
style="color: var(--color-primary);">PaddlePaddle OCR</a> (Apache-2.0 License)
</p>
</div>
<div>
<h3 class="heading-card mb-2">👁️ Vision - MediaPipe</h3>
<p class="text-body mb-2">Object detection, pose estimation, and hand tracking</p>
<p class="text-caption" style="opacity: 0.6;">
<a href="https://developers.google.com/mediapipe" target="_blank"
style="color: var(--color-primary);">Google MediaPipe</a> (Apache-2.0 License)
</p>
</div>
<div>
<h3 class="heading-card mb-2">🔧 Runtime - ONNX & TensorFlow.js</h3>
<p class="text-body mb-2">WebGPU-accelerated model execution</p>
<p class="text-caption" style="opacity: 0.6;">
<a href="https://onnxruntime.ai/" target="_blank" style="color: var(--color-primary);">ONNX
Runtime</a> +
<a href="https://www.tensorflow.org/js" target="_blank"
style="color: var(--color-primary);">TensorFlow.js</a> (MIT License)
</p>
</div>
<div>
<h3 class="heading-card mb-2">🧠 Cloud Reasoning (Optional)</h3>
<p class="text-body mb-2">Complex scene description via multimodal LLM</p>
<p class="text-caption" style="opacity: 0.6;">
<a href="https://ai.google.dev/gemini-api" target="_blank"
style="color: var(--color-primary);">Google Gemini API</a> (Requires API key + Opt-in)
</p>
</div>
</div>
<div
style="margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--glass-border);">
<p class="text-caption" style="opacity: 0.7; text-align: center;">
Open source contributions are welcome! Visit <a href="https://github.com/ailly-vision/ailly"
target="_blank" style="color: var(--color-accent);">GitHub</a> to contribute.
</p>
</div>
</div>
</section>
<!-- Workbench Launch Pad (Duplicated for easy access) -->
<section class="section text-center">
<div class="card card-glow" style="max-width: 600px; margin: 0 auto;">
<h3 class="heading-card mb-4">Ready for Screen Share?</h3>
<p class="text-body mb-6">Open the Workbench at the top or use shortcuts (S: Screen, W: Webcam).</p>
<button class="btn btn-primary" onclick="window.scrollTo({top: 0, behavior: 'smooth'})">Back to
Workbench</button>
</div>
</section>
</main>
<footer style="padding: var(--space-12) 0; border-top: 1px solid var(--glass-border); text-align: center;">
<p class="text-caption">Ailly Accessibility & Vision reference page. Built with WebGPU.</p>
</footer>
<script type="module" src="/src/main.ts"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.7.0/axe.min.js"></script>
<script>
function showAuditResults(results) {
// Container to hold everything
const wrapper = document.createElement('div');
wrapper.style.position = 'fixed';
wrapper.style.zIndex = '9999';
wrapper.style.inset = '0';
// Backdrop
const backdrop = document.createElement('div');
Object.assign(backdrop.style, {
position: 'absolute',
inset: '0',
background: 'rgba(0,0,0,0.7)',
cursor: 'pointer'
});
backdrop.onclick = () => wrapper.remove();
// Modal
const modal = document.createElement('div');
Object.assign(modal.style, {
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%,-50%)',
background: '#1a1a1e',
border: '1px solid #333',
padding: '2rem',
borderRadius: '12px',
maxWidth: '600px',
width: '90%',
maxHeight: '80vh',
overflow: 'auto',
boxShadow: '0 25px 50px -12px rgba(0,0,0,0.5)',
fontFamily: 'Inter,sans-serif',
color: '#fff'
});
// Content
let contentHtml = '<h2 style="margin-top:0;margin-bottom:1rem;color:#fff;">Accessibility Audit Results</h2>';
if (results.violations.length === 0) {
contentHtml += '<div style="color:#4ade80;font-weight:bold;margin-bottom:1rem;">🎉 No accessibility violations found!</div>';
} else {
contentHtml += `<div style="color:#f87171;font-weight:bold;margin-bottom:1rem;">Found ${results.violations.length} violations:</div>`;
results.violations.forEach(v => {
contentHtml += `<div style="background:#222;padding:1rem;margin-bottom:0.5rem;border-radius:6px;border-left:4px solid ${v.impact === 'critical' ? '#ef4444' : '#f59e0b'}">`;
contentHtml += `<div style="color:#fff;font-weight:600;">${v.id} <span style="opacity:0.6;font-weight:400;font-size:0.9em">(${v.impact})</span></div>`;
contentHtml += `<div style="color:#aaa;font-size:0.9em;margin-top:0.25rem;">${v.description}</div>`;
contentHtml += `<div style="color:#666;font-size:0.8em;margin-top:0.25rem;font-family:monospace;">${v.nodes.length} element(s) affected</div>`;
contentHtml += '</div>';
});
}
modal.innerHTML = contentHtml;
// Close Button
const closeBtn = document.createElement('button');
closeBtn.textContent = 'Close Report';
Object.assign(closeBtn.style, {
marginTop: '1rem',
padding: '0.5rem 1rem',
background: '#3b82f6',
color: 'white',
border: 'none',
borderRadius: '6px',
cursor: 'pointer',
fontWeight: '600'
});
closeBtn.onclick = () => wrapper.remove();
modal.appendChild(closeBtn);
wrapper.appendChild(backdrop);
wrapper.appendChild(modal);
document.body.appendChild(wrapper);
}
async function runA11yCheck() {
console.log("Running Axe Audit...");
try {
const results = await axe.run();
console.log(results);
showAuditResults(results);
} catch (e) {
console.error(e);
alert("Failed to run Axe audit. Check console.");
}
}
// Add Floating Trigger Button
const btn = document.createElement('button');
btn.innerHTML = '♿ Checks';
Object.assign(btn.style, {
position: 'fixed',
bottom: '20px',
right: '20px',
padding: '12px 20px',
background: '#ffffff',
color: '#000000',
border: 'none',
borderRadius: '50px',
fontWeight: '700',
cursor: 'pointer',
zIndex: '10000',
boxShadow: '0 4px 6px -1px rgba(0,0,0,0.1)'
});
btn.onclick = runA11yCheck;
document.body.appendChild(btn);
</script>
</body>
</html>