Re: [w3ctag/design-reviews] Scroll To Text (#392)

Thank you for the feedback. I agree a change to URL syntax is a big deal and warrants additional scrutiny. I've already filed a bug on whatwg/url#445 (and related whatwg/html#4868) to try to get some visibility, I'll email uri@w3.org as well. Please let me know if there's other places I should tap.

One alternative we could consider and would appreciate thoughts on the tradeoffs:

`##` as a delimiter is invalid in a URL today which means tools and apps could misinterpret these new URLs. Practically speaking, they've worked in all browsers and tools I've tried so far but that's a necessarily limited sample; I can't say with certainty what the compat impact of this change would be. There's [some experience](https://github.com/WICG/ScrollToTextFragment/issues/15#issuecomment-513848390) here from [Fragmentation](https://indieweb.org/fragmention) that there were apps that failed on such URLs, though I haven't seen the examples myself.

We could pick an alternative but valid delimiter (e.g. `@@`, `::`, etc.) to use in a fragment for the fragment directive. For example: `https://example.org#@@targetText=foo`. This is a valid URL as per today's URL spec; the changes would be entirely in the HTML spec in how the fragment is interpreted and the URL mutated when loading a document (we'd still strip off `@@targetText=foo`).

The trade off here is that, because these would be valid URLs, we might be affecting legitimate web apps that already use this character sequence in their fragment. This may or may not be preferable to affecting URL parsing apps. One advantage here is that it's easier for us to measure the compat impact on web pages: we can add some telemetry and measure how often we see URLs with various candidate delimiters and pick one with acceptably low usage (assuming it exists).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/392#issuecomment-527908168

Received on Wednesday, 4 September 2019 13:47:24 UTC