2017 © Pedro Peláez
 

silverstripe-module accessibility

Adds access key support to SilverStripe

image

silverstripe/accessibility

Adds access key support to SilverStripe

  • Tuesday, February 16, 2016
  • by rcurry
  • Repository
  • 15 Watchers
  • 4 Stars
  • 2,813 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 5 Forks
  • 3 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

Accessibility

Overview

The module allows editors to specify access keys for pages and have them all listed in an access key directory., (*1)

Requirements

  • SilverStripe 3.0+

Installation

Install with composer by running:, (*2)

composer require silverstripe/accessibility:*

in the root of your SilverStripe project., (*3)

Or just clone/download the git repository into a subfolder (usually called "accessibility") of your SilverStripe project., (*4)

After either installation method, you'll need to run dev/build., (*5)

Usage

Adding Access Keys

In the Settings tab of each page you'll find an Access Key text field. You can enter in any single character in here. This will be available as $AccessKey in the templates. In order for accesskeys to be available, they must be defined as links on all pages. One way to do this is within a hidden div in the footer of your page:, (*6)

<div class="hidden accesskeys">
<% loop AccessKeys %>
    <a href="$Link" accesskey="$AccessKey">$AccessKey = $Title</a>
<% end_loop %>
</div>

This markup can be found in AccessKey.ss, and can be included in your footer as:, (*7)

<% include AccessKeys %>

If you do not have styles defined for the hidden class, you should put this in your layout css (or scss) file:, (*8)

.hidden{
    display:none;
}

This has already been implemented in the express theme., (*9)

Adding an Accessibility Page

The module adds an Accessibility Page page type. Templates for this page can use $AccessKeys to list all pages on the site that have an access key set. So for example:, (*10)

<% if AccessKeys %>
<table class="table">
    <thead>
        <tr>
            <th>Key</th> 
            <th>Page</th>
        </tr>
    </thead>
    <tbody>
        <% loop AccessKeys %>
            <tr>
                <td>$AccessKey</td>
                <td><a href="$Link">$Title</a></td>
            </tr>
        <% end_loop %>
    </tbody>
</table>
<% end_if %>

The template for this page type can be found at templates/AccessibilityPage.ss., (*11)

The Versions

16/02 2016

dev-master

9999999-dev

Adds access key support to SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

by Robert Curry

silverstripe accessibility access key

08/04 2013

3.0.x-dev

3.0.9999999.9999999-dev

Adds access key support to SilverStripe

  Sources   Download

BSD-3-Clause

The Requires

 

by Robert Curry

silverstripe accessibility access key