Skip to content

Commit

Permalink
Merge pull request rob-balfre#624 from josdejong/fix/aria_roles
Browse files Browse the repository at this point in the history
fix: rob-balfre#610 resolve ARIA warnings by defining a role on interactive divs
  • Loading branch information
rob-balfre authored Aug 24, 2023
2 parents 1d96a9f + e543416 commit 17fcb46
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib/Select.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,8 @@
on:pointerup|preventDefault={handleClick}
on:mousedown|preventDefault
bind:this={container}
use:floatingRef>
use:floatingRef
role="none">
{#if listOpen}
<div
use:floatingContent
Expand All @@ -697,7 +698,8 @@
on:click|stopPropagation={() => handleItemClick({ item, i })}
on:keydown|preventDefault|stopPropagation
class="list-item"
tabindex="-1">
tabindex="-1"
role="none">
<div
use:activeScroll={{ scroll: isItemActive(item, value, itemId), listDom }}
use:hoverScroll={{ scroll: scrollToHoverItem === i, listDom }}
Expand Down Expand Up @@ -745,7 +747,8 @@
class:active={activeValue === i}
class:disabled
on:click|preventDefault={() => (multiFullItemClearable ? handleMultiItemClear(i) : {})}
on:keydown|preventDefault|stopPropagation>
on:keydown|preventDefault|stopPropagation
role="none">
<span class="multi-item-text">
<slot name="selection" selection={item} index={i}>
{item[label]}
Expand Down

0 comments on commit 17fcb46

Please sign in to comment.