Skip to content

[docs] Fix HTML validation issues#1295

Draft
Janpot wants to merge 20 commits intomasterfrom
fix-html-validation-issues
Draft

[docs] Fix HTML validation issues#1295
Janpot wants to merge 20 commits intomasterfrom
fix-html-validation-issues

Conversation

@Janpot
Copy link
Copy Markdown
Member

@Janpot Janpot commented Apr 8, 2026

Summary

  • Fix all HTML validation errors (240+ → 0) detected by html-validate in the broken links checker
  • Use <span> instead of <div> inside <button> elements (ExpandingBox, SearchButton)
  • Add missing aria-label attributes on inputs
  • Remove id attributes from loading fallback spans
  • Use React.useId() for unique Checkbox input IDs

Janpot and others added 13 commits March 30, 2026 16:41
Add an `htmlValidate` option to the crawl config that validates HTML
content of crawled pages using the html-validate library. The option
accepts `true` (uses recommended rules), or a config object supporting
`extends: ['mui:recommended']` for the default preset. Config is always
static (never loaded from disk). Reports are printed per page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace manual string replacement of mui:recommended in extends with
html-validate's staticResolver API, which properly registers the preset
so html-validate's own config resolution handles it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move fetch, parse, link/target extraction, and HTML validation into a
single crawlWorker per URL. The main thread now only handles queue
management, deduplication, and post-crawl analysis.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merge broken link and HTML validation issues into a single `issues` array
on CrawlResult, using a discriminated union (`BrokenLinkIssue | HtmlValidateIssue`).
This removes the separate `htmlValidateResults` field and simplifies consumers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix all HTML validation errors detected by html-validate:

- Use <span> instead of <div> inside <button> in ExpandingBox and SearchButton
- Add aria-label to SearchInput and TextInputCopy inputs
- Use React.useId() in Checkbox for unique IDs per instance
- Deduplicate IDs in enhanceCodeTypes when same type appears in multiple code blocks
- Create custom rehypeSlug plugin that pre-seeds slugger with demo slugs
- Remove id attributes from DemoContentLoading fallback spans
- Use <div> instead of <span> for block-level returnValueDescription in TypesTable
- Fix file name collision in code-highlight-idle demo

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Janpot Janpot force-pushed the fix-html-validation-issues branch from 2d570d1 to 051f110 Compare April 8, 2026 12:45
@mui-bot
Copy link
Copy Markdown

mui-bot commented Apr 8, 2026

Bundle size report

ℹ️ Using snapshot from parent commit 3e5ffed (fallback from merge base b55f137).

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

Janpot and others added 2 commits April 8, 2026 16:08
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Janpot Janpot requested a review from dav-is April 8, 2026 14:59
@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard bot commented Apr 15, 2026

Performance

Total duration: 13.19 ms ▼-11.21 ms(-45.9%) | Renders: 4 (+0) | Paint: 63.72 ms ▼-46.21 ms(-42.0%)

Test Duration Renders
HeavyList mount 7.09 ms ▼-9.76 ms(-57.9%) 1 (+0)
DataGrid mount with paint timing 1.91 ms ▼-1.40 ms(-42.3%) 1 (+0)
Counter click 4.19 ms ▼-0.05 ms(-1.2%) 2 (+0)

Details of benchmark changes

Deploy preview

https://deploy-preview-1295--mui-internal.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

Base automatically changed from add-html-validate-to-broken-links-checker to master April 15, 2026 13:15
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: out-of-date The pull request has merge conflicts and can't be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants