HTML tag ‘scope’ not being added to th, and issue with unwanted width/height
-
Hi, I’m having issues with the HTML tag ‘scope’ not being added when adding columns or rows to an existing table. First I should mention we realized this was not happening when our tables’ responsiveness started getting broken by the TinyMCE editor by adding unwanted inline css styles of width and height to all cells of a table when an additional row or column was added to it. (Our tables responsive styles are in our main css style sheet)
We have WordPress version 4.9.8 with the classic editor enabled (not using Gutenberg). We are using the TinyMCE plugin and the TinyMCE Config plugins.
We have had some success with the above issue by adding in the TinyMCE config:
Option: invalid_styles
Value: th: width height,td:width heightand
Option: table_clone_elements
Value: trUsing the above, no widths and heights will be added to the tables. Also adding table_clone_elements allows adding of rows, but putting th or td there will cause a duplication of each column/row added so we didn’t add those.
The problem we still have is that the HTML tag ‘scope’ of the table headers (<th>) is not being added when additional columns/rows are added to the existing tables. I tried adding ‘table[scope]’ to the extended_valid_elements, and ‘scope’ to the table_clone_elements but that did not work.
Any help would be appreciated. We are trying to keep our site WCAG 2.0 compliant.
- The topic ‘HTML tag ‘scope’ not being added to th, and issue with unwanted width/height’ is closed to new replies.