Repository navigation
Conversation
|
I'm a bit confused about the fix here; I would have expected there to be a condition that needs to be checked depending on |
|
That's the thing I did not figure out yet. The option seems to be applied at another level as I did not find anything in Edit: this is why removing this class makes the external new window option works. The option is used as part of a JavaScript script which is added to HTML when the option is true.
|
|
Just a note that this PR is exactly a revert of commit 8c61f7e So I don't know exactly why it was added this way with no-external, but it seems it was done on purpose. I'll ask Charles as he is around. |
|
Yes, I was looking into it to find what was the reason for this to be done only in the default. @dragonstyle in case you recall why you did add the |
|
Do not merge. |
|
I've tested on various website listings (6) and did not see any issues. |
|
I believe what needs to be tested if all the feature that removing From the code it seems to mean
Currently, both of this won't happen to links with After discussing with @dragonstyle last week, he does not remember why exactly but was warning us that it could have been made following some slack discussion for some of our doc website, and that it could trigger other stuff. Now, things may have changed since then, and maybe removing the class won't trigger anything bad 🤔 |
|
Indeed, that might be the issue Charles tried to fix. I think the "noexternal" fix is wrong. Wrong in the sense that other listing will have the same issues. What do you think? |
|
Updating this PR with the addition of a CSS rule to get the same display behaviour (no external icon in default listing). Code
---
title: "Test"
link-external-newwindow: true
link-external-icon: true
listing:
contents:
- path: https://www.nature.com/articles/d41586-024-00692-7
title: "China–US climate collaboration concerns as Xie and Kerry step down"
author: Smriti Mallapaty
description: "Gang's quote on the importance to continue the research exchange and colloboration 'If the river freezes over, water will still flow underneath.'"
date: "2024-03-12"
categories: [Nature]
- path: https://www.scientificamerican.com/article/what-the-u-s-china-agreement-means-for-greenhouse-gas-emissions/
title: "What the U.S.-China Agreement Means for Greenhouse Gas Emissions"
author:
- Benjamin Storrow
- Sara Schonhardt
description: "The two nations announced limited steps to address climate change. But even a modest agreement could have far-reaching effects."
date: "2023-11-16"
categories: [Scientific American, E&E News]
sort: "date desc"
categories: true
sort-ui: false
filter-ui: false
page-layout: full
title-block-banner: true
--- |
|
Thanks for working on this PR again. This is all quite a bit messy and, because it's close to reverting a previous commit, I don't think I'm comfortable merging it before adding tests that exercise the expected behavior for these different options. |
|
I'll try to figure suitable tests for behaviour and icons. Switching this to draft for now. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
If |
9810225 to
8f6b6be
Compare
|
@cscheid, I've reworked this so it no longer reverts the earlier fix. @cderv If you want to follow up on this. |
|
(fixing the issue with the tests) |
The data-quarto-external attribute ended up in the selectors axe builds, which changed finding signatures and broke matching against an axe baseline.
|
The smoke test Removing the marker fixes the test, and almost every decoration step is safe to repeat. Options I looked at:
For now, the PR follows the first option. |
# Conflicts: # src/resources/editor/tools/yaml/all-schema-definitions.json

Description
With
link-external-newwindow: true, external listing items now open in a new tab.Fixes #9468.
The external-link script skipped listing items because they carried
no-external, which turns off both the new tab and the icon.A new class,
no-external-icon, turns off only the icon, and default and grid items use it.no-externalkeeps its meaning, and an external link inside an item description keeps its icon.The listing reruns the script when pagination, filtering or sorting shows new items.
Quarto never tells screen reader users that a link opens a new tab, which fails WCAG technique G201 (success criterion 3.2.5), and this change opens more links that way.
Each link the script opens in a new tab now ends with a visually hidden "(opens in a new tab)", from a new language key
link-external-newwindow-label(English only for now).An external item without an image also left an empty thumbnail link in the tab order, which #15099 fixed only for items with a file; it is now hidden the same way.
Playwright tests cover default, grid and table listings, pagination,
minimal: true, axe-core, and a page without the option.Table rows still open in the same tab when clicked outside the link, which I'll address separately.
Checklist
I have (if applicable):
AI-assisted PR
Note: autonomous AI agents submitting PRs without human oversight are not permitted — see the Code of Conduct.