Closed bmenant closed 1 year ago
Here you can see the duplicate html id (v1.4.2) this PR addresses:
@bmenant thanks for flagging this. I'm going to accept this as-is but I think I'm going to address the fact that I incorrectly changed out id/class values with underscores instead of dashes.
All Submissions:
Changes proposed in this Pull Request:
Appends
_wrapper
to theid
attribute of the<div>
element of the public view/form.Fixes a regression introduced in 1.4.0 where both the
<select>
and the<div>
elements took the same valuelocal_pickup_time_select
returned fromget_order_post_key()
.Prior to 1.4.0, the
<div>
element was identified with this hard-coded value:local-pickup-time-select
using dashes instead of underscores (https://github.com/WC-Local-Pickup/woocommerce-local-pickup-time/blob/1.3.13/public/class-local-pickup-time.php#L692).This duplicate html id has caused various issues with custom client-side logic around the local pickup field and comes with accessibility issues (since the
for
attribute of<label>
element does not link to the field element anymore on some/all (?) browsers).Other information:
Have you written new tests for your changes, as applicable?No public unit tests yet.Have you successfully run tests with your changes locally?No public unit tests yet.Changelog entry
<div>
wrapperid
attribute value tolocal_pickup_time_select_wrapper
.<select>
element.