Specify link destination
When linking to non-HTML content like documents or media files, explicitly indicate the file type and size in the link text or immediately after it. For example, use "Annual Report (PDF, 2.5MB)" rather than just "Annual Report" when linking to downloadable files. This practice helps users anticipate potentially lengthy downloads or the need for specific software to open the content.
Never use raw URLs as link text, even if they seem self-explanatory. Screen readers read URLs character by character, turning www.example.com into a tedious "double-u double-u double-u dot example dot com." This creates a frustrating experience for screen reader users. Instead, use descriptive text that explains the destination, such as "Example Company Website" or "Product Documentation."
When your links lead to actions rather than destinations, make this clear through your link text. For instance, use "Subscribe to newsletter" instead of "Newsletter" to indicate an action will occur rather than simply navigating to a page.
Pro Tip: If you're using image-based icons to indicate file extension, add alt text to make it accessible to screen reader users.