aria-label being stripped
-
I recently noticed an issue with our site where any editor account on our site is stripping aria-labels that I have previously added using my admin account. Any time an editor updates a page, all pre-existing aria-labels I have added are removed with no notice.
I have confirmed this only affects our editor roles as I can update a page using my admin account and all changes remain. This has resulted in me having to continuously revert edits made to our site and manually add them using my admin account.
I have tried adding this function to my theme functions.php, but the labels are still being stripped.
// STOP WORDPRESS REMOVING TAGS function tags_tinymce_fix( $init ) { // html elements being stripped $init['extended_valid_elements'] = 'div[*], @[aria*]'; // don't remove line breaks $init['remove_linebreaks'] = false; // convert newline characters to BR $init['convert_newlines_to_brs'] = true; // don't remove redundant BR $init['remove_redundant_brs'] = false; // pass back to wordpress return $init; } add_filter('tiny_mce_before_init', 'tags_tinymce_fix');
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘aria-label being stripped’ is closed to new replies.