w3c / sync-media-pub

Repository of the Synchronized Multimedia for Publications Community Group
http://w3c.github.io/sync-media-pub
Other
16 stars 4 forks source link

look at css fragmentions #23

Closed marisademeglio closed 3 years ago

marisademeglio commented 4 years ago

non-destructive reference and highlight: https://indieweb.org/fragmention

dauwhe commented 4 years ago

CSS to highlight arbitrary ranges: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/highlight/explainer.md

This spec will be worked on by CSSWG, so it will be in CSSWG repo soon. Tess, Florian, and Sanket will be the editors.

BigBlueHat commented 4 years ago

You should also check out ScrollToTextFragment which is getting (growing) support in Chrome (at least). They are gradually working through the standards process, but they are deliberately using invalid URLs because in Chrome's case they want these to be "browser only" fragments which will trigger the "scroll to" action in the browsers.

There's also quoteurl which is similar to fragmention, but avoid (most) collisions with existing ID values by wrapping the quote in "'s--so #"heading" (quoteurl) vs. #heading (fragmention).

All of these are restricted to exact or partial text selections--which would mean sync media authors would be repeating lots of text into the sync media JSON document.

Lastly, FWIW, the Web Annotations WG created a Selectors and States Note for (rather verbosely) expressing full Web Annotation selectors into valid URL fragment identifiers. It provides a flexible (though verbose) means of accommodating an extensible range of selector systems--i.e. any selector system available in the Web Annotation Data Model Selectors section or provided via extensions in the future.

It's a vast space. 😃 Finding a standard one to lean on, would be the best way forward--or if single line expression is less important, you can use the Web Annotation Selector objects themselves. Options. 😺

larscwallin commented 4 years ago

I second Mr Big Blue Hat's suggestion to use Selectors and States Note, and to also update this Note to cover the use of ScrollToTextFragments which look fabulous 🙂

marisademeglio commented 4 years ago

Let's take this convo over to #11 (@larscwallin thanks for duplicating your comments there). I had originally opened this issue more as a reminder to myself. Labeling it "future explorations" and leaving it here for now.