Home Forums Front-end Issues Clicking field label changes radio list selection


Clicking field label changes radio list selection

  • Hi,

    I’m noticing the following overall behavior:

    When a field label is clicked, the focus seems to get set to the field’s first <input> element by default.

    The behavior becomes problematic when dealing with radio list fields, because it messes with the user’s selection by changing it to the first radio input.

    As a temporary fix, I added a hidden text input field right before every radio list and assigned the proper field ID to it. It now acts as a kind of honeypot for the default behavior. But I’m not sure if it is going to cause other issues.

    WP: 5.5.3 / ACF: 5.9.3

    Regards, Stefan

  • By the way: In only found out about this, because I’m using the field labels to click-toggle the visibility of the field description (hidden on load, visible on label click). But I guess, even without that, accidental changes will occur from time to time.

  • I just did. Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.