Accessible Helper Modules is a group of modules to
make creating accessible websites easier.
At this point it is more of a proof of concept than a useful module.
The modules' functionality are
divided up as such:
Accessible API Module (accessible_api)
General toolset including guidelines data, site accessibility preferences,
and functions other modules may build on.
Functionality
- store any reusable data such as guidelines and mapping of guidelines
to drupal authoring contexts.
- configuration interface and retrieval function for site accessibility guideline preferences.
The idea here is store the general accessibility preferences here, but utilize
preferences in other modules and themes.
- configuration of accessibility conventions preferences where practices are not yet clear.
e.g. should content be positioned off screen left, top, or right
Accessible Fix Module (accessible_fix)
Accomodate and fix accessiblilty deficiencies
in core and contributed module. Works on a case by case basis with hooks like
hook_form_alter to modify other modules forms and markup. As a rule, these
are either stop gap measures until real fixes are made in modules or when
accessibility implementation is unclear or preference based.
Functionality
- examples include google_cse and search module in drupal 6 needing labels.
- allows for offscreen heading configuration in blocks
- allows for applying aria roles to blocks
Accessible Help Module (accessible_help)
Adds contexttual accessibility help for content authors.
- provides contextual help through hook_help
examples folder
Much of accessiblity is on the theming layer, so example .tpl and template.php overrides
are included in the examples directory of this module.
Install and Configure
- Enable the module(s) you want to use. All require accessible_api. (admin/build/modules/list)
- Give site admins permissions to "administer accessible module" (admin/user/permissions)
- Configure the accessible_api module. (admin/settings/accessible)
- Configure Accessible Fixes Module (admin/settings/accessible/accessible_fix)
At this point, nothing has changed in the HTML of your site unless you have a theme that is
already altered to leverage this module.
The following template changes will allow your setting to
affect the HTML.
Working with block.tpl
Blocks can leverage the accessible_api and accessible_fix by adding aria roles and positioning headers off
screen.
Positioning block headers off screen
- Enable offscreen headers. A checkbox for "Class this block's header tag as "offscreen" should be there
if "offscreen block headings" has been checked in Accessible Fix Settings (admin/settings/accessible/accessible_fix).
- Alter the block.tpl (this is in examples/genesis_aria/templates/block/block.tpl)
from
<h2><?php print $block->subject ?>
to
<h2 <?php if ($block->accessibility->offscreen) { print 'class="offscreen"';}?>><?php print $block->subject ?></h2>
- Configure some blocks to have offscreen headers. Navigate to block configure (admin/build/block/list/[theme])
and select the configure link.
- Flushing the theme cache may be necessary until this module is farther along.
Adding ARIA Roles to the block
- Make sure you have enabled some role goupings such as landmarks, document dtructure,
widget, abstract (admin/settings/accessible). This controls the roles available.
- Alter the block.tpl (this is in examples/genesis_aria/templates/block/block.tpl)
from
<div class="block-inner">
to
<div class="block-inner" <?php
if ($block->accessibility->aria_attributes) {print 'role="'. $block->accessibility->aria_attributes .'"' ;} ?>
>
- Configure blocks to have aria roles. Navigate to block configure (admin/build/block/list/[theme])
- Flushing the theme cache may be necessary until this module is farther along