-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
596 lines (590 loc) · 32.4 KB
/
index.html
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
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<title>Data Navigator demo</title>
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="application-name" content="Data Navigator demo" />
<meta name="theme-color" content="#21224A" />
<meta
property="og:image"
content="https://repository-images.githubusercontent.com/479978023/fa696c16-4c68-418b-9f28-fa256fff7a47"
/>
<meta property="og:title" content="Data Navigator demo" />
<meta property="og:locale" content="en_US" />
<meta
name="description"
content="A JavaScript library that allows for accessible navigation of data structures."
/>
<meta
property="og:description"
content="A JavaScript library that allows for accessible navigation of data structures."
/>
<link rel="canonical" href="https://dig.cmu.edu/data-navigator/" />
<meta property="og:url" content="https://dig.cmu.edu/data-navigator/" />
<meta property="og:site_name" content="Data Navigator demo" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Data Navigator demo" />
<meta name="twitter:site" content="@frankElavsky" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"description": "A JavaScript library that allows for accessible navigation of data structures.",
"headline": "Data Navigator demo",
"name": "Data Navigator demo",
"url": "https://dig.cmu.edu/data-navigator/"
}
</script>
<link href="./examples/style.css" rel="stylesheet" />
<style>
/* .dn-node {
background: #000;
} */
.dn-test-path {
margin: -2px;
}
.dn-test-path:focus {
border: 2px solid transparent;
outline: transparent solid 2px;
/* outline-offset: 1px; */
}
img {
pointer-events: none;
}
.container {
position: relative;
overflow: hidden;
width: 100%;
padding-top: 56.25%;
}
.responsive-iframe {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<a href="#main" class="skip">skip to main content</a>
<header>
<!-- <nav class="nav"></nav> -->
<h1>Data Navigator demo</h1>
<img
src="https://raw.githubusercontent.com/cmudig/data-navigator/main/assets/data_navigator.png"
alt="Data Navigator provides visualization toolkits with rich, accessible navigation structures, robust input handling, and flexible, semantic rendering."
/>
<p>
This page is a live, interactive application that demos some of the coolest capabilities of our system,
Data Navigator.
</p>
</header>
<main id="main">
<h2>What is Data Navigator?</h2>
<p>
Data Navigator enables designers and developers to render a semantic, navigable structure on top of any
graphic. This structure can be used by a massive variety of different input modalities.
</p>
<p>If you want to learn more or get started, you can</p>
<ul>
<li>
Read our accessible
<a href="https://www.frank.computer/data-navigator/">HTML paper on Data Navigator</a>
</li>
<li>
Check out the code repo for
<a href="https://github.com/cmudig/data-navigator">Data Navigator on GitHub</a>
</li>
<li>
Go and
<a href="https://www.npmjs.com/package/data-navigator?activeTab=readme"
>install Data Navigator from NPM</a
>
</li>
</ul>
<p>
Below is an introductory video, explaining a basic overview of what Data Navigator does, why we made it,
and what we hope our system is used for:
</p>
<div class="container">
<iframe
class="responsive-iframe"
src="https://www.youtube-nocookie.com/embed/-vl982QjVQ0?si=MXAb-VPHpAaLeVw6&cc_lang_pref=en&cc_load_policy=1"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen
></iframe>
</div>
<h2>Demo</h2>
<p>
In this demo, you can use a bunch of different input modalities to navigate the data structure of a png
image of a chart.
</p>
<p>The core 3 subsystems within Data Navigator are Structure, Input, and Rendering:</p>
<ul>
<li>The structure is bespoke but mostly follows common patterns.</li>
<li>You can use a lot of different inputs!</li>
<li>
The chart itself is just a png image. The rendered elements (when you navigate) are semantic HTML
with custom visuals.
</li>
</ul>
<h3>Overall instructions and commands</h3>
<p>You will need to "enter" Data Navigator's structure before you can begin navigating.</p>
<p>
The details of every input command are outlined below, however note that each input modality specifies
these commands in different ways (see each section for more details):
</p>
<div>
<details>
<summary>View commands:</summary>
<table class="table" data-header="header">
<thead class="thead">
<tr class="t-row">
<th class="t-column" scope="col">Command</th>
<th class="t-column" scope="col">Result</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="t-row">
<th scope="row" class="cell">Enter</th>
<td class="cell">
Enter the interface. (You must enter the interface before using any other command.)
</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Exit</th>
<td class="cell">Exit the interface.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Right</th>
<td class="cell">Move right (across teams).</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Left</th>
<td class="cell">Move left (across teams).</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Up</th>
<td class="cell">Move up (across legend items or between title/legend/axes).</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Down</th>
<td class="cell">Move down (across legend items or between title/legend/axes).</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Child</th>
<td class="cell">Drill into the x axis, legend, or childmost elements.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Parent</th>
<td class="cell">Drill out toward the x axis.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Legend</th>
<td class="cell">Drill out toward the legend.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Previous/Undo</th>
<td class="cell">Move to a previous position.</td>
</tr>
</tbody>
</table>
</details>
</div>
<h3>Keyboard, screen reader, touch, and mouse-drag</h3>
<details>
<summary>Show section</summary>
<div>
<details>
<summary>View keyboard and desktop screen reader controls:</summary>
<table class="table" data-header="header">
<thead class="thead">
<tr class="t-row">
<th class="t-column" scope="col">Command</th>
<th class="t-column" scope="col">Expected input</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="t-row">
<th scope="row" class="cell">Enter</th>
<td class="cell">Click the "Enter navigation area" button.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Exit</th>
<td class="cell"><kbd>ESC</kbd> key.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Right</th>
<td class="cell"><kbd>→</kbd> (right arrow key).</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Left</th>
<td class="cell"><kbd>←</kbd> (left arrow key).</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Up</th>
<td class="cell"><kbd>↑</kbd> (up arrow key).</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Down</th>
<td class="cell"><kbd>↓</kbd> (down arrow key).</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Child</th>
<td class="cell"><kbd>ENTER</kbd> key.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Parent</th>
<td class="cell"><kbd>BACKSPACE</kbd> key.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Legend</th>
<td class="cell"><kbd>L</kbd> key.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Previous/Undo</th>
<td class="cell"><kbd>.</kbd> (period) key.</td>
</tr>
</tbody>
</table>
</details>
</div>
<div>
<details>
<summary>View mobile screen reader, touch, and mouse-drag controls:</summary>
<table class="table" data-header="header">
<thead class="thead">
<tr class="t-row">
<th class="t-column" scope="col">Command</th>
<th class="t-column" scope="col">Expected input</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="t-row">
<th scope="row" class="cell">Enter</th>
<td class="cell">
Long press and release on the chart area or click the "Enter navigation area"
button.
</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Exit</th>
<td class="cell">
Long press and release on the chart area (if you have entered already).
</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Right</th>
<td class="cell">→ Press and swipe right.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Left</th>
<td class="cell">← Press and swipe left.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Up</th>
<td class="cell">↑ Press and swipe up.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Down</th>
<td class="cell">↓ Press and swipe down.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Child</th>
<td class="cell">↘ Press and swipe down and to the right.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Parent</th>
<td class="cell">↖ Press and swipe up and to the left.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Legend</th>
<td class="cell">↗ Press and swipe up and to the right.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Previous/Undo</th>
<td class="cell">↙ Press and swipe up and to the right.</td>
</tr>
</tbody>
</table>
</details>
</div>
</details>
<h3>Text and speech</h3>
<details>
<summary>Show section</summary>
<div>
<div>
<details>
<summary>View text and speech controls:</summary>
<p>
All of the commands from the previous section (Overall Commands) can simply be typed
into the text input or spoken using the button. For example:
</p>
<table class="table" data-header="header">
<thead class="thead">
<tr class="t-row">
<th class="t-column" scope="col">Command</th>
<th class="t-column" scope="col">Expected input</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="t-row">
<th scope="row" class="cell">Enter</th>
<td class="cell">"Enter" "enter" and "EnTeR" are all valid.</td>
</tr>
</tbody>
</table>
</details>
</div>
<div class="row">
<div class="column left">
<p>
Issue a text command:
<span
><form id="form">
<input type="text" id="textCommand" /><input id="submit" type="submit" /></form
></span>
</p>
</div>
<div class="column right limited">
<p>Speak a single-word command:</p>
<button id="enableSpeech">Issue voice command</button>
<p class="alert" id="alert"></p>
</div>
</div>
</div>
</details>
<h3>Gesture</h3>
<details>
<summary>Show section</summary>
<div>
<p>
The gesture control model is heavy, so we only load it if you want to try it. Click "Load
Gesture Model" to load it and then activate the model with "Open Webcam" (it will need access to
your camera).
</p>
<div>
<details>
<summary>View gesture controls:</summary>
<p>
Close your hand to set the gesture center (marked by an 👊 emoji on the camera
space). When ready, you can open your hand or point in a direction to move. Close your
hand again to set the gesture center for a new gesture (and repeat).
</p>
<p>
The model is slow and isn't very smart, so you will need to exaggerate your movement
distances and hold your gesture for about a second. It fails often (apologies).
</p>
<table class="table" data-header="header">
<thead class="thead">
<tr class="t-row">
<th class="t-column" scope="col">Command</th>
<th class="t-column" scope="col">Expected input</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="t-row">
<th scope="row" class="cell">Enter</th>
<td class="cell">🖐 Open your hand, facing the camera.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Exit</th>
<td class="cell">
🖐 Open your hand, facing the camera (once already entered).
</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Right</th>
<td class="cell">👉 Point right of your gesture center.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Left</th>
<td class="cell">👈 Point left of your gesture center.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Up</th>
<td class="cell">☝ Point above your gesture center.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Down</th>
<td class="cell">👇 Point below your gesture center.</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Child</th>
<td class="cell">
👇 👉 Point below and to the right of your gesture center.
</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Parent</th>
<td class="cell">
☝ 👈 Point above and to the left of your gesture center.
</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Legend</th>
<td class="cell">
☝ 👉 Point above and to the right of your gesture center.
</td>
</tr>
<tr class="t-row">
<th scope="row" class="cell">Previous/Undo</th>
<td class="cell">
👇 👈 Point below and to the left of your gesture center.
</td>
</tr>
</tbody>
</table>
</details>
</div>
<button id="loadModel">Load Gesture Model</button>
<br />
<button id="openWebcam" disabled>Open Webcam</button>
<br />
<button id="closeWebcam" disabled>Close Model</button>
<br /><br />
<div id="status" class="hidden">
<p>Ready for a command? <span id="ready">No. Try closing your hand.</span></p>
<p>Command used: <span id="command">(none yet)</span></p>
</div>
<div class="video-wrapper">
<video class="videobox canvasbox" autoplay="autoplay" id="feed"></video>
<canvas id="canvas" class="border canvasbox hidden"></canvas>
<div id="fist">👊</div>
</div>
</div>
</details>
<br />
<div class="wrapper">
<div id="root" class="wrapper">
<img
id="chart"
src="./assets/static.png"
alt="Major trophies for some English teams. Stacked bar chart."
/>
</div>
<div id="tooltip" role="presentation" class="tooltip hidden" focusable="false"></div>
</div>
<h2>Why make Data Navigator?</h2>
<p>
Modern data visualization accessibility faces 3 challenges in design and development that we wanted to
help practitioners and researchers tackle:
</p>
<ol>
<li>
Navigable structure is hard to build for data visualizations. Structure is important for
understanding and usability but is often ignored.
</li>
<li>
Only mouse input is treated well (with sporadic support for touch or screen reader input). Many
other input modalities are unaddressed!
</li>
<li>
Visualizations are often rendered as semantic-less SVG or raster (pngs, canvas, etc). If semantics
are added at all they end up using low-level SVG, which is often not appropriate. Semantics help
understanding and add functional interactivity.
</li>
</ol>
<h2>Advantages of Data Navigator</h2>
<p>
Data Navigator uses a graph-based infrastructure, comprised of nodes and edges. This allows us to do two
really interesting things: create almost any other possible structure (list, hierarchy, spatial,
network, etc) and prioritize direct relationships among data points. This underlying infrastructure is
different from HTML's, which prioritizes hierarchies and not direct relationships.
</p>
<p>
It might seem like anarchy to design a low-level building block like this, but this is actually
philosophically more empowering: designers and developers can add the structure and order that make the
most sense for what they are doing, rather than try to make everything fit into a hierarchy.
</p>
<p>
Data Navigator allows designers and developers to express both rich and unique structures in ways that
can handle making an entire library of charts more accessible or even take on unaddressed or bespoke
visualizations.
</p>
<p>
And navigation of a structure can also be built to fit: Data Navigator abstracts navigation rules into
namespaces, like "commands." Commands can be entirely customized to suit the needs of the structure they
support. The advantage of this abstraction is that Data Navigator can be made to work with nearly any
input modality as long as input is validated and converted into an existing command.
</p>
<p>
And lastly, Data Navigator can create an accessible rendering layer (using semantic HTML) on top of any
existing visuals (or no visuals at all). This approach lets designers and developers fully control how
navigation looks and feels for both screen readers and other input modalities without relying on
whatever was used to render the original visualization (SVG, png, canvas, etc). This means that
interactive elements in a visualization can be real "button" elements and not an SVG rectangle made from
scratch to emulate a button.
</p>
</main>
<footer>
<h3>
Cite our paper
<button id="bib-copy" class="bib" href="#" title="Copy to clipboard" aria-label="Copy to clipboard">
<span class="far fa-copy">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<!--! Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
<path
d="M208 0H332.1c12.7 0 24.9 5.1 33.9 14.1l67.9 67.9c9 9 14.1 21.2 14.1 33.9V336c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48zM48 128h80v64H64V448H256V416h64v48c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V176c0-26.5 21.5-48 48-48z"
/>
</svg>
</span>
</button>
<span aria-live="polite" id="copy-announcer"></span>
<!-- <a id="bib-download" class="bib" href="data:text/plain;charset=utf-8,%40article%7B2023-elavsky-data-navigator%2C%0A%20%20title%20%3D%20%7B%7BRich%20Screen%20Reader%20Experiences%20for%20Accessible%20Data%20Visualization%7D%7D%2C%0A%20%20author%20%3D%20%7BJonathan%20Zong%20AND%20Crystal%20Lee%20AND%20Alan%20Lundgard%20AND%20JiWoong%20Jang%20AND%20Daniel%20Hajas%20AND%20Arvind%20Satyanarayan%7D%2C%0A%20%20journal%20%3D%20%7BComputer%20Graphics%20Forum%20(Proc.%20EuroVis)%7D%2C%0A%20%20year%20%3D%20%7B2022%7D%2C%0A%20%20doi%20%3D%20%7B10.1111%2Fcgf.14519%7D%2C%0A%20%20url%20%3D%20%7Bhttp%3A%2F%2Fvis.csail.mit.edu%2Fpubs%2Frich-screen-reader-vis-experiences%7D%0A%7D" title="Download Bibtex" download="rich-screen-reader-vis-experiences.bib"><i class="far fa-arrow-alt-circle-down" aria-hidden="true"></i></a> -->
</h3>
<pre focusable="true" tabindex="0"><code id="bibtex">
@article{2023-elavsky-data-navigator,
title = {{Data Navigator}: An Accessibility-Centered Data Navigation Toolkit},
publisher = {{IEEE}},
author = {Frank Elavsky and Lucas Nadolskis and Dominik Moritz},
journal = {{IEEE} Transactions on Visualization and Computer Graphics},
year = {2023},
url = {http://dig.cmu.edu/data-navigator/}
}
</code></pre>
<br />
<p>
See a bug in this demo?
<a href="https://github.com/cmudig/data-navigator/issues">Give us feedback on GitHub!</a>
</p>
</footer>
<script src="https://hammerjs.github.io/dist/hammer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/handtrackjs@latest/dist/handtrack.min.js"></script>
<script src="app/static-bundle.js"></script>
<script>
// taken from the wonderful folks at MIT Vis Lab
// https://vis.csail.mit.edu/pubs/rich-screen-reader-vis-experiences/
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('bib-copy').addEventListener('click', function (evt) {
const announce = document.getElementById('copy-announcer');
const setText = txt => () => {
announce.innerText = txt;
window.setTimeout(() => (announce.innerText = ''), 1500);
};
console.log(bibtex);
navigator.permissions
.query({
name: 'clipboard-write'
})
.then(result => {
if (result.state == 'granted' || result.state == 'prompt') {
navigator.clipboard
.writeText(bibtex.innerText)
.then(setText(' Copied!'), setText(' Failed.'));
}
});
});
});
</script>
</body>
</html>