Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Block editor/renderer: Nesting a list inside of a list-item leads to invalid/inaccessible HTML #57

Open
HendrikSchmidt opened this issue Dec 5, 2024 · 0 comments
Labels
issue: bug Issue reporting a bug

Comments

@HendrikSchmidt
Copy link

HendrikSchmidt commented Dec 5, 2024

What version of @strapi/blocks-react-renderer are you using?

What's Wrong?

When creating a nested list in Strapi, it will be rendered as invalid HTML with list (ul/ol) elements as direct children of other list elements, instead of being children of list-items li.

Input:

* Test
    * Test

Output:

<ul>
    <li>Test</li>
    <ul>
        <li>Test</li>
    </ul>
</ul>

I am not sure whether this is an issue with @strapi/blocks-react-renderer or strapi itself though. Let me know if I should raise the issue with strapi.

To Reproduce

Create a nested list in the blocks-editor in Strapi and render it with the blocks-react-renderer.

image image

Expected Behaviour

The list should be wrapped inside a list-item:

<ul>
    <li>Test</li>
    <li>
        <ul>
            <li>Test</li>
        </ul>
    </li>
</ul>
@HendrikSchmidt HendrikSchmidt added the issue: bug Issue reporting a bug label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug
Projects
None yet
Development

No branches or pull requests

1 participant