Skip to content

Commit 7a0d031

Browse files
committed
Oh! Canvas and SVG don't support alt. Alright, let's try this.
1 parent 4b3efd5 commit 7a0d031

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

content/index.html

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ <h4>Multiplayer</h4>
3232
</p>
3333
</div>
3434

35-
<svg class="chop multiplayer" width="352" height="540" viewBox="0 28 352 540" alt="As we progress down the page, we'll see several pieces of a detailed illustration showing the behaviour of Automerge. In this first image, two users collaborate, swapping changes back and forth, always converging on a consistent result.">
35+
<svg class="chop multiplayer" width="352" height="540" viewBox="0 28 352 540">
36+
<title>Multiplayer</title>
37+
<desc>As we progress down the page, we'll see several pieces of a detailed illustration showing the behaviour of Automerge. In this first image, two users collaborate, swapping changes back and forth, always converging on a consistent result.</desc>
3638
<use href="#multiplayer-2" />
3739
</svg>
3840

@@ -50,7 +52,9 @@ <h4>Offline</h4>
5052
</svg>
5153
</div>
5254

53-
<svg class="chop offline" width="350" height="540" viewBox="240 28 350 540" alt="In this next illustration, another user works offline, their changes queuing up.">
55+
<svg class="chop offline" width="350" height="540" viewBox="240 28 350 540">
56+
<title>Offline</title>
57+
<desc>In this next illustration, another user works offline, their changes queuing up.</desc>
5458
<use href="#offline" />
5559
</svg>
5660

@@ -59,7 +63,9 @@ <h4>Consistent</h4>
5963
<p>When users make overlapping edits, Automerge performs a consistent merge that prevents data loss, and gives you tools to control the outcome.</p>
6064
</div>
6165

62-
<svg class="chop consistent" width="452" height="670" viewBox="30 540 452 670" alt="The third illustration — the offline user reconnects, and all three users sync their changes. Everyone converges on the same result.">
66+
<svg class="chop consistent" width="452" height="670" viewBox="30 540 452 670">
67+
<title>Sync</title>
68+
<desc>The third illustration — the offline user reconnects, and all three users sync their changes. Everyone converges on the same result.</desc>
6369
<use href="#conflict_free-2" />
6470
</svg>
6571

@@ -68,7 +74,9 @@ <h4>Versioned</h4>
6874
<p>Automerge remembers every change. Branch fearlessly, experiment boldly. Your document's entire history lives locally, ready when you need it.</p>
6975
</div>
7076

71-
<svg class="chop versioned" width="512" height="580" viewBox="0 1080 512 580" alt="In this illustration, an exploded view of an Automerge doc, represented by a grid of diamonds nested within a larger grid of diamonds, all connected by lines that suggest branching and merging.">
77+
<svg class="chop versioned" width="512" height="580" viewBox="0 1080 512 580">
78+
<title>Inside</title>
79+
<desc>In this illustration, an exploded view of an Automerge doc, represented by a grid of diamonds nested within a larger grid of diamonds, all connected by lines that suggest branching and merging.</desc>
7280
<use href="#versioned-2" />
7381
<use href="#changeset-8">
7482
</svg>
@@ -78,7 +86,9 @@ <h4>Compact</h4>
7886
<p>Automerge supports millions of changes in a single doc. It uses a compressed columnar store on disk and in memory.</p>
7987
</div>
8088

81-
<svg class="chop compact" width="420" height="276" viewBox="0 0 700 460" alt="The final illustration. The document is squished down to a small size, thanks to memory compression.">
89+
<svg class="chop compact" width="420" height="276" viewBox="0 0 700 460">
90+
<title>Compressed</title>
91+
<desc>The final illustration. The document is squished down to a small size, thanks to memory compression.</desc>
8292
<g transform="rotate(-90) translate(-484, -1150)">
8393
<use href="#compact" />
8494
<use href="#changeset-8" transform="translate(256, 1380) scale(7) translate(-256 -1120)">

content/index/dithering.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const setupDitherFor = (elm, img) => {
22
const aspect = img.naturalHeight / img.naturalWidth
33
const canvas = document.createElement("canvas")
44
const ctx = canvas.getContext("2d", { willReadFrequently: true })
5+
canvas.innerText = img.alt
56
elm.prepend(canvas)
67
let width = 0
78

0 commit comments

Comments
 (0)