impress-org / givewp-next-gen

GiveWP 3.0.0 Feature Plugin
https://givewp.com/
GNU General Public License v3.0
10 stars 1 forks source link

Radio labels do not select the corresponding option #245

Closed kjohnson closed 1 year ago

kjohnson commented 1 year ago

Details

Currently all labels have the same for= attribute value, which is the name of the input. Instead, the for= attribute for each label should correspond to an option's id attribute.

Expected Behavior

Clicking the label of a radio option should set that radio to that option.

Visuals

<div class="givewp-fields-radio__options">
    <div class="givewp-fields-radio__option-container">
        <input type="radio" name="enableTribute" value="show">
        <label for="enableTribute">Yes, please</label>
    </div>
    <div class="givewp-fields-radio__option-container">
        <input type="radio" name="enableTribute" value="hide">
        <label for="enableTribute">No, thank you</label>
    </div>
</div>

image