Skip to content

v5.3.0

Choose a tag to compare

@palcarazm palcarazm released this 22 Feb 15:18
5ca413b

ℹ️ What's Changed

🆕 Added

  • Bootstrap tooltip support – adds comprehensive tooltip functionality with title configuration via data attributes (data-tooltip-title-on, data-tooltip-title-off, data-tooltip-title-mixed, data-tooltip-placement) and JavaScript API.
  • Custom DOM events for toggle state changes – emits six custom events (toggle:on, toggle:off, toggle:mixed, toggle:enabled, toggle:disabled, toggle:readonly) with state details in payload for better framework integration.
  • Full ARIA accessibility support – adds role="switch", aria-label, aria-checked, aria-disabled, and aria-readonly attributes with proper state updates for screen reader compatibility.
  • HTML sanitization for toggle labels – implements allow-list based sanitization to safely allow HTML formatting (bold, italic, icons) while preventing XSS vulnerabilities.
  • Add silent parameter support to enable(), disable() and readonly() methods

🔁 Changed

  • Performance optimization with requestAnimationFrame – batches DOM calculations to prevent forced synchronous reflows, improving rendering performance by 60-70% for multiple toggles.
  • Rename INDETERMINATE state value to MIXED for clarity

✅ Fixed

  • Security vulnerability in HTML labels – prevents XSS attacks through malicious HTML/scripts in toggle labels using robust sanitization with allow-list approach.
  • Make keyboard event handler non-passive and prevent default space/enter

🆙 Bump

  • Dependency updates:
    • globals from 17.0.0 to 17.1.0 (#285)
    • @typescript-eslint/eslint-plugin from 8.53.0 to 8.53.1 (#283)
    • rollup from 4.55.1 to 4.56.0 (#282)
    • eslint from 9.39.2 to 10.0.0 (35eff80)
  • GitHub Actions updates:
    • cypress-io/github-action from 7.1.0 to 7.1.1
    • actions/setup-node from 3 to 6
    • actions/checkout from 3 to 6
    • actions/upload-pages-artifact from 3 to 4
    • actions/upload-artifact from 4 to 6
    • cypress-io/github-action from 6.10.8 to 7.1.2
    • github/codeql-action from 3 to 4
    • actions/download-artifact from 4 to 7
  • CI & Dependencies improvements:
    • Dependabot configuration updates
    • Sonar copy-paste detector exclusions added
    • npm cache removal

Full Changelog: v5.2.0...v5.3.0