v5.3.0
ℹ️ 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.- by @palcarazm
- implements #215
- in ad415db
- 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.- by @palcarazm
- implements #233
- in ba955f9
- 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.
- by @palcarazm
- implements #232
- in 0e104e7
- HTML sanitization for toggle labels – implements allow-list based sanitization to safely allow HTML formatting (bold, italic, icons) while preventing XSS vulnerabilities.
- by @palcarazm
- implements security enhancement
- in 26f3125
- Add silent parameter support to
enable(),disable()andreadonly()methods- by @palcarazm
- implements #289
- in commit adddb35
🔁 Changed
- Performance optimization with requestAnimationFrame – batches DOM calculations to prevent forced synchronous reflows, improving rendering performance by 60-70% for multiple toggles.
- by @palcarazm
- implements #258
- in 68003ad
- Rename
INDETERMINATEstate value toMIXEDfor clarity- by @palcarazm
- implements #288
- in commit 0594a81
✅ Fixed
- Security vulnerability in HTML labels – prevents XSS attacks through malicious HTML/scripts in toggle labels using robust sanitization with allow-list approach.
- by @palcarazm
- fixes #257
- in 26f3125
- Make keyboard event handler non-passive and prevent default space/enter
- by @palcarazm
- fixes #287
- in commit 414a6ac
🆙 Bump
- Dependency updates:
- GitHub Actions updates:
cypress-io/github-actionfrom 7.1.0 to 7.1.1actions/setup-nodefrom 3 to 6actions/checkoutfrom 3 to 6actions/upload-pages-artifactfrom 3 to 4actions/upload-artifactfrom 4 to 6cypress-io/github-actionfrom 6.10.8 to 7.1.2github/codeql-actionfrom 3 to 4actions/download-artifactfrom 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