File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
core/src/components/select Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,11 @@ export class Select implements ComponentInterface {
196196 */
197197 @Prop ( { mutable : true } ) value ?: any | null ;
198198
199+ /**
200+ * If `true`, the user must fill in a value before submitting a form.
201+ */
202+ @Prop ( ) required = false ;
203+
199204 /**
200205 * Emitted when the value has changed.
201206 *
@@ -974,7 +979,7 @@ export class Select implements ComponentInterface {
974979 }
975980
976981 private renderListbox ( ) {
977- const { disabled, inputId, isExpanded } = this ;
982+ const { disabled, inputId, isExpanded, required } = this ;
978983
979984 return (
980985 < button
@@ -983,6 +988,7 @@ export class Select implements ComponentInterface {
983988 aria-label = { this . ariaLabel }
984989 aria-haspopup = "dialog"
985990 aria-expanded = { `${ isExpanded } ` }
991+ aria-required = { `${ required } ` }
986992 onFocus = { this . onFocus }
987993 onBlur = { this . onBlur }
988994 ref = { ( focusEl ) => ( this . focusEl = focusEl ) }
You can’t perform that action at this time.
0 commit comments