Created
June 12, 2025 10:57
-
-
Save aimahdi/92f367679f32fa04c2657ddfb5e083ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('fluentform/rendering_field_data_input_email', 'add_accessibility_attributes_to_email_field', 10, 2); | |
function add_accessibility_attributes_to_email_field($data, $form) | |
{ | |
// Only target a specific form | |
if ($form->id != 327) { | |
return $data; | |
} | |
$data['attributes']['autocomplete'] = 'email'; | |
$data['attributes']['aria-label'] = 'Your email address'; // Set your desired label here | |
return $data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment