svelecte
svelecte copied to clipboard
Dropdown.svelte & Control.svelte Warning non-interactive element
Hi,
the Dropdown.svelte is throwing a warning:
A11y: visible, non-interactive elements with an on:click event must be accompanied by an on:keydown, on:keyup, or on:keypress event. (227:6)
225: {#if inputValue && creatable && !maxReached}
226: <div class="creatable-row-wrap">
227: <div class="creatable-row" on:click={dispatch('select', inputValue)} on:mouseenter={dispatch('hover', listIndex.last)}
^
228: class:active={currentListLength == dropdownIndex}
229: class:is-disabled={alreadyCreated.includes(inputValue)}
This is because in the element in line 227 there is a role="presentation" Attribute missing:
<div class="creatable-row" role="presentation" on:click={dispatch('select', inputValue)} on:mouseenter={dispatch('hover', listIndex.last)}
is there a way you could please add this?
The Same in Control.svelte Line 68
<div class="sv-control" class:is-active={$hasFocus} class:is-disabled={disabled} role="presentation" ....
thank you :)
T