Contact emails
bmcq...@chromium.org, pno...@chromium.org
Explainer
https://github.com/bryanmcquade/scroll-to-css-selector
Summary
To enable users to easily navigate to specific content in a web page, we propose adding support for using a CSS selector to specify the indicated part of the document.
Motivation
Web standards currently specify support for scrolling to anchor elements with name attributes (now obsolete), as well as DOM elements with ids, when navigating to a fragment. While named anchors and elements with ids enable scrolling to limited specific parts of web pages, not all documents make use of these elements, and not all parts of pages are addressable by named anchors or elements with ids.
We see the ability to scroll to specific parts of a document being useful for a variety of websites (e.g. search engine results pages, Wikipedia reference links), as well as by end users when sharing links from a browser.
Risks
Low risk: A browser that doesn’t yet support this feature will attempt to match a CSS selector encoded in the URL fragment using the existing logic to find a potential indicated element. A fragment-encoded CSS selector is prefixed with ‘targetElement=’ (see explainer), which is unlikely to match an id or name attribute, so we do not expect a matching element to be found. Thus, browsers that do not support this feature should fall back to the default behavior of not scrolling the document.
Low risk: If a web page is modified, existing links to that page with CSS selectors encoded in the fragment may either (a) no longer find a matching element, in which case the browser will not scroll (default/existing behavior), or (b) match an unintended element. To minimize the likelihood of these scenarios, we will publish recommendations for creating stable CSS selectors, based on related work to serialize and restore scroll anchors.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes
Link to entry on the feature dashboard
https://www.chromestatus.com/features/4771915918999552
Requesting approval to ship?
No.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/97dc5d16-29f5-f634-e3bc-abdfc2f26e8d%40mit.edu.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADLGQyAkgPxP7iCPniLyiB5XUXt%3DZwLJoEZG3_NrfjWNrSixVA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADLGQyAMGxVkKa1_D6KDoP7LAB2K5hGJOPs31zvKtdBkM-d2ig%40mail.gmail.com.
You did not respond to the other concern -> Also, unsuspecting authors can have certain parts of the page revealed before they intended (an answer to a question, a surprise...), this sort of creates a public API out of implementation details.> Perhaps adding a way to designate certain (or all) elements as externally scroll-able would alleviate the concern.