mirror of
https://github.com/gantry/gantry5.git
synced 2026-08-18 17:04:53 -05:00
Accessibility: Menu / Offcanvas: Offcanvas and hamburger toggle menu are now ARIA compatible (fixes #1891)
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
## mm/dd/2017
|
||||
|
||||
1. [Common](#common)
|
||||
2. [](#bugfix)
|
||||
- Accessibility: Menu / Offcanvas: Offcanvas and hamburger toggle menu are now ARIA compatible (#1891)
|
||||
3. [](#bugfix)
|
||||
- Menu: Disable Dropdowns still Shows Indicator (#2031)
|
||||
- Menu: Fixed frontend menu 'Extended' option, resetting heights of wrapping containers not necessarily related to the menu itself (#2025)
|
||||
|
||||
@@ -208,6 +208,8 @@ var Offcanvas = new prime({
|
||||
var panel = this.panel[0];
|
||||
|
||||
this.htmlEl.removeClass(this.options.openingClass);
|
||||
this.offcanvas.attribute('aria-expanded', true);
|
||||
$('[data-offcanvas-toggle]').attribute('aria-expanded', true);
|
||||
panel.style.transition = panel.style[prefix.css + 'transition'] = '';
|
||||
}, this), this.options.duration);
|
||||
|
||||
@@ -230,6 +232,8 @@ var Offcanvas = new prime({
|
||||
this._setTransition();
|
||||
this._translateXTo(0);
|
||||
this.opened = false;
|
||||
this.offcanvas.attribute('aria-expanded', false);
|
||||
$('[data-offcanvas-toggle]').attribute('aria-expanded', false);
|
||||
|
||||
setTimeout(bind(function() {
|
||||
var panel = this.panel[0];
|
||||
|
||||
Vendored
+4
@@ -601,6 +601,8 @@ var Offcanvas = new prime({
|
||||
var panel = this.panel[0];
|
||||
|
||||
this.htmlEl.removeClass(this.options.openingClass);
|
||||
this.offcanvas.attribute('aria-expanded', true);
|
||||
$('[data-offcanvas-toggle]').attribute('aria-expanded', true);
|
||||
panel.style.transition = panel.style[prefix.css + 'transition'] = '';
|
||||
}, this), this.options.duration);
|
||||
|
||||
@@ -623,6 +625,8 @@ var Offcanvas = new prime({
|
||||
this._setTransition();
|
||||
this._translateXTo(0);
|
||||
this.opened = false;
|
||||
this.offcanvas.attribute('aria-expanded', false);
|
||||
$('[data-offcanvas-toggle]').attribute('aria-expanded', false);
|
||||
|
||||
setTimeout(bind(function() {
|
||||
var panel = this.panel[0];
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
{{ page_offcanvas|raw }}
|
||||
<div id="g-page-surround">
|
||||
{% if page_offcanvas|trim -%}
|
||||
<div class="g-offcanvas-hide g-offcanvas-toggle" data-offcanvas-toggle><i class="fa fa-fw fa-bars" aria-hidden="true"></i></div>
|
||||
<div class="g-offcanvas-hide g-offcanvas-toggle" data-offcanvas-toggle aria-controls="g-offcanvas" aria-expanded="false"><i class="fa fa-fw fa-bars"></i></div>
|
||||
{%- endif %}
|
||||
{{ page_top|raw }}
|
||||
{{ page_layout|raw }}
|
||||
|
||||
Reference in New Issue
Block a user