Skip to content

v.0.0.3

Latest

Choose a tag to compare

@eveltic eveltic released this 10 Aug 17:04
7328b67

Added

  • Accessibility (ARIA) Support:

    • Added role="combobox", aria-expanded, and aria-haspopup attributes 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.
  • Data Attributes Configuration:

    • Added support for the following data-attributes to configure SnapSelect directly in HTML:
      • data-live-search
      • data-max-selections
      • data-placeholder
      • data-clear-all-button
      • data-select-optgroups
      • data-select-all-option
      • data-close-on-select
      • data-allow-empty
  • Styling for Optgroup Labels:

    • Optgroup labels are now displayed in bold for better visual distinction.
  • Compatibility Polyfills:

    • Added a polyfill for classList to ensure compatibility with older browsers.
    • Added a polyfill for addEventListener to support legacy browsers.
  • 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-attributes for 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-attributes over JavaScript options if both are provided.