Live data from Hacker News

Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

alfy.blog

51–60 of 145 posts

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#53

Sidenote: please don't hijack CTRL+F on webpages, thanks. Sincerely, the world.

Hijacking CTRL+K sucks, too! It's the shortcut used to focus the browser search input in Firefox, but the industry has seemingly decided it's a great way to launch a command palette.

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#54

Earlier quoted context omitted.

I'm not complaining. What I'm trying to highlight is, as it says on the caniuse.com page, this feature has "Limited availability across major browsers", and that is to be expected and accepted. If you're thinking of promoting use of this non-standard feature, consider how many people it _doesn't_ work for, rather than thinking "oh and yes even Firefox (asoftendaysagoandonlythedesktopmainlinereleasenottheesrormobileve…

Is there an alternative? Do users with browser that don't have support have a worse experience when these links are used? I thought no...

As an alternative, all browsers the traditional scrolling to named element using a URL fragment, e.g. https://en.wikipedia.org/wiki/URI#Syntax goes to the "Syntax" section of the page. While the reason of text fragments it to allow for similar linking where there isn't an element with an id, most pages with non-changing text tend also to have non-changing layout and element ids.

If you generate links that include and depend on #:~:text= to make sense, accept that it will confuse users whose browsers do not support it. They will be linked to the top of the document and no text will be highlighted. Consider not only linking, but also quoting what you wanted to be highlighted, e.g.

    John says he dislikes it:
    
       Down with this sort of thing. I dislike this and can't abide it.
    

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#55

Sidenote: please don't hijack CTRL+F on webpages, thanks. Sincerely, the world.

Please don't hijack HN threads with unrelated gripes about the modern the web and please don't pretend to speak for the world.

Unrelated? CTRL+F is literally in the title...

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#56
post #52

It’s really cool but it seems rather convoluted for the typical user. We should perhaps start making good use of the ID attribute and linking to that first before we start trying to use ~:text=

Using text fragments is particularly useful when you don't control the page you're linking to and it doesn't have a good anchor to link to.

Re: Smarter Than 'Ctrl+F': Linking Directly to Web Page Content

#57
I wonder whether it was a mistake to separate this feature from a standard selection.

I don't know how to design it separately. The default is that selections are blue and fragments are purple, but if you choose different colors for both, in line with your color scheme, how will people know which is which? I guess you can still choose different tones of blue and purple.

Why shouldn't selecting text automatically update the address?

Post reply on HN