Skip to content

Missing ARIA role warnings with Svelte 4 #610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stephenlrandall opened this issue Jun 27, 2023 · 4 comments · Fixed by #624
Closed

Missing ARIA role warnings with Svelte 4 #610

stephenlrandall opened this issue Jun 27, 2023 · 4 comments · Fixed by #624
Labels
enhancement New feature or request
Milestone

Comments

@stephenlrandall
Copy link
Contributor

Svelte 4 now complains about missing ARIA roles, which svelte-select seems to have in three places (seen when building):

[vite-plugin-svelte] /node_modules/.pnpm/svelte-select@5.6.1/node_modules/svelte-select/Select.svelte:694:20 A11y: <div> with mouseover, click, keydown handlers must have an ARIA role
692:             {:else if filteredItems.length > 0}
693:                 {#each filteredItems as item, i}
694:                     <div
                         ^
695:                         on:mouseover={() => handleHover(i)}
696:                         on:focus={() => handleHover(i)}

[vite-plugin-svelte] /node_modules/.pnpm/svelte-select@5.6.1/node_modules/svelte-select/Select.svelte:743:20 A11y: <div> with click, keydown handlers must have an ARIA role
741:             {#if multiple}
742:                 {#each value as item, i}
743:                     <div
                         ^
744:                         class="multi-item"
745:                         class:active={activeValue === i}

[vite-plugin-svelte] /node_modules/.pnpm/svelte-select@5.6.1/node_modules/svelte-select/Select.svelte:669:0 A11y: <div> with mousedown handler must have an ARIA role
667: <svelte:window on:click={handleClickOutside} on:keydown={handleKeyDown} />
668: 
669: <div
     ^
670:     class="svelte-select {containerClasses}"
671:     class:multi={multiple}
@rob-balfre rob-balfre added the enhancement New feature or request label Jun 27, 2023
@rob-balfre rob-balfre added this to the v6 milestone Jul 14, 2023
@josdejong
Copy link
Contributor

@rob-balfre can I create a small PR suppressing these three warnings as a temporary measure?

I guess v6 will take time before it is ready (#611).

@rob-balfre
Copy link
Owner

Sure!

@josdejong
Copy link
Contributor

Ok I will do that somewhere this week.

@josdejong
Copy link
Contributor

I made a PR to fix these warnings: #624

rob-balfre added a commit that referenced this issue Aug 24, 2023
fix: #610 resolve ARIA warnings by defining a role on interactive divs
@Ennoriel Ennoriel mentioned this issue Aug 26, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants