Case-sensitive anchor name matching in quirks mode
- Category
- DOM
- Type
- No developer-visible change
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
WPT details: https://chromium-review.googlesource.com/c/chromium/src/+/7727981/14/third_party/blink/web_tests/external/wpt/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-anchor-name-quirks-case.html https://wpt.fyi/results/?label=master&label=experimental&aligned&q=html%2Fbrowsers%2Fbrowsing-the-web%2Fscroll-to-fragid%2Fscroll-to-anchor-name-quirks-case.html
Summary
Anchor name matching for fragment navigation will become case-sensitive in quirks mode, matching the behavior in standards mode. Previously, navigating to #Foo could match <a name="foo"> in quirks mode. This aligns Chromium with Safari, Firefox, and the HTML specification, which do not perform case-insensitive matching.
Motivation
In quirks mode, Chromium performs case-insensitive anchor name matching for fragment navigation, while Safari and Firefox always use case-sensitive matching. This inconsistency creates an interop gap. Use counter data shows the case-insensitive fallback fires on ~0.0001% of page loads, confirming minimal compatibility risk.
Standards & signals
- Specification: https://html.spec.whatwg.org/multipage/browsing-the-web.html#find-a-potential-indicated-element
- Firefox: Shipped/Shipping
- Safari: Shipped/Shipping
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/issues/40829784
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=html%2Fbrowsers%2Fbrowsing-the-web%2Fscroll-to-fragid%2Fscroll-to-anchor-name-quirks-case.html
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Case-sensitive%20anchor%20name%20matching%20in%20quirks%20mode
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Case-sensitive%20anchor%20name%20matching%20in%20quirks%20mode
- Baseline status: https://webstatus.dev/?q=Case-sensitive%20anchor%20name%20matching%20in%20quirks%20mode