Skip to content

Commit 04de636

Browse files
committed
fix: avoid a11y errors
1 parent b8312c7 commit 04de636

File tree

45 files changed

+164
-140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+164
-140
lines changed

components/Alert/src/index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
{/if}
102102
</div>
103103
{#if closable}
104-
<div bind:this={closeRef} class={closeCls} aria-hidden="true" on:click={onClose}>
104+
<div bind:this={closeRef} class={closeCls} on:click={onClose}>
105105
<slot name="close">
106106
<KIcon cls="inline-flex" icon={closeIcon} width="16px" height="16px"></KIcon>
107107
</slot>

components/AutoComplete/src/index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
width={triggerWidth}
171171
placement="bottom"
172172
>
173-
<div class={cname} {...attrs} slot="triggerEl" bind:this={inputSelectRef} aria-hidden="true">
173+
<div class={cname} {...attrs} slot="triggerEl" bind:this={inputSelectRef} >
174174
<KInput
175175
bind:this={inputRef}
176176
on:input={handleInput}

components/Backtop/src/index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
class={cnames}
9292
style:right={backTopStyle.right}
9393
style:bottom={backTopStyle.bottom}
94-
aria-hidden="true"
94+
9595
on:click|stopPropagation={handleClick}
9696
{...$$restProps}
9797
{...attrs}

components/Button/src/index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
bind:this={btnRef}
123123
style="border-radius: {round ? `${round}` : '4'}px; font-size: {iconSizeInner}px"
124124
class={cnames}
125-
aria-hidden="true"
125+
126126
on:click={handleClick}
127127
{...attrsInner}
128128
{...$$restProps}

components/Carousel/__test__/fixture/custom.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<div
2323
class={itemCls(item, activeIndex)}
2424
role="button"
25-
aria-hidden="true"
25+
2626
on:mouseenter={() => hoverJump(item)}
2727
on:click={() => clickJump(item)}
2828
></div>
@@ -33,7 +33,7 @@
3333
<div slot="arrow" class="flex" let:show let:loop let:onChange let:defaultPageIndex let:count>
3434
<KCarouselArrow {show} {loop} {defaultPageIndex} on:change={onChange} {count}>
3535
<div
36-
aria-hidden="true"
36+
3737
class="ml-10px cursor-pointer"
3838
slot="prev"
3939
let:gotoPrev
@@ -42,7 +42,7 @@
4242
🏀
4343
</div>
4444
<div
45-
aria-hidden="true"
45+
4646
class="mr-10px cursor-pointer"
4747
slot="next"
4848
let:gotoNext

components/Carousel/src/arrow.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
out:fly={{ duration: 500, x: -10 }}
6363
in:fly={{ duration: 500, x: -10 }}
6464
class={prevCls}
65-
aria-hidden="true"
65+
6666
on:click={gotoPrev}
6767
>
6868
<KIcon icon="i-carbon-chevron-left" width="16px" height="16px" />
@@ -76,7 +76,7 @@
7676
out:fly={{ duration: 500, x: 10 }}
7777
in:fly={{ duration: 500, x: 10 }}
7878
class={nextCls}
79-
aria-hidden="true"
79+
8080
on:click={gotoNext}
8181
>
8282
<KIcon icon="i-carbon-chevron-right" width="16px" height="16px" />

components/Carousel/src/index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
</script>
170170

171171
<div
172-
aria-hidden="true"
172+
173173
on:mouseenter={handleMouseenter}
174174
on:mouseleave={handleMouseleave}
175175
class={cnames}

components/Collapse/src/index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
</script>
115115

116116
<div class={clsInner} {...attrs}>
117-
<div class={cnames} on:click={showContent} aria-hidden="true">
117+
<div class={cnames} on:click={showContent} >
118118
<slot name="title">
119119
{title}
120120
</slot>

components/ColorPicker/src/index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
<span class={titleCls}>{title}</span>
318318
</slot>
319319
{#if allowClear}
320-
<div class={clearClsx} aria-hidden="true" on:click={handleClear}></div>
320+
<div class={clearClsx} on:click={handleClear}></div>
321321
{/if}
322322
</div>
323323
<div>

components/ColorPicker/src/palette.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@
138138
</script>
139139

140140
<div
141+
role="toolbar"
142+
tabindex="-1"
141143
class={cnames}
142-
aria-hidden="true"
143144
on:mousedown|preventDefault={handleMousedown}
144145
on:mouseup|preventDefault={handleMouseup}
145146
bind:this={containerElement}
@@ -151,7 +152,6 @@
151152
class={pointerCls}
152153
style:left={dragLeft}
153154
style:top={dragTop}
154-
aria-hidden="true"
155155
bind:this={dragElement}
156156
></div>
157157
</div>

0 commit comments

Comments
 (0)