In this example DOM order does not match visual order, because of CSS properties:


This paragraph appears second visually but is first in the DOM

This heading appears first visually but is second in the DOM


Note: Hard to automatically test or detect. Requires a human tester or AI to visually & programmatically analyze the page, compare the visual and DOM order, and determine if the DOM order matches the visual order.