Score:1

Make table fully accessible use CKEditor 4.17.1

jp flag

I'm working on a website that needs to be fully accessible following the WCAG guidelines. Therefor I need my table output, created via the CKEditor 4.17.1 in Drupal 9, to be set with the scope attribute.

Something like this:

<table>
  <caption>Reiskosten</caption>
  <tr>
    <td></td>
    <th scope="col">2e klas</th>
    <th scope="col">1e klas</th>
  </tr>
  <tr>
    <th scope="row">Enkele reis</th>
    <td>8,00</td>
    <td>12,40</td>
  </tr>
  <tr>
    <th scope="row">Retour</th>
    <td>14,10</td>
    <td>21,90</td>
  </tr>
</table>

When setting headers in my table this scope attribute isn't created by default. I thought this was a CKEditor problem but testing at https://ckeditor.com/ckeditor-4/demo/ (on the same version 4.17.1) shows me that the scope attribute is created. So for some reason it is not created using the editor in Drupal.

I tried adding the scope attribute to the th my allowed tags but this didn't solve the problem. I can't find anything about this so I hope you can help me with this issue.

How can I make sure the scope attribute is added to my table just like CKEditor does on the demo page?

ru flag
Please check your Text format settings. Maybe you have the "Limit allowed HTML tags and correct faulty HTML" option enabled. If so, you should just add all tags and attributes to the "Allowed HTML tags" field. Like this: `<table> <caption> <tr> <th scope> <td>`
Joost avatar
jp flag
As said in my question I tried doing this. This doesn’t work.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.