fix(a11y): fix a11y issues caught by lighthouse (#729)

This commit is contained in:
Nolan Lawson 2018-12-04 22:31:46 -08:00 committed by GitHub
parent 03d883423c
commit ef32bfb278
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 5 deletions

View file

@ -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}

View file

@ -33,7 +33,7 @@
width: void 0,
height: void 0,
className: '',
ariaHidden: '',
ariaHidden: false,
alt: '',
title: ''
}),

View file

@ -48,7 +48,8 @@
alt: '',
title: '',
mouseOver: false,
loaded: false
loaded: false,
ariaHidden: false
}),
computed: {
computedClass: ({ className, src, staticSrc, isLink }) => (classname(

View file

@ -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;