Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions js/views/drawerView.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class DrawerView extends Backbone.View {
return {
'aria-modal': 'true',
'aria-labelledby': 'drawer-heading',
'aria-hidden': 'true',
'aria-expanded': 'false'
'aria-hidden': 'true'
};
}

Expand Down Expand Up @@ -159,8 +158,7 @@ class DrawerView extends Backbone.View {
this.setDrawerPosition(position);
this.$el
.removeClass('u-display-none')
.attr('aria-hidden', 'false')
.attr('aria-expanded', 'true');
.attr('aria-hidden', 'false');
// Only trigger popup:opened if drawer is visible, pass popup manager drawer element
if (!this._isVisible) {
a11y.popupOpened(this.$el);
Expand Down Expand Up @@ -192,7 +190,6 @@ class DrawerView extends Backbone.View {
}

$('.js-drawer-holder').scrollTop(0);
$('.js-nav-drawer-btn').attr('aria-expanded', true);
Adapt.trigger('drawer:opened');

this.$el.addClass('anim-show-before');
Expand Down Expand Up @@ -236,7 +233,6 @@ class DrawerView extends Backbone.View {
if (!force) await transitionsEnded(this.$el);

this._customView = null;
$('.js-nav-drawer-btn').attr('aria-expanded', false);
Adapt.trigger('drawer:closed');

this._isVisible = false;
Expand All @@ -248,8 +244,7 @@ class DrawerView extends Backbone.View {
this.$el
.removeAttr('style')
.addClass('u-display-none')
.attr('aria-hidden', 'true')
.attr('aria-expanded', 'false');
.attr('aria-hidden', 'true');
this.setDrawerPosition(this._globalDrawerPosition);
}

Expand Down
3 changes: 1 addition & 2 deletions js/views/navigationView.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ class NavigationView extends Backbone.View {
const shouldIgnore = changes.every(([key]) => [
'attributes.data-a11y-force-focus',
'attributes.tabindex',
'attributes.aria-hidden',
'attributes.aria-expanded'
'attributes.aria-hidden'
].includes(key));
if (shouldIgnore) return;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/nav.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="nav__spacer" aria-hidden="true" data-order="{{_navOrder}}"></div>
{{/each}}

<button name="drawer" class="btn-icon nav__btn nav__drawer-btn js-nav-drawer-btn is-position-{{#if _config._drawer._position}}{{_config._drawer._position}}{{else}}auto{{/if}}" data-event="toggleDrawer" aria-expanded="false" aria-label="{{_globals._accessibility._ariaLabels.navigationDrawer}}" data-order="{{_globals._extensions._drawer._navOrder}}" data-tooltip-id="drawer">
<button name="drawer" class="btn-icon nav__btn nav__drawer-btn js-nav-drawer-btn is-position-{{#if _config._drawer._position}}{{_config._drawer._position}}{{else}}auto{{/if}}" data-event="toggleDrawer" aria-haspopup="dialog" aria-label="{{_globals._accessibility._ariaLabels.navigationDrawer}}" data-order="{{_globals._extensions._drawer._navOrder}}" data-tooltip-id="drawer">
<span class="icon {{#if _config._drawer._iconClass}}{{_config._drawer._iconClass}}{{else}}icon-list{{/if}}" aria-hidden="true"></span>
{{#if Adapt.course._navigation._showLabel}}
<span class='nav__btn-label' aria-hidden="true">{{_globals._accessibility._ariaLabels.navigationDrawer}}</span>
Expand Down
Loading