Skip to content

Commit

Permalink
INTERIM-151 Remove redundant WAI-ARIA attribute (#164)
Browse files Browse the repository at this point in the history
* INTERIM-151 Remove redundant WAI-ARIA attributes

* INTERIM-151 Add labels for nav elements
  • Loading branch information
angelamnr authored Mar 27, 2018
1 parent dea9c6c commit 9a5d8de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions preprocess/preprocess-region.inc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,4 @@ function suitcase_interim_alpha_preprocess_region(&$vars) {
unset($vars['elements']['#grid']);
unset($vars['elements']['#grid_container']);
}
elseif (strpos($vars['region'], 'sidebar') === 0) {
$vars['attributes_array']['role'] = 'complementary';
}
}
2 changes: 1 addition & 1 deletion templates/region--content.tpl.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<main role="main"<?php print $attributes; ?>>
<main <?php print $attributes; ?>>
<div<?php print $content_attributes; ?>>
<a id="main-content"></a>
<?php print render($title_prefix); ?>
Expand Down
6 changes: 3 additions & 3 deletions templates/region--isu_menu.tpl.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div<?php print $attributes; ?>>
<div<?php print $content_attributes; ?>>
<?php print $content; ?>
<nav id="isu-menu-nav" class="navigation" role="navigation">
<nav id="isu-menu-nav" class="navigation" aria-labelledby="isu-index isu-quick-links">

<h2 class="element-invisible">ISU Index Menu</h2>
<h2 id="isu-index" class="element-invisible">ISU Index Menu</h2>

<ul id="isu-index-menu" class="sm" data-sm-options="{ subIndicatorsText: '', subMenusMinWidth: '', subMenusMaxWidth: '', subIndicatorsPos: 'append' }">
<li><a href="https://www.iastate.edu" title="Iowa State University Home Page">iastate.edu</a></li>
Expand Down Expand Up @@ -40,7 +40,7 @@
</li>
</ul>

<h2 class="element-invisible">ISU Quick Links Menu</h2>
<h2 id="isu-quick-links" class="element-invisible">ISU Quick Links Menu</h2>

<ul id="isu-quick-links-menu" class="sm" data-sm-options="{ subIndicatorsText: '', subMenusMinWidth: '', subMenusMaxWidth: '', subIndicatorsPos: 'append' }">
<li><a href="https://info.iastate.edu/">Directory</a></li>
Expand Down
4 changes: 2 additions & 2 deletions templates/region--menu.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<?php print $content; ?>

<?php if ($main_menu_smartmenu): ?>
<nav id="main-menu-nav" class="navigation" role="navigation">
<nav id="main-menu-nav" class="navigation" aria-labelledby="main-menu-label">

<h2 class="element-invisible">Main menu</h2>
<h2 id="main-menu-label" class="element-invisible">Main menu</h2>

<!-- Mobile menu toggle button (hamburger/x icon) -->
<input id="main-menu-state" class="sm-menu-state" type="checkbox" />
Expand Down

0 comments on commit 9a5d8de

Please sign in to comment.