Skip to content

Commit f49fc5e

Browse files
committed
feat: add aria-required prop
1 parent 7db9935 commit f49fc5e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Select.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const props = withDefaults(
5050
*/
5151
aria?: {
5252
labelledby?: string;
53+
required?: boolean;
5354
};
5455
/**
5556
* A function to get the label of an option. By default, it assumes the option is an
@@ -308,6 +309,7 @@ onBeforeUnmount(() => {
308309
:aria-description="placeholder"
309310
:aria-labelledby="aria?.labelledby"
310311
:aria-label="selectedOptions.length ? selectedOptions.map(getOptionLabel).join(', ') : ''"
312+
:aria-required="aria?.required"
311313
>
312314
<div
313315
v-if="!props.isMulti && selectedOptions[0]"

0 commit comments

Comments
 (0)