From ef32bfb2788d98fe8bdab917e802a43cc31fc946 Mon Sep 17 00:00:00 2001
From: Nolan Lawson <nolan@nolanlawson.com>
Date: Tue, 4 Dec 2018 22:31:46 -0800
Subject: [PATCH] fix(a11y): fix a11y issues caught by lighthouse (#729)

---
 routes/_components/IconButton.html           | 6 +++---
 routes/_components/LazyImage.html            | 2 +-
 routes/_components/NonAutoplayImg.html       | 3 ++-
 routes/_components/compose/ComposeInput.html | 4 ++++
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/routes/_components/IconButton.html b/routes/_components/IconButton.html
index 8591cd49..ff7d65e3 100644
--- a/routes/_components/IconButton.html
+++ b/routes/_components/IconButton.html
@@ -2,7 +2,7 @@
   <button type="button"
           title={label}
           aria-label={label}
-          aria-pressed={pressable ? !!pressed : ''}
+          aria-pressed={pressable ? !!pressed : void 0}
           class={computedClass}
           {disabled}
           delegate-key={delegateKey}
@@ -15,7 +15,7 @@
   <button type="button"
           title={label}
           aria-label={label}
-          aria-pressed={pressable ? !!pressed : ''}
+          aria-pressed={pressable ? !!pressed : void 0}
           class={computedClass}
           focus-key={focusKey || ''}
           {disabled}
@@ -141,4 +141,4 @@
       }
     }
   }
-</script>
\ No newline at end of file
+</script>
diff --git a/routes/_components/LazyImage.html b/routes/_components/LazyImage.html
index 1c818fef..857986b6 100644
--- a/routes/_components/LazyImage.html
+++ b/routes/_components/LazyImage.html
@@ -33,7 +33,7 @@
       width: void 0,
       height: void 0,
       className: '',
-      ariaHidden: '',
+      ariaHidden: false,
       alt: '',
       title: ''
     }),
diff --git a/routes/_components/NonAutoplayImg.html b/routes/_components/NonAutoplayImg.html
index 58e461d2..d47ee265 100644
--- a/routes/_components/NonAutoplayImg.html
+++ b/routes/_components/NonAutoplayImg.html
@@ -48,7 +48,8 @@
       alt: '',
       title: '',
       mouseOver: false,
-      loaded: false
+      loaded: false,
+      ariaHidden: false
     }),
     computed: {
       computedClass: ({ className, src, staticSrc, isLink }) => (classname(
diff --git a/routes/_components/compose/ComposeInput.html b/routes/_components/compose/ComposeInput.html
index 925c907f..50b198ed 100644
--- a/routes/_components/compose/ComposeInput.html
+++ b/routes/_components/compose/ComposeInput.html
@@ -1,4 +1,5 @@
 <textarea
+  id="the-compose-box-input-{realm}"
   class="compose-box-input"
   placeholder="What's on your mind?"
   ref:textarea
@@ -8,6 +9,9 @@
   on:selectionChange="onSelectionChange(event)"
   on:keydown="onKeydown(event)"
 ></textarea>
+<label for="the-compose-box-input-{realm}" class="sr-only">
+  What's on your mind?
+</label>
 <style>
   .compose-box-input {
     grid-area: input;