This is just an issue that is known upstream (CKEditor and Drupal) that I ran into while making a "complicated" table in CKEditor 5 that I wanted to ensure the team was aware of/tracking at some level.
Problem
Essentially, CKEditor doesn't understand that <th> tags can officially exist outside of <thead> (e.g., in <tbody>) and when you attempt to put <th> tags within <tbody>, the editor will move them up to <thead> regardless of where they were before, causing unexpected mangling of table content.
The table bugs here are really critical. I’m responding to an RFP for a city government website proposal, and one question completely disqualifies Drupal 10 with CKE5 as inconformant:
To comply with the U.S. Access Board Web-based Intranet and Internet Information and Applications (1194.22) provisions, the solution provides the following:
The solution allows markup to be used to associate data cells and header cells for data tables that have two or more logical levels of row or column headers.
Steps to reproduce
Try to make a table with <th> tag within <tbody>. It gets moved.
Proposed solution
Wait for upstream issue to be resolved and update CKEditor5?
This is just an issue that is known upstream (CKEditor and Drupal) that I ran into while making a "complicated" table in CKEditor 5 that I wanted to ensure the team was aware of/tracking at some level.
Problem
Essentially, CKEditor doesn't understand that
<th>
tags can officially exist outside of<thead>
(e.g., in<tbody>
) and when you attempt to put<th>
tags within<tbody>
, the editor will move them up to<thead>
regardless of where they were before, causing unexpected mangling of table content.The CKEditor upstream issue explains it a lot better: https://github.com/ckeditor/ckeditor5/issues/14911
Drupal upstream issue: https://www.drupal.org/project/drupal/issues/3384400
This presents some accessibility issues as noted by this person: https://github.com/ckeditor/ckeditor5/issues/14911#issuecomment-1942852909
Steps to reproduce
Try to make a table with
<th>
tag within<tbody>
. It gets moved.Proposed solution
Wait for upstream issue to be resolved and update CKEditor5?