Hyperlinks

Hyperlinks

Follow these requirements and best practices to meet accessibility requirements and ensure a good user experience when navigating your website.

IMPORTANT - Ensure that all links adhere to the Citywide Linking Policy.

Examples

The following are examples of good and bad link text:

Good

  • Download the December agenda
  • Visit ACCESS NYC

Bad

  • Click here
  • Learn more
  • Download the Commissioner's Monthly Meeting Agenda for December 2018
  • Visit ACCESS NYC at https://a069-access.nyc.gov/ACCESSNYC/application.do

Prohibited Links

Official City websites must not link to:

  • Any content that supports or opposes candidates for office, political campaigns, political parties, referenda, or bills pending before legislatures unless the bill has been introduced, submitted, or formally supported or opposed by the City; 
  • Any content that depicts or describes violence, nudity, or sexual activities in a way that would violate the NYS Penal Law; 
  • Any content that includes hate speech or promotes discrimination based on religion, race, gender, national origin, or sexual orientation; 
  • Any content that aids or incites crime; 
  • Any content that would be perceived as an endorsement or advertisement for a commercial entity or product;
  • Any site whose primary content does not advance a City purpose. 

Requirements for Accessible Links & Best Practices

  • Use short, descriptive link text (Required for accessibility Learn more about using descriptive link text.).
  • Translate the text of links in other languages to that language and markup with language codes (Required for accessibility Learn more about content or links in other languages.)
  • Don't use color only as a way of distinguishing links. (Required for accessibility Learn more about link style/color.)
  • Don't enclose "Back to Top" links in brackets or parentheses. (Best Practice for accessibility Learn more about "back to top" links.)
  • Insert links after paragraphs rather than within, as often as possible.
  • Use consistent capitalization (i.e., title case or initial caps) across links on your site when they fall outside of paragraphs.
  • Include links to any websites listed in your content (e.g., Visit the Department of Health website).
  • Set up relative links instead of absolute links for links to pages within your site. In TeamSite, "browse" to set them up to ensure that they will be relative. This will ensure that you are not linking to TeamSite or to your test site in content staging.
  • Include the link to an "Inside Page" (e.g., Level 4 page) within the body content of the "Left Nav Page" (e.g., Level 3 page) above it.
  • Include numbered anchor links at the top of long pages of frequently asked questions and a "back to top" link after each answer.
  • Mark all non-html (e.g., PPT, Excel, etc.) files that launch other programs with "(in Word)," "(in Excel)," "(in PPT)," etc., accordingly (e.g., Download the data file (in Excel)). You do not need to mark PDFs; modern browsers open them. When naming supplemental documents...Create filenames that are as short as possible and yet descriptive. Make the filenames all lowercase. DO NOT include spaces or special characters in the filename; hyphens may be used.
  • Don't list full URLs within the content; hide URLs behind short, descriptive link text.
  • Don't use "click here," "learn more," or other general/vague link text. Doing so makes link in accessible.
  • Don't set links to open in new windows. Doing so creates a poor user experience. If a link must open in a new window, you must discuss it with us and include "(opens in a new window)" beside the linked text.
  • Don't link headings and sub headings.

External Links/NYC.gov Exit Script

The NYC.gov exit script, a disclaimer, which tells users they are leaving NYC.gov, will automatically appear when a user clicks an external link. You no longer need to add it to the external link in TeamSite.