Skip to content

Commit

Permalink
1.2.5, check changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico Kaltofen committed Apr 12, 2019
1 parent aa30dfc commit d1449a6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,16 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.2.5] - 2019-04-12

### Fixed
- accessibility support fixed, dropdownRoots are now buttons (toggle dropdown on focus with enter/space and tab through dropdown if toggled)

## [1.2.4] - 2019-01-22

### Fixed
- added `aria-current="page"` to active links

## [1.2.3] - 2019-01-22

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,6 +2,6 @@
"name": "contao-buttermenu-bundle",
"version": "1.0.0",
"dependencies": {
"contao-buttermenu": "^1.1"
"contao-buttermenu": "^1.2.10"
}
}
Expand Up @@ -13,10 +13,10 @@
<?php $liClass = [$item['class'], 'bm-item', (!empty($item['subitems']) ? 'bm-has-popup' : '')]; ?>
<?php $linkClass = [$item['class'], ('level_1' === $this->level ? 'bm-root-link' : ''), 'bm-link', (!empty($item['subitems'] && 'level_1' === $this->level) ? 'bm-has-dropdown' : ''), (!empty($item['subitems']) ? 'bm-has-popup' : '')]; ?>
<?= sprintf(
'<li class="%s" itemprop="name"%s><a href="%s" title="%s" class="%s"%s%s%s%s%s%s%s%s%s><span itemprop="name">%s</span></a>%s</li>',
'<li class="%s" itemprop="name"%s><%s href="%s" aria-label="%s" class="%s"%s%s%s%s%s%s%s%s%s><span itemprop="name">%s</span><\/%s>%s</li>',
trim(implode(' ', $liClass)),
(!empty($item['subitems']) ? ' aria-haspopup="true"' : ''),
$item['href'] ?: './',
('level_1' === $this->level && !empty($item['subitems']) ? 'button' : ('a href=' . $item['href'] ?: './')),
$item['pageTitle'] ?: $item['title'],
trim(implode(' ', $linkClass)),
(($item['accesskey'] !== '') ? ' accesskey="'.$item['accesskey'].'"' : ''),
Expand All @@ -29,6 +29,7 @@
(!empty($item['subitems']) ? ' data-bm-popup="'.\Contao\StringUtil::standardize($item['title']).'"' : ''),
(true === $item['isActive'] ? ' aria-current="page"' : ''),
$item['link'],
'level_1' === $this->level && !empty($item['subitems']) ? 'button' : 'a',
'level_1' !== $this->level ? $item['subitems'] : ''
); ?>
<?php endforeach; ?>
Expand Down

0 comments on commit d1449a6

Please sign in to comment.