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

> Another question about this: what's the story for feature detectability?

I brought this up in WICG/ScrollToTextFragment#19 - We should have some way to detect this feature but I'm not sure what the best way would be. Since there's no new JS APIs there's no obvious place to put it. Perhaps a bool on `navigator`? Or on `URL`? Neither feels especially intuitive. Is there an existing place for feature detecting things without a matching JS/CSS API?

For `##`, we could feature detect that with `(new URL('https://test.com/##)).hash.indexOf('##') >= 0` but we probably don't want to tie `##` to `targetText`.

From some of the questions in the notes:

> Peter: I remember Doug Schepers talking about an annotation system.

Probably [WebAnnotations](http://w3c.github.io/web-annotation/)? We did look at this and our syntax is quite close to the [TextQuoteSelector](https://www.w3.org/TR/annotation-model/#text-quote-selector), the major difference being that we allow essentially a wild-card match on the _exact_ portion to allow a more compact representation of a long snippet.

> Peter: there's a lot of work that's been done with media fragments;

We also looked at media fragments and initially wanted to do something similar. However, we ran into the compatibility concerns for pages that don't expect a hash/use it for their own processing.

> How will these URL be minted? From user doing text search in browser? Or something page will generate?

We expect two major use cases: external pages pointing to a sub-resource (e.g. search engine, Wikipedia references) as well as users highlighting a snippet and copying a direct link to it. In both these cases we're generating a hash for a page without it knowing about it prior. Hence why conflicting with existing uses of the hash for routing is a concern; we expect a large number of links containing a hash to pages that would previously not expect it.

The case of internal (within an origin) anchors is less interesting because it's already possible. Since the author controls both the anchor and the pointed to resource, they can simply annotate the desired location with an element-id and use a regular element-id fragment (and provide highlight styling using `:target`)

-- 
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-519567425

Received on Thursday, 8 August 2019 15:28:14 UTC