WestpacCXTeam / GUI-source

Westpac GUI source code
http://WestpacCXTeam.github.io/GUI-source
GNU General Public License v2.0
37 stars 19 forks source link

Rebuilding GUI-radios & GUI-checkboxes #436

Closed jonnystening closed 5 years ago

jonnystening commented 5 years ago

Rationale

We have decided to rebuild the GUI-radios and GUI-checkboxes modules, addressing a number of a11y and implementation concerns and bring about some new benefits...

1. Accessibility (WCAG 2.1 AA)

2. Reduce maintenance overhead / unnecessary codebase bloat

3. Markup implementation

Change summary

The following items have changed...

  1. The new module GUI-form-checks replaces GUI-radios and GUI-checkboxes, which are both now deprecated
  2. The HTML markup structure and modifier class options have changed, as mentioned below
  3. There is a new large option to satisfy the touch hit area requirement – use the modifier .form-checks-item-large
  4. We no longer require the use of SVGs to render the check indicators (radio dot and checkbox tick)

Additionally, worth mentioning...

Implementation guide

The following is a quick guide to illustrate the new HTML markup structure. Please refer to the GEL GUI Framework documentation of Form-Checks for the official implementation notes.

<div class="form-checks [form-checks-flip] [form-checks-inline]">
   <div class="form-checks-item [form-checks-item-large]">
      <input type="{INPUT_TYPE}" class="form-checks-input" name="{INPUT_NAME}" id="{INPUT_ID}" value="{VALUE}">
      <label for="{INPUT_ID}" class="form-checks-label">{INPUT_LABEL}</label>
   </div>
   <!-- etc. -->
</div>
jonnystening commented 5 years ago

Ref https://github.com/WestpacCXTeam/GUI-source/issues/173 for additional legacy context

jonnystening commented 5 years ago

GUI-radios and GUI-checkboxes to be deprecated. Both now rolled into GUI-form-checks https://github.com/WestpacCXTeam/GUI-form-checks