[docs] Fix invalid HTML nesting of block elements inside span#48107
Draft
Janpot wants to merge 4 commits intomui:masterfrom
Draft
[docs] Fix invalid HTML nesting of block elements inside span#48107Janpot wants to merge 4 commits intomui:masterfrom
Janpot wants to merge 4 commits intomui:masterfrom
Conversation
Replace <span> with <div> for dangerouslySetInnerHTML containers that hold block-level content (<p>, <ul>) on API pages. Use inline elements throughout ProductsSwitcher since its parent renders as <span>. Change StyledIcon from <span> to <div> on the material-icons page since it wraps <div> children. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Netlify deploy previewhttps://deploy-preview-48107--material-ui.netlify.app/ Bundle size report
|
Signed-off-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
Janpot
added a commit
to Janpot/material-ui
that referenced
this pull request
Mar 26, 2026
Cherry-pick fixes from mui#48107 and mui#48095: - Replace <span> with <div> for dangerouslySetInnerHTML with block content - Fix StyledIcon from span to div on material-icons page - Use inline elements in ProductsSwitcher for valid span nesting - Fix duplicate IDs in ThemeViewer, SearchButton, ToggleDisplayOption - Fix aria-label misuse on BackToTop wrapper div - Fix wrong aria-controls in ToggleDisplayOption Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<span dangerouslySetInnerHTML>with<div>in API page components where the HTML content contains block-level elements (<p>,<ul>)StyledIconon the material-icons page fromstyled('span')tostyled('div')since it wraps<div>childrenProductsSwitcheron the homepage since its parentHighlighterrenders as a<span>Fixes
element-permitted-contentHTML validation errors on:/system/api/stack(and other API pages)/material-ui/material-icons/(homepage)