How do I tell visitors that a link opens a file or leaves the website?
Quick answer
Write link text that describes what visitors will reach. When useful, add a short note naming a file’s format or size, or warning that a link opens a new tab or window. Check the actual resource and link behavior before adding those details: a URL alone does not confirm what a file contains or how a link behaves. [S1] [S2]
The question, the details, the next step.
A practical checklist
Write link text that describes its destination.
Check whether the target is a file or a web page.
Verify any file format or size before stating it.
Test whether the link opens a new tab or window; warn visitors if it does.
Distinguish an external destination from a new-tab link or file download.
Remove notes that are unverified or do not help visitors choose.
A few more useful answers
Should I label every link to another website as opening a new tab?
No. A link leaving your website and a link opening a new tab describe different properties. Check the actual behavior before adding a new-tab warning. [S2]
Do I need to include a file’s format and size every time?
Include those details when they help visitors decide whether to open the file, and verify them first. W3C identifies document type and file size as examples of useful target information, not details that must appear on every link. [S1]
Sources
References used for this guide.
- [S1] Writing for Web Accessibility – Tips for Getting Started w3.org · Checked
- [S2] G201: Giving users advanced warning when opening a new window w3.org · Checked
