alphagov / govuk_frontend_toolkit

❗️GOV.UK Frontend Toolkit is deprecated, and will only receive major bug fixes and security patches.
MIT License
403 stars 107 forks source link

selection-buttons.js doesn't respect the disabled="disabled" attribute #394

Closed khaledzaidan closed 6 years ago

khaledzaidan commented 7 years ago

If a radio button or checkbox has the disabled="disabled" attribute, selection-buttons.js still allows the user to tick/select and untick/unselect.

khaledzaidan commented 7 years ago

Attached is selection-buttons.js.patch.txt

a patch for a simple fix. I'm not sure if this is the best way to do it, but at least it's something that works.

robinwhittleton commented 7 years ago

Hi Khaled, I’ve been working on a revised version of the checkboxes / radios that respect the disabled attribute and don’t need for selection-buttons.js (at a cost of reworking the markup). We’re currently fighting some Travis problems but once we fix those we’ll release a new version of GOV.UK Elements (probably 3.0.1) that’ll include those.

robinwhittleton commented 7 years ago

We’ve updated Elements to no longer need selection-buttons.js for radios and checkboxes, and marked the JS as deprecated. There’s also styling in elements to respect disabled. Does this answer your need?

kr8n3r commented 6 years ago

HI, @khaledzaidan as this file has been deprecated in favour of new radios and checkboxes (see above response) Would you object to me closing this issue?

khaledzaidan commented 6 years ago

Ah, yes, please go ahead. If the file has been deprecated, then there's not much point of this ticket anymore.

Thanks :)

On 9 February 2018 at 15:07, Jani Kraner notifications@github.com wrote:

HI, @khaledzaidan https://github.com/khaledzaidan as this file has been deprecated in favour of new radios and checkboxes (see above response) Would you object to me closing this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alphagov/govuk_frontend_toolkit/issues/394#issuecomment-364459510, or mute the thread https://github.com/notifications/unsubscribe-auth/ALLQNqfdkXMgbDx62DupdczLGn8BPy5mks5tTF9MgaJpZM4Mhg35 .