Comments (6)
This is a mistaken objection. The text of a page is far more resilient than the structure as templates are changed often. More importantly, the goal of linking is most often to refer to a particular piece of text, not some page structure. By embedding the text in the link this makes it more resilient, not less as the intent of the linker is clearer.
See how to present links as quotes as an example.
from scroll-to-text-fragment.
We should not forget that the use cases are potentially different. If the intention is to link to a publisher-provided identifier then the publisher can make those identifiers known, e.g. when GitHub sets the fragment to match the line you click in a file view.
Linking to text provides something the publisher has not specifically identified. That puts power in the hands of the content consumer. While it may be fragile, it's not something a consumer can do at all now.
This is not a choice between two alternatives.
Let's also keep in mind that just because "rot" might have negative connotations, link rot is not "bad", per se. The web relies upon the fragility of reference. A link might break, but the page containing it does not. When you convey a reference, you are conveying it with all its fragility and that's okay.
from scroll-to-text-fragment.
I tend to agree with the rationales above, mainly:
- Including the text in the link means the text can be surfaced to the user, even if it no longer appears in the page.
- This provides some additional context - in the worst case, we fallback to existing behavior so it's strictly not-worse.
The discussion was useful but I'm doing a clean-up pass over issues so I'm going to close this as there's nothing actionable here.
from scroll-to-text-fragment.
In addition to @kevinmarks' point above, the updated proposal now supports adding context snippets which can prevent the given example ("the lazy dog has a brown coat, and it looks just like a brown fox").
from scroll-to-text-fragment.
I think adding context could help make more specific links, but that would also make the links even more brittle as they now depend on other pieces as well. The proposal should work fine on immutable content, but content behind a URL can be modified over time. The original author does not know that their content is being linked this way, so they can't redirect the faulty link to the new location of the original content.
from scroll-to-text-fragment.
Sure, but presumably if the content moves, the page can redirect. Perhaps we can make the fragment survive a 302 in which case everything world work. Otherwise the user simply gets to the targetted resource without the targetText which is the current status quo.
Content behind a link can already change - at least with this proposal, we could surface the fact that the referenced text no longer exists on the page. In the worst case, we get today's behavior of simply navigating to the stale content. I fail to see how this makes anything worse...
from scroll-to-text-fragment.
Related Issues (20)
- Don't set focus to text fragments across origins HOT 5
- Cannot link to text snippet starting with hyphens (ASCII 0x2D) as common in CLI arguments HOT 3
- Syntax for PercentEncodedChar looks wrong HOT 3
- The spec is unclear on the relationship of percent-encoding and Unicode HOT 1
- Please reconsider the use of collator-based search HOT 14
- Opt-in to hide `text` fragment directive from scripts HOT 15
- Proposing other fragment directives HOT 6
- Ensure restrictions on text directive scrolling match reality HOT 1
- How should force-load-at-top interact with the new Navigation API
- Remove / Rephrase "4.3 Determine if Fragment Id is needed" HOT 4
- ʕ◔ᴥ◔ʔ :~: :~: :~: :~: :~: 𖠳 :~: :~: HOT 1
- Add informative note about the use of Unicode White_Space
- Explain searching for and   in the DOM HOT 1
- Please consider an alternative mitigation mechanism to word segmention HOT 5
- Why can't multiple texts be highlighted on the same page? HOT 8
- Behavior or ZeroWidthSpace HOT 4
- Websites where text fragment link does not work despite text being there and link syntax well formed HOT 11
- Behavior with CSS generated content
- document.fragmentDirective doesn't work for feature detection HOT 6
- Remove the mention of force-load-at-top from "Invoking Text Directives"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scroll-to-text-fragment.