Drupal Enterprise 7, 8: Adding the "Report Web Disability-Related Issue" Link to a Footer

As a site administrator or developer for a Drupal Enterprise 7 or Drupal Enterprise 8 website, you can add a link to your site's footer for users to report a website accessibility concern. Visitors can fill out this dynamic form to report concerns and optionally leave contact information for followup.

The current page URL will be included as a URL argument as the visitor is redirected to the form. Once submitted, a ticket is automatically created with all information the visitor included. To the best of their ability, OIT Drupal Support Staff will attempt to direct the ticket to the responsible web team for the site.  

This form does not assist with information on disability parking provided by Parking & Transportation Services or facilities-related accessibility issues which should be directed to the Disability Resources Center.  

Before you start

If your site does not use the OIT Drupal Platform Code, this article may not apply to your site.

If your site uses the UMN Cog or Bootstrap theme in Drupal 8, or the UMN Base theme in Drupal 7, the link ("Report Web Disability-Related Issue") will already be implemented in your site's footer so this article may not apply to your site. 

If you would like to include the "Report Web Disability-Related Issue" link in your site's footer, follow the steps in the appropriate section below. 

Drupal 8

The OIT Drupal Modules GitHub account contains a repository for Drupal 8 (D8) Configurations. Within the D8 Configurations repo, there are two config settings that can be used in templates instead of hardcoding the URL or text.

Config settings

For context, here are the two Drupal 8 config settings that are maintained in the OIT Drupal Platform code:

$config['system.site']['accessibility_reporting_script']

$config['system.site']['accessibility_reporting_text']

Using the Drupal 8 config settings

  1. Add the following variables in your theme's {mythemename}.theme file, inside a function called {mythemename}_preprocess_html :

    $variables['accessibility_reporting_link'] = \Drupal::config('system.site')->get('accessibility_reporting_script') . "?ref_url=$current_page_url"

    $variables['accessibility_reporting_text'] = \Drupal::config('system.site')->get('accessibility_reporting_text');

  2. Similar to the image below, add an anchor tag in an appropriate place (e.g., umn-footer.html.twig) using the following href attribute and link text:
    1. href value: {{ accessibility_reporting_link }}
    2. Link text:
      {{ accessibility_reporting_text }}
      Drupal 8 HTML anchor-tag with the specified HREF and link text.

    Drupal 7

    The OIT Drupal Modules GitHub account contains a repository for Drupal 7 (D7) Configurations. Within the D7 Configurations repo, there are two config settings that can be used in templates instead of hardcoding the URL or text.

    Config settings

    For context, here are the two Drupal 7 config settings that are maintained in the OIT Drupal Platform code:

    $conf['accessibility_reporting_script']

    $conf['accessibility_reporting_text']

    Using the Drupal 7 config settings

    1. Similar to the image below, add an anchor tag (in the appropriate file €” e.g., html.tpl.php) with the following href attribute and link text:
      1. href value (place code within a standard php tag, then set as href value):

        print $accessibility_reporting_link;

      2. Link text (place code within a standard php tag): print variable_get('accessibility_reporting_text');

        Drupal 7 HTML anchor-tag with the specified HREF and link text.

 

Additional Information

Accessibility at UMN ("Accessible U")

Audit Website Accessibility

UMN Information Technology Accessibility Policy

 

 

TDX ID
3695