Chrome "Print to PDF" anchors links not working - google-chrome

This is the html:
Play the game
The text shows up in "Print to PDF", but it's not a hyperlink. The text is not obfuscated in any way (I can copy paste it). I have found no relevant links to this issue, though multiple links have come up with people saying it works like magic.
The anchors do have event listeners which sometimes block page change (SPA), but I can't imagine that being part of the "print to pdf" logic.

Related

"Scroll to text fragment" and another hash action in link

Does anyone know if there is a way to use the "scroll to text fragment" feature in a link (e.g. "http://url.com/page/#:~:text=highlight%20this") in addition to another hash action in the same link?
I have a page with tabs (its a divi tabs module in wordpress) and when clicking link on another page coming to this page I would like to open a tab (can be done with "http://url.com/page/#tab|2") and also highlight text within that tab.
Does anyone know how to do this?
If I first go to "http://url.com/page/#tab|2" (opens the tab) then append "#:~:text=highlight%20this" or "&:~:text=highlight%20this" to the end of the url, it achieves the desired affect. But it does not when going directly to "http://url.com/page/#tab|2#:~:text=highlight%20this" (it just redirects back to "http://url.com/page/#tab|2")
Any ideas would be appreciated.

Accessibility: "downloading file" dialog isn't active in IE

I am improving the accessibility of a website to make sure users can easily navigate using the keyboard only. There is a button that generates a file, but after clicking on the button, the generic browser download dialog appears at the bottom of the page, and the focus still stays on the button. Users with a screen reader are not notified about the dialog.
There is a way to focus on the dialog when it appears?
I am able to focus on elements of the page, but since the dialog is a browser feature, I have no idea how to do it!?
I will appreciate any guidance what can you give me. Thank you!
You do not have control to do this, plus this is expected behaviour and there is nothing you need to do.
Screen reader users will go out of the active screen using shortcut keys if they wish to access the file.
Other considerations as you said "button" in your question
You should not use a <button> element to generate a file. File downloads should always be a hyperlink (<a>).
If the document requires variables to be passed and you are able to pass them via a GET request then the hyperlink href should be the URL + GET parameters.
The advantage of this for everyone is that they can middle click to open the document in a new window (or right click and choose "open in new window" etc.), plus it works without JavaScript and is easily indexed by Search Engines.
Also adding the download attribute to a hyperlink has some advantages, especially as in some screen readers it gets signalled to users that this link will download a document.
When creating a download link you should state the document type (pdf, word etc.) and document size for accessibility. You can do this with visually hidden text if your design does not allow for it.
I have written a reasonably in-depth answer on how to add the file size and file type info for screen readers here. About 70% of it is relevant to you.

Firefox back button behaves strangly following link to id in same page

I'm getting some weird behaviour with the Firefox back button after linking to id's in the same page. If I have some basic html like this:
link to header
... chunk of content ...
<h2 id="some_id">header</h2>
The first click on the link takes me to the header and the first click on the browser back button takes me back to the link. All good. But if I click the link again and then click the back button a second time the browser gets confused. The screen doesn't go back to the link. Worse if I scroll back then whenever the mouse hovers over the link (or even the address bar) the screen shoots back to the header without anything being clicked.
Here's the fun part. If I do click anywhere on the page after that second visit to the header then the back button works as normal. Also, if I open the dev tools overlay then the back button works as normal.
I've tried this with a totally stripped down file - just plain html with no scripts (even no css) - to remove any unseen errors.
Has anybody else run into this? Found a fix?

Style a button to maintain its highlighting after leaving the page and returning

When a link is clicked and the browser redirects to another page the highlighting is maintained when revisiting the original page. This allows the user to know which links she has clicked even after they have left the page. Is it possible to apply this same functionality to a button?

Back button of Google Chrome after clicking a hyperlink whose target is on the same PDF document

PDF documents have hyperlinks to the contents on the same document (analogous to "#section" hrefs for an HTML document). Where's the back button to go back to the page I was on (where I clicked the hyperlink).
Let's say I'm on the index of a PDF tutorial, page 4, and I click on Chapter 2's hyperlink in the index that takes me to page 38. Now, if I want to go back to page 4 again, which button or shortcut should I use?
Within all browsers, excpet Google Chrome, you can press Alt and the left arrow to achieve this. Is there a similar shortcut within Google Chrome?
AFAIK there is no way to do it with the standard Chrome PDF Viewer. Take a look at their support page https://support.google.com/chrome/answer/1060734. You could try requesting this feature but keep in mind that the PDF viewer is part of Chrome, not Chromium.
While the builtin pdf reader in Chrome does not support Alt + Left you can use this chrome extension, to replace the pdf reader with one that supports the Alt + Left functionality that you desire. Moreover, when using this extension, if you press the back button on chrome's address bar it takes you back to the previous view.
I think it is simpler to just open the hyperlink in a new tab e.g. with the middle mouse button. Then you can just close the tab afterwards.
Alt + Left should be what you want.