From f2b7249c5bea48de061f9bf9a75bf32d3e4bf35c Mon Sep 17 00:00:00 2001 From: Carlos Lopez Jr Date: Sun, 30 Jun 2024 15:36:49 -0400 Subject: [PATCH] fix(input): readonly input on select-one --- components/Input.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/Input.js b/components/Input.js index 92fd4759..79408023 100644 --- a/components/Input.js +++ b/components/Input.js @@ -523,7 +523,7 @@ export default CustomElement }, ariaAutocompleteAttrValue({ _hasListbox, autocompleteList, _isSelect }) { if (!_hasListbox) return null; - if (!_isSelect) return null; + if (_isSelect) return null; if (autocompleteList != null) { return 'both'; } @@ -550,8 +550,9 @@ export default CustomElement control.setAttribute('aria-expanded', '{ariaExpandedAttrValue}'); control.setAttribute('type', '{controlTypeAttrValue}'); control.setAttribute('role', '{controlRoleAttrValue}'); - control.setAttribute('is-select', '{controlIsSelect}'); + control.setAttribute('readonly', '{controlReadonlyAttrValue}'); control.setAttribute('autocomplete', 'off'); + control.setAttribute('is-select', '{controlIsSelect}'); trailingIcon.setAttribute('mdw-if', '{computedTrailingIcon}'); trailingIcon.setAttribute('icon', '{computedTrailingIcon}'); shape.setAttribute('trailing-icon', '{computedTrailingIcon}');