mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(modal): remove close button title
attribute, add aria-hidden
to icons (#1308)
* fix(modal): close button should not have a title * fix(modal): close icon should not have aria-label * fix(modal): close button icons should have `aria-hidden="true"
This commit is contained in:
parent
e1451324cc
commit
cae1f1939e
2 changed files with 7 additions and 14 deletions
|
@ -50,13 +50,16 @@
|
|||
<slot />
|
||||
<button
|
||||
type="button"
|
||||
title="{iconDescription}"
|
||||
aria-label="{iconDescription}"
|
||||
class:bx--modal-close="{true}"
|
||||
class="{closeClass}"
|
||||
on:click
|
||||
on:click="{closeModal}"
|
||||
>
|
||||
<Close size="{20}" class="bx--modal-close__icon {closeIconClass}" />
|
||||
<Close
|
||||
size="{20}"
|
||||
class="bx--modal-close__icon {closeIconClass}"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -222,17 +222,12 @@
|
|||
bind:this="{buttonRef}"
|
||||
type="button"
|
||||
aria-label="{iconDescription}"
|
||||
title="{iconDescription}"
|
||||
class:bx--modal-close="{true}"
|
||||
on:click="{() => {
|
||||
open = false;
|
||||
}}"
|
||||
>
|
||||
<Close
|
||||
size="{20}"
|
||||
aria-label="{iconDescription}"
|
||||
class="bx--modal-close__icon"
|
||||
/>
|
||||
<Close size="{20}" class="bx--modal-close__icon" aria-hidden="true" />
|
||||
</button>
|
||||
{/if}
|
||||
{#if modalLabel}
|
||||
|
@ -248,17 +243,12 @@
|
|||
bind:this="{buttonRef}"
|
||||
type="button"
|
||||
aria-label="{iconDescription}"
|
||||
title="{iconDescription}"
|
||||
class:bx--modal-close="{true}"
|
||||
on:click="{() => {
|
||||
open = false;
|
||||
}}"
|
||||
>
|
||||
<Close
|
||||
size="{20}"
|
||||
aria-label="{iconDescription}"
|
||||
class="bx--modal-close__icon"
|
||||
/>
|
||||
<Close size="{20}" class="bx--modal-close__icon" aria-hidden="true" />
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue