Skip to content

v5.0.0-alpha

Pre-release
Pre-release
Compare
Choose a tag to compare
@palcarazm palcarazm released this 01 Jan 11:07
· 97 commits to v5 since this release
86f1adf

⚠️ Important information

This pre-release includes 3 breaking change done to improve web accessibility.
Please consider giving us feedback in the release discussion page to improve the v5.0.0 version.

1️⃣ ECMAS as main interface

You can continue using jQuery interface but the file to import had been renamed adding the jquery suffix.
This change has been made because bootstrap have dropped jQuery dependency, so using jQuery as main interface include a new dependency that bootstrap don't have.

2️⃣ Rename option and data attribute for labels

You can continue using on and offoptions and data-attributes, but a deprecated warning will be logged in console. Please consider using onlabel and offlabel instead because support for deprecated options and data attributes can be removed in future versions.
In previous version, we have been adding options and data attributes to set custom property to each part of the toggle. This two legacy options and data attributes can be confusing now, so we have aligned their names with the more recent options and data attributes.

3️⃣ Change toggle on and off elements to span

Your customs styles can be affected if you were selecting toggle on and toggle off elements by the label. Please consider using .toggle > .toggle-group > .btn:not(.toggle-handle) instead.
The Web Content Accessibility Guidelines (WCAG) establish that an element can have only one label. With the previous approach, the toggle element had at leats two labels (even three or more if the original checkbox had one or many).

ℹ️ What's Changed

🆕 Added

🔁 Changed

  • feat!: Set ecmas interface as main interface by @palcarazm in #95
  • feat!: Change on and off option to onlabel and offlabel Closes #99 by @palcarazm in #100
  • feat!: Change toggleOn and toggleOff elements from label to span Closes #96 by @palcarazm in #101

🆙 Bump

Full Changelog: v4.3.6...v5.0.0-alpha