From 4d7fdf5c822943e4489538eee908b8484654f313 Mon Sep 17 00:00:00 2001 From: Kim Coleman Date: Mon, 12 Jun 2023 09:49:09 -0400 Subject: [PATCH] Add html5 required attribute to field to checkout fields with pmpro_required class for accessibility and checkout experience improvement --- js/pmpro-checkout.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/pmpro-checkout.js b/js/pmpro-checkout.js index 39cb5f9ce..623b7ca99 100644 --- a/js/pmpro-checkout.js +++ b/js/pmpro-checkout.js @@ -140,6 +140,7 @@ jQuery(document).ready(function(){ //add required to required fields if ( ! jQuery( '.pmpro_required' ).next().hasClass( "pmpro_asterisk" ) ) { jQuery( '.pmpro_required' ).closest( '.pmpro_checkout-field' ).append( ' *' ); + jQuery( '.pmpro_required' ).attr( 'required', 'required' ); } //Loop through all radio type fields and move the asterisk.