Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Radio and MultiCheckbox labels #4

Merged
merged 2 commits into from
Jul 8, 2018

Conversation

rolandoisidoro
Copy link
Contributor

Radio and MultiCheckbox elements have multiple options to select from. On the original code, if an id attribute was defined to one of these element types, it would simply be set on the input of the 1st option, which meant that clicking on the labels of the remaining options would not select them, as there was no association between the two HTML elements using the for attribute on the label element.

This patch fixes this behaviour, simply by assigning the original id attribute to the first option and then assigning a custom id attribute to the remaining options, instead of removing it.

PS:. Even though the fix was only implement in two files, I noticed that some parts of the code weren't following Zend's coding standards, so I ran the codesniffer fix script, resulting in many more files being changed.

…Radio and MultiCheckbox inputs to allow a working connection with labels via the "for" attribute.
@neilime neilime merged commit eb2e7a9 into neilime:master Jul 8, 2018
@neilime
Copy link
Owner

neilime commented Jul 8, 2018

Thank you for the fix !

@rolandoisidoro rolandoisidoro deleted the fix-radio-checkbox-labels branch July 9, 2018 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants