Aria Landmarks placement in page.tpl.php

Events happening in the community are now at Drupal community events on www.drupal.org.
rgchi's picture

In our page.tpl.php theme override, there exists the following line.

<!-- footer row: width = grid_width -->
<?php print theme('grid_row', $footer . $footer_message, 'footer', 'full-width', $grid_width); ?>

In order to correctly insert Aira Landmarks, am I correct in assuming the following:

<!-- footer row: width = grid_width -->
<span role="contentinfo">
<?php print theme('grid_row', $footer . $footer_message, 'footer', 'full-width', $grid_width); ?>
</span>

Comments

Block ARIA Landmark Roles module

opdavies's picture

If you're using Drupal 7, then I've written a module that allows for you to add ARIA landmark roles to blocks via the block configuration form. The module is at http://drupal.org/project/block_aria_landmark_roles.

Drupal 6

opdavies's picture

I'm also planning on releasing a Drupal 6 version within the next few days.

We'd be happy to test it out

rgchi's picture

I'd be more than happy to test out and perhaps even contibute code to the D6 version if you're looking for a collaborator.

Great

opdavies's picture

I've just released a Drupal 6 version, but I'm always happy for contributions going forward. :)

The Drupal 6 version is now

opdavies's picture

The Drupal 6 version is now available.

Any chance this module could

rgchi's picture

Any chance this module could add Aria Landmarks to Drupal 7 regions?

No, it wouldn't as it

opdavies's picture

No, it wouldn't as it utilises the hook_preprocess_block() function. You could either enter the ARIA roles directly into the page.tpl.php file, or I could write another module that allows for you to dynamically enter ARIA roles for each region within the enabled themes. If anyone is interested in sponsoring the development of this module, please get in touch with me. :)

Link added

rgchi's picture

I just added a link to the Aria module and this page. http://drupal.org/node/394252

Great, thanks! :)

opdavies's picture

Great, thanks! :)

D8 as well?

bowersox's picture

Wasn't there also an issue open for getting this functionality into core for D8?

I can't find the issue in the issue queue, so did it already get finished and committed or am I incorrect?

html5 initiative

Everett Zufelt's picture

I believe that the html5 initiative is attempting to refactor tpls w/ ARIA roles in mind. I believe that the default roles for blocks in core did get committed to D8

Accessibility Consultant & Web Developer - Zufelt.ca
@ezufelt on Twitter | LinkedIn profile

Thanks to all the responses

rgchi's picture

I must commend the module by opdavies that puts a new field into blocks which becomes the Aria Landmark role (http://drupal.org/project/block_aria_landmark_roles.). Good job.

I ended up editing overriding our theme's page.tpl.php file. We're using Drupal Commons and not much content is tied to blocks.

At a meetup someone mentioned that I could, for example, use a xpath like query selector on $vars['content'] in a hook_proprocess_html function to find instances of class="content_main" and append role="main". In that way, we could ensure landmark roles no matter the selected template.

Thoughts?

Issues Need to get Marked RTBC

mgifford's picture

There are a few ARIA related issues - http://drupal.org/project/issues/search/drupal?issue_tags=aria - that are sitting to be marked RTBC. I can't do them as for the most part I wrote the patches.

Accessibility

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: