select

Better select widgets in vanilla javascript.  https://p.ce9e.org/select/demo/
git clone https://git.ce9e.org/select.git

commit
36c44eb349c4581cc9b554103bdc0f64d6e758f9
parent
d2c8b4fa3103a5dc623eb16fe73daccbe7916bbb
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2025-08-28 05:32
fix aria-expanded on input element

fixup 74b15310552e80bf48b435e075e2a185e0f46166

Diffstat

M select.js 4 ++--

1 files changed, 2 insertions, 2 deletions


diff --git a/select.js b/select.js

@@ -86,11 +86,11 @@ export class Select {
   86    86 				li.classList.toggle('select--selected', this.original.multiple && op.selected);
   87    87 				li.setAttribute('aria-selected', op.selected);
   88    88 			});
   89    -1 			this.wrapper.setAttribute('aria-expanded', 'true');
   -1    89 			this.input.setAttribute('aria-expanded', 'true');
   90    90 			this.input.setAttribute('aria-activedescendant', options[this.focus].id);
   91    91 			options[this.focus].scrollIntoView({block: 'nearest'});
   92    92 		} else {
   93    -1 			this.wrapper.setAttribute('aria-expanded', 'false');
   -1    93 			this.input.setAttribute('aria-expanded', 'false');
   94    94 			this.input.setAttribute('aria-activedescendant', '');
   95    95 		}
   96    96 	}