Skip to content

Commit

Permalink
INTERIM-152 Add aria-labelledby to blocks (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelamnr authored Mar 27, 2018
1 parent 9a5d8de commit 908b130
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions preprocess/preprocess-block.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

/*
* Implements THEMENAME_alpha_preprocess_block
*/
function suitcase_interim_alpha_preprocess_block(&$vars) {
// Support aria-labelledby
if ($vars['block']->subject) {
$vars['title_attributes_array']['id'] = drupal_html_id($vars['block']->subject);
$vars['attributes_array']['aria-labelledby'] = $vars['title_attributes_array']['id'];
}
}

0 comments on commit 908b130

Please sign in to comment.