fix: fix aria-hidden on hidden icons (#957)

This commit is contained in:
Nolan Lawson 2019-02-09 19:05:59 -08:00 committed by GitHub
parent 2884955d67
commit 56f5a45221
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View file

@ -3,6 +3,7 @@
title={label} title={label}
aria-label={label} aria-label={label}
aria-pressed={pressable ? !!pressed : void 0} aria-pressed={pressable ? !!pressed : void 0}
aria-hidden={ariaHidden}
class={computedClass} class={computedClass}
{disabled} {disabled}
delegate-key={delegateKey} delegate-key={delegateKey}
@ -16,6 +17,7 @@
title={label} title={label}
aria-label={label} aria-label={label}
aria-pressed={pressable ? !!pressed : void 0} aria-pressed={pressable ? !!pressed : void 0}
aria-hidden={ariaHidden}
class={computedClass} class={computedClass}
focus-key={focusKey || ''} focus-key={focusKey || ''}
{disabled} {disabled}
@ -117,7 +119,8 @@
pressed: false, pressed: false,
className: void 0, className: void 0,
delegateKey: void 0, delegateKey: void 0,
sameColorWhenPressed: false sameColorWhenPressed: false,
ariaHidden: false
}), }),
store: () => store, store: () => store,
computed: { computed: {

View file

@ -29,6 +29,7 @@
className="media-control-button media-control-button-dummy-spacer" className="media-control-button media-control-button-dummy-spacer"
href="#fa-search" href="#fa-search"
label="" label=""
ariaHidden={true}
/> />
{/if} {/if}
{#if dots.length > 1} {#if dots.length > 1}

View file

@ -8,6 +8,7 @@
label="Zoom out" label="Zoom out"
href="#fa-search-minus" href="#fa-search-minus"
on:click="zoomOut()" on:click="zoomOut()"
ariaHidden={disabled}
/> />
<IconButton <IconButton
className="pinch-zoom-button pinch-zoom-button-zoom-in" className="pinch-zoom-button pinch-zoom-button-zoom-in"
@ -15,6 +16,7 @@
label="Zoom in" label="Zoom in"
href="#fa-search-plus" href="#fa-search-plus"
on:click="zoomIn()" on:click="zoomIn()"
ariaHidden={disabled}
/> />
</div> </div>
<style> <style>