Skip to content

fix: DOM parsing for hidden-root accessibility pages#510

Closed
yann120 wants to merge 1 commit intomainfrom
fix/hidden_dom_parsing
Closed

fix: DOM parsing for hidden-root accessibility pages#510
yann120 wants to merge 1 commit intomainfrom
fix/hidden_dom_parsing

Conversation

@yann120
Copy link
Copy Markdown
Collaborator

@yann120 yann120 commented Apr 3, 2026

fix #456

Summary

Page#dom was removing elements matching visibility:hidden.

On some real sites, like https://www.agglo-larochelle.fr/ the root <html> element is rendered with style="visibility:hidden", which caused the whole DOM to be stripped before audit checks ran.

This PR makes Page#dom a raw parser again and keeps extraction cleanup separate.

Changes

  • keep Page#dom as the raw parsed document
  • move extraction cleanup into a separate internal content DOM
  • keep hidden content in extraction
  • still ignore non-content elements like script, style, meta, link, noscript, and iframe

Result

This restores for those sites with hidden attributes the detection
Capture d’écran 2026-04-03 à 12 37 41

@yann120 yann120 self-assigned this Apr 3, 2026
@yann120 yann120 added the feature Feature or enhancement task label Apr 3, 2026
@yann120
Copy link
Copy Markdown
Collaborator Author

yann120 commented Apr 15, 2026

CF discussion dans #456 : Nous avons décidé de ne pas continuer dans cette direction

@yann120 yann120 closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature or enhancement task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Essemble des checks échoués mais HTML présent

1 participant