diff --git a/assets/js/public/form-field-unique.js b/assets/js/public/form-field-unique.js
index 69437340..84f76e82 100644
--- a/assets/js/public/form-field-unique.js
+++ b/assets/js/public/form-field-unique.js
@@ -84,12 +84,16 @@
const iname = input.prop( 'name' );
const curid = input.prop( 'id' );
const forid = form.data( 'id' );
+ const radioname = label.find( '.forminator-radio-option' );
+ const optionid = curid + '-option-' + forid;
const uname = iname + '-' + forid;
const unqid = curid + '-' + forid;
input.prop( 'id', unqid );
input.prop( 'name', uname );
label.prop( 'for', unqid );
+ input.attr( 'aria-labelledby', optionid );
+ radioname.prop( 'id', optionid );
});
}
@@ -108,10 +112,14 @@
const label = input.parent();
const curid = input.prop( 'id' );
const forid = form.data( 'id' );
+ const checkboxname = label.find( '.forminator-checkbox-option' );
+ const optionid = curid + '-option-' + forid;
const unqid = curid + '-' + forid;
input.prop( 'id', unqid );
label.prop( 'for', unqid );
+ input.attr( 'aria-labelledby', optionid );
+ checkboxname.prop( 'id', optionid );
});
}
diff --git a/templates/form-elements/field-checkbox.html b/templates/form-elements/field-checkbox.html
index 4fea367e..1cb85ab5 100644
--- a/templates/form-elements/field-checkbox.html
+++ b/templates/form-elements/field-checkbox.html
@@ -12,7 +12,7 @@
id="checkbox-option-1"
/>
- Design
+ Design
- Development
+ Development
- Technical Support
+ Technical Support
This field is required.
diff --git a/templates/form-elements/field-radio.html b/templates/form-elements/field-radio.html
index 2da094e5..6a83918f 100644
--- a/templates/form-elements/field-radio.html
+++ b/templates/form-elements/field-radio.html
@@ -13,7 +13,7 @@
id="radio-option-1"
/>
- $100 - $500 USD
+ $100 - $500 USD
- $501 - $1000 USD
+ $501 - $1000 USD
- $1001 or more USD
+ $1001 or more USD
This field is required.