Skip to content

42tte/feat toggle switch

Kristoffer Nordström requested to merge 42tte/feat-toggle-switch into main
  1. Renamed component to ToggleSwitch
  2. Updated styles with new design
  3. Changed markup (from input to button with role switch) based on these articles:
    https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/switch_role
    https://www.smashingmagazine.com/2017/09/building-inclusive-toggle-buttons/ (role switch is now 6y later better supported)
    https://joshcollinsworth.com/blog/accessible-toggle-buttons

Review https://komponentbibliotek-review-42tte-feat-ejhygw.paas2.uninett.no/komponenter/?path=/story/components-toggle-switch--default

QA:
Is the new API satisfying for FS Studentportal?
Why change prefix on component CSS variables? Easier to read & write and give a clear indiction on what is global and what is local variables.

Edited by Kristoffer Nordström

Merge request reports

Loading