Last active
November 26, 2017 19:01
-
-
Save Shelob9/7a6bf74db9564213acf62503a4bb58a5 to your computer and use it in GitHub Desktop.
Example code for caldera_forms_render_form_attributes filter. See: https://calderaforms.com/doc/caldera_forms_render_form_attributes/
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
| <?php | |
| /** | |
| * Indicate to screen readers and other assistive devices that a Caldera Form is being used as a search form. | |
| */ | |
| add_filter( 'caldera_forms_render_form_attributes', function( $form_attributes, $form ){ | |
| $form_attributes[ 'role' ] = 'search'; | |
| return $form_attributes; | |
| }, 15, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment