List block outputs wrapper div

Description:

I am not sure whether this has always been the case or if it changed at some point but the list block outputs a wrapper div.

The reason I noticed this is because due to the new Global Elements, we can add additional classes to tags and blocks.

So I added an additional class “details” to the ol tag and added some styling.

When this didn’t work, I investigated and found the details class was being added to the wrapper div, not the ol tag.

Step-by-step reproduction instructions:

Please write the steps needed to reproduce the bug.

  1. Add a List block
  2. Add a virtual class (e.g. “details”)
  3. Add a Global Element for ol with an additional class of “details”
  4. Note that this doesn’t apply either on the front-end or in the editor due to the class being added to the wrapper div
  5. Additional note: The html tag in the block inspector for the List Block does not update when you choose Ordered List (still shows ul). The navigator shows the correct tag.

List Block Inspector:
Screenshot 2024-10-16 at 13.03.49

Global Element rule:
Screenshot 2024-10-16 at 13.05.12

Navigator:
Screenshot 2024-10-16 at 13.04.10

Output:
Screenshot 2024-10-16 at 13.09.07

Environment info

  • WordPress version: 6.6.2
  • Cwicly Plugin version: 1.4.4

As a follow up, the following custom rule does work, however one of the things we want to do is prepare for the feature that @Louis mentioned about having a dropdown of additional classes in the block inspector.

Screenshot 2024-10-16 at 13.19.44

It is not clear whether custom rules will be able to parsed for these additional classes, so if not, it will be essential to remove these wrappers as then clients/editors can properly select additional classes for lists.