Set Up DocAccess on Your Website

Prev Next

DocAccess Helper Script

The DocAccess helper script is a lightweight JavaScript file that enables accessible document viewing on your website. It can be added in two ways:

<script async src="https://docaccess.com/docbox.js"></script>

Use when:

  • You have direct access to edit your site's HTML header

  • Your CMS allows custom HTML scripts

  • You're using WordPress plugins, Drupal blocks, or similar

Dynamic JavaScript

(function() { const docboxScript = document.createElement('script'); docboxScript.src = 'https://docaccess.com/docbox.js'; docboxScript.async = true; document.head.appendChild(docboxScript); })();

Use when:

  • Your CMS restricts HTML but allows JavaScript

  • You're using Google Tag Manager

  • You're working with single-page applications (React, Vue, Angular)

  • Your platform has strict Content Security Policies


How it Works

When the code is added to the site's header, it helps detect PDF links on your website to assist your administrator in inventorying your documents. DocAccess will not otherwise modify the website.

Once activated by your site administrator:

  1. The helper script will then check links against its manifest to identify DocAccess-enabled documents.

  2. For those enabled documents, it provides users with an accessible viewing option instead of traditional downloads, ensuring compatibility with screen readers and assistive technologies, either by updating links or adding a click behavior

  3. Contents are loaded either in a new tab or in a lightbox secured by an iframe, to isolate the accessible viewing application from your website.


Installation Instructions

You can install DocAccess using either the standard HTML script tag or the dynamic JavaScript approach. Most platforms support both methods, but some may require one over the other. View product-specific instructions:


Alternatives to Adding the Helper Script

If you cannot add the DocAccess script to your website, here are some alternatives:

Accessible Documents Page

Create a dedicated page that lists all your accessible documents in one place.

  1. Log in to your DocAccess dashboard

  2. Navigate to your Domain Settings

  3. Use the provided Document List URL

  4. Link to this page from your main website in a conspicuous location

This provides users with a centralized location to access all your accessible documents without requiring the helper script.

Share direct links to specific accessible documents.

  1. Upload your documents to DocAccess

  2. Get the accessible URL for each document

  3. Use these URLs directly in emails, social media, or your website

Each document will have its own accessible URL that works without the script installed.

Send accessible document links using email to stakeholders who need them.

  1. Access your DocAccess dashboard

  2. Select the documents you want to share

  3. Use the Email Links feature

  4. Recipients can access documents directly from their email

  5. You can even specify a default language for the document, if needed


Security

DocAccess limits its permissions and follows industry-standard cybersecurity protocols to ensure your site remains secure.

Limited Permissions

The script only:

  • Inventories site links to PDF files

  • Fetches a site link manifest from docaccess.com/domains/[yourdomain.org]/domain.json

  • Adds special click actions only to documents that are enabled for DocAccess, based on an exact list (whitelist) provided in your site's manifest

  • Loads asynchronously, so it doesn't slow down your site and only works in the background when your site is finished loading.

Strict Security Practices

  • We follow industry-standard cybersecurity protocols.

  • We use HTTPS and HSTS for all connections using strict content security policies and limit cross-origin resource sharing to docaccess.com domains.

  • Our codebase is managed with strict version control and all changes require formal review and authorization. The DocAccess script is delivered using a secure, immutable CDN, protected by AWS CloudFront, and an enterprise-grade web application firewall to ensure integrity and prevent unauthorized modifications.

  • All permissions are solely used to ensure accessibility, prevent keyboard traps, and provide continuity of experience.


Cookies & Local Storage

Cookies and local storage are not required for DocAccess to function. However, they enhance the user experience by:

  • Remembering when users dismiss the AI warning dialog

  • Storing acceptance of terms and conditions

  • Maintaining user preferences for accessibility settings, like language translation

Without cookies/local storage, the experience is less convenient but not broken. Users may need to re-accept terms or dismiss warnings on each visit.

DocAccess will never share your site visitor's data with third parties, per our Privacy Policy.


Additional Resources