Skip to content

Commit c283b12

Browse files
Mahmoud-zinoMahmoud-zinoendigo9740
authored
bugfix: input chip select aria (#2445)
Co-authored-by: Mahmoud-zino <[email protected]> Co-authored-by: Chris Simmons <[email protected]>
1 parent 5a78c5c commit c283b12

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/real-cougars-invent.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@skeletonlabs/skeleton": patch
3+
---
4+
5+
bugfix: added `label` prop to provide aria-label on inputChip.

packages/skeleton/src/lib/components/InputChip/InputChip.svelte

+5-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
/** Provide arbitrary classes to style the input field region. */
8787
export let regionInput: CssClasses = '';
8888
89+
// Props (A11y)
90+
/** Provide the ARIA label for the select input. */
91+
export let label = 'Chips select';
92+
8993
// Props (transition)
9094
/**
9195
* Enable/Disable transitions
@@ -241,7 +245,7 @@
241245
<div class="input-chip {classesBase}" class:opacity-50={$$restProps.disabled}>
242246
<!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
243247
<div class="h-0 overflow-hidden">
244-
<select bind:this={selectElement} bind:value {name} multiple {required} tabindex="-1">
248+
<select bind:this={selectElement} bind:value {name} multiple {required} aria-label={label} tabindex="-1">
245249
<!-- NOTE: options are required! -->
246250
{#each value as option}<option value={option}>{option}</option>{/each}
247251
</select>

0 commit comments

Comments
 (0)