alphagov / govuk_accessibility_sandbox

A place to build and view components with accessibility in mind and get feedback from the community and beyond.
https://govuk-accessibility-sandbox.herokuapp.com/
MIT License
10 stars 5 forks source link

Add govuk showhide content #100

Closed gemmaleigh closed 7 years ago

gemmaleigh commented 7 years ago

This PR updates the JavaScript in application.js and replaces the showHideContent functionality with a newer version (to be added to the govuk_frontend_toolkit), I have duplicated this here for testing.

Later it can be included in this project via the govuk_frontend_toolkit and the files in /app/assets/javascripts/govuk/ can be removed.

The test cases which will be affected by this are those which conditionally reveal content - for both radio buttons and checkboxes.

To be tested:

Checkboxes: http://localhost:3000/patterns/checkboxes-reveal/01/

Radio buttons http://localhost:3000/patterns/radio-buttons-reveal/01/

cfq commented 7 years ago

👍