Block ARIA Landmark Roles


A screenshot of the Search block configuration from with ARIA landmark role area

Inspired by Block Class, this module adds additional elements to the block configuration forms that allow users to assign a ARIA landmark role to a block.

For further information about ARIA landmark roles, go to https://www.w3.org/WAI/PF/aria or https://www.nomensa.com/blog/2010/wai-aria-document-landmark-roles.

Usage

Drupal 7

Ensure that the attributes variable is being printed within your block.tpl.php
file - the block module's default template does this by default. For example:

<div id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>

Drupal 6

Within your block.tpl.php, include the following snippet within the opening div tag:

<?php print $aria_role; ?>

Here is the first line of Garland's block.tpl.php before the code is inserted:

<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module ?>">

And here's what the code should look like after adding the snippet:

<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module ?>" <?php print $aria_role; ?>>

IMPORTANT: Remember to separate the PHP snippet from the existing markup with a single space.

#D7AX - I pledge to make this module as accessible as it can be. If you find any flaws, please submit an issue. Help me fix them if you can.


Block ARIA Landmark Roles项目的Drush安装命令:复制到剪贴板

注:个别模块仍需开启相关子模块。

项目分类:

周安装量: 
222
维护状态: 
积极维护中
开发状态: 
积极开发中

推荐版本下载:

版本下载地址发布日期发布说明翻译下载
8.x-1.1tar.gz (8.8 KB) | zip (11.31 KB)2016年10月19日发布说明简 | 繁 | 更多

开发版本下载:

版本下载地址发布日期发布说明翻译下载
8.x-1.x-devtar.gz (8.81 KB) | zip (11.31 KB)2016年10月26日发布说明简 | 繁 | 更多