Disclaimer

Demonstration

Disclaimer for public benefit program screening

ACCESS NYC offers a screening tool that recommends public benefits programs for you to consider based upon information you provide about your household.

To enroll in a benefit, you need to apply through the appropriate administering agency. ACCESS NYC will tell you how to apply for any benefit on this website, but cannot guarantee eligibility. The administering agency will determine final eligibility upon your submission of an application for each program.

The information you share for purposes of public benefits screening will be anonymous and can be shared with City agencies to improve access to benefits and programs. To find out more about how the City might use the data you share with ACCESS NYC, visit the terms of use for nyc.gov, and privacy policy for nyc.gov.

Code

The Disclaimer contains import legal information for the user to read. It is similar to an Alert, however, it does not interrupt a user’s normal workflow. Disclaimers use the role="region" and aria-label or aria-labelledby attribute to signify to users that they will likely want to navigate to the section easily.

Demonstration

Disclaimer for sharing contact information

By providing your email address or phone number, you agree to be contacted by the City of New York regarding your ACCESS NYC public benefit screening results. Your activity on ACCESS NYC is anonymous, but providing your phone number may identify you and reveal that you used the website. To find out more about how the City might use the data you share with ACCESS NYC, visit the terms of use for nyc.gov, and privacy policy for nyc.gov.

Code

The Small Disclaimer is a more compact for fitting into more crowded areas.

Demonstration
Code

The Disclaimer Toggle shows or hides the disclaimer based on the visibility of another element on the page such as a form for sharing contact information (see the Share Form). It uses the aria-describedby attribute on the toggling button to find the disclaimer and reveal it.

When the viewport is less than 1112px wide the browser will scroll the area into view. This is to ensure that users see the disclaimer in smaller viewports.

Global Script

The Disclaimer Toggle requires JavaScript for showing and hiding. It also uses the Patterns Scripts Toggle Utility. To initialize the Disclaimer instance from the global script use the following code:

<script src="https://cdn.jsdelivr.net/gh/nycopportunity/standard@v0.0.19/dist/js/default.js"></script>

<script>
  var Standard = new Default();

  Standard.toggle(); // The Toggle Utility must be instantiated before the Disclaimer
  Standard.disclaimer();
</script>

This function will attach the main toggle and disclaimer toggling event to the body of the document.

Module Import

For module imports, import the Disclaimer module from the source. The Toggle Utility source exists in the Patterns Scripts utility library, which is a dependency of this library.

import Toggle from '@nycopportunity/pttrn-scripts/src/toggle/toggle';
import Disclaimer from '@nycopportunity/standard/src/components/disclaimer/disclaimer';

new Toggle(); // The Toggle Utility must be instantiated before the Disclaimer
new Disclaimer();
Constants

The module includes a constant named SCREEN_DESKTOP which determines wether the browser needs scroll the disclaimer in the browser’s view. The Rollup.js configuration replaces this constant in the script during processing with the number 1112px (without the “px”) so that when the browser width is less than 1112px wide the viewport will scroll area into view.

This constant will need to be defined or replaced in any project using the module.