-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Describe the bug
There will be Warning: validateDOMNesting(...): <div> cannot appear as a child of <tr>. in console, when adding items to ul.block-editor-link-control__search-items
This happens because the component uses <TreeGridRow><PickedItemContainer> -structure where <PickedItemContainer> is just div. See https://github.com/10up/block-components/blob/develop/components/content-picker/PickedItem.tsx#L27
TreeGrid and related components should be used in <TreeGrid><TreeGridRow><TreeGridCell> -structure, which will render valid html structure for <table>. See https://developer.wordpress.org/block-editor/reference-guides/components/tree-grid/
Also there is invalid html structure in the ul.block-editor-link-control__search-items element, which has div-element as children. This is not allowed according to the specs https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ul#technical_summary
Steps to Reproduce
Screenshots, screen recording, code snippet
No response
Environment information
No response
WordPress information
No response
Code of Conduct
- I agree to follow this project's Code of Conduct