Skip to content

Conversation

@qwertychouskie
Copy link
Contributor

I kept coming across instances where the lack of differentiation between external links an non-external links was somewhat confusing. This fixes any potential for confusion, while also making external links open a new tab when clicked.

Before:
image

After:
image

Copy link
Member

@abidingabi abidingabi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not a fan of this change; I don’t like breaking web conventions. The external links icon is fine, though it looks a little strange, but opening in a new tab is not how links behave. I am also not a massive fan of adding another dependency just for this; this is straightforward enough to do on our own; see e.g. https://css-irl.info/styling-external-links-with-attribute-selectors/.

@qwertychouskie
Copy link
Contributor Author

qwertychouskie commented Sep 24, 2025

I’m not a fan of this change; I don’t like breaking web conventions. The external links icon is fine, though it looks a little strange, but opening in a new tab is not how links behave. I am also not a massive fan of adding another dependency just for this; this is straightforward enough to do on our own; see e.g. https://css-irl.info/styling-external-links-with-attribute-selectors/.

Opening external links in a new tab is a standard/recommended UX convention for sites like this where the user is expected to want to still have the site open when opening an external link, see e.g. https://uxwest.com/when-why-how-website-links-should-open-new-tabs/ and https://ux.stackexchange.com/a/53551/82101 for explainers.

As for the external dependency, the amount if code is quite small (https://github.com/ftnext/sphinx-new-tab-link/tree/main/src/sphinx_new_tab_link), and while we could copy-paste it, TBH that feels messier than just importing it. If you or someone else wants to do it this way, I don't feel any strong objection to it, but I probably won't do it myself as I have a lot if other stuff on my plate (e.g. getting the rest of #458 finished and in reviewable individual PRs).

@abidingabi abidingabi closed this Sep 25, 2025
@qwertychouskie
Copy link
Contributor Author

qwertychouskie commented Sep 25, 2025

Additionally, from W3C (https://www.w3.org/WAI/WCAG21/Techniques/general/G200):

...
However there are some situations where it is preferable from an accessibility perspective to open a new window or tab. Here are two such situations:

  • Opening a page containing context-sensitive information, such as help instructions, or an alternate means of completing a form, such as a calendar-based date picker, will significantly disrupt a multi-step workflow, such as filling in and submitting a form, if the page is opened in the same window or tab.

...

This is (AFAIU) certainly applicable to at least guide pages (e.g. the Android Studio setup guide), and I'd argue it could reasonably extend to all external links in gm0 due to the nature of what gm0 is (a guide/reference).

Would a version of this PR that brought in the applicable code directly be accepted? I'm very passionate about UX (and UX is a not-insignificant part of my paid software development job) and see this change as a significant UX fix/improvement.

@qwertychouskie
Copy link
Contributor Author

(Also, FWIW, the official FTC documentation opens external links in new tabs and adds the icon, see https://ftc-docs.firstinspires.org/en/latest/cad_resources/index.html for example.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants