Repository navigation
Added
-
Accessibility (ARIA) Support:
- Added
role="combobox",aria-expanded, andaria-haspopupattributes to the main container for better accessibility. - Added
role="listbox"to the items container. - Added
aria-live="polite"to the selected items container to improve screen reader notifications.
- Added
-
Data Attributes Configuration:
- Added support for the following
data-attributesto configure SnapSelect directly in HTML:data-live-searchdata-max-selectionsdata-placeholderdata-clear-all-buttondata-select-optgroupsdata-select-all-optiondata-close-on-selectdata-allow-empty
- Added support for the following
-
Styling for Optgroup Labels:
- Optgroup labels are now displayed in bold for better visual distinction.
-
Compatibility Polyfills:
- Added a polyfill for
classListto ensure compatibility with older browsers. - Added a polyfill for
addEventListenerto support legacy browsers.
- Added a polyfill for
-
Documentation:
- Added detailed inline comments and JavaScript documentation for all configuration options.
- Created a Markdown documentation file that includes usage instructions, configuration options, and examples.
- Included details on how to use
data-attributesfor configuring SnapSelect.
Changed
- Code Structure:
- Improved the structure and organization of the code to support the new features.
- Refactored the configuration options to prioritize
data-attributesover JavaScript options if both are provided.