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 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
aria-labelledby attribute to signify to users that they will likely want to navigate to the section easily.
Disclaimer for sharing contact information
The Small Disclaimer is a more compact for fitting into more crowded areas.
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.
<script src="https://firstname.lastname@example.org/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.
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();
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.