Feature Requests

External links opening in new tabs should be optional (a11y)
Currently it seems that all external links in content are opened by default in new tabs. It would be nice if that were configurable, because there's a general consensus that it's bad for accessibility. The link behavior seems to be a core part of <Link/> : https://docusaurus.io/docs/docusaurus-core#link ("External links also work, and automatically have these props: target="_blank" rel="noopener noreferrer". " as of 2.0.0-beta.17) It looks like controlling the target of external links in the sidebar is planned -- https://docusaurus.io/feature-requests/p/support-target-for-sidebar-links -- maybe for navbars too? (At the moment target isn't listed as an available option on either.) But even if that ability lands, what I'm talking about is the default behavior of links within content pages. Overriding the default behavior would currently require using HTML <a> elements instead of standard Markdown links -- on every link. Evidence on why opening new tabs automatically is bad for a11y is pretty voluminous, but here's a quick rundown of links: https://www.w3.org/TR/WCAG20-TECHS/G200.html and the related failure criterion https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/F22 https://webaim.org/techniques/hypertext/hypertext_links#new_window https://www.nngroup.com/articles/new-browser-windows-and-tabs/ https://design-system.service.gov.uk/styles/typography/#opening-links-in-a-new-tab https://css-tricks.com/use-target_blank/ https://www.smashingmagazine.com/2008/07/should-links-open-in-new-windows/ https://belikewater.ca/blog/entry/linking-best-practice https://www.tempertemper.net/blog/opening-links-in-a-new-tab-or-window-is-better-avoided I'm not suggesting here to change the default behavior (although I'd be in favor of that), just to give Docusaurus users the ability to control this behavior. Especially since the current behavior will result in failure of WCAG 2.0 AA level and the UK gov'ts accessibility guidelines, as noted above. If for some reason you cannot provide control over this behavior, it would be nice to at the very least inform screen readers that these links will be opening a new tab using screen-reader-only text (CSS off-screen -- detailed here https://codersblock.com/blog/external-links-new-tabs-and-accessibility/#how-to-inform-your-users ) Thanks for considering.
5
·

under review

Load More