-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accessibility (keyboard navigation): The 'Content' drop down menu ope…
…ns automatically when tabbing (#9325) * Use umb-dropdown directive for Content dropdown To allow keyboard toggling and automatic collapsing on click elsewhere * Hide menu on blur Co-authored-by: Joe Glombek <[email protected]>
- Loading branch information
Joe Glombek
and
Joe Glombek
authored
Nov 18, 2020
1 parent
353aaa4
commit 02d8b3c
Showing
3 changed files
with
21 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 13 additions & 11 deletions
24
src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-navigation-item.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
<button data-element="sub-view-{{vm.item.alias}}" | ||
type="button" | ||
ng-click="vm.clicked()" | ||
hotkey="{{::vm.hotkey}}" | ||
hotkey-when-hidden="true" | ||
ng-class="{'is-active': vm.item.active, '-has-error': vm.item.hasError}" | ||
ng-disabled="vm.item.disabled" | ||
class="umb-sub-views-nav-item__action umb-outline umb-outline--thin"> | ||
type="button" | ||
ng-click="vm.clicked()" | ||
hotkey="{{::vm.hotkey}}" | ||
hotkey-when-hidden="true" | ||
ng-class="{'is-active': vm.item.active, '-has-error': vm.item.hasError }" | ||
ng-disabled="vm.item.disabled" | ||
class="umb-sub-views-nav-item__action umb-outline umb-outline--thin" | ||
aria-haspopup="{{ vm.item.anchors && vm.item.anchors.length > 1 }}" | ||
aria-expanded="{{ vm.expanded }}"> | ||
<i class="icon {{ vm.item.icon }}" aria-hidden="true"></i> | ||
<span class="umb-sub-views-nav-item-text">{{ vm.item.name }}</span> | ||
<div ng-show="vm.item.badge" class="badge -type-{{vm.item.badge.type}}">{{vm.item.badge.count}}</div> | ||
<div ng-show="!vm.item.badge" class="badge -type-alert --error-badge">!</div> | ||
</button> | ||
|
||
<ul class="dropdown-menu umb-sub-views-nav-item__anchor_dropdown" ng-if="vm.item.anchors && vm.item.anchors.length > 1"> | ||
<li ng-repeat="anchor in vm.item.anchors" ng-class="{'is-active': vm.item.active && anchor.active}"> | ||
<umb-dropdown on-close="vm.close()" deep-blur="vm.close()" umb-keyboard-list class="umb-sub-views-nav-item__anchor_dropdown" ng-class="{'is-expanded': vm.expanded}" ng-if="vm.item.anchors && vm.item.anchors.length > 1"> | ||
<umb-dropdown-item ng-repeat="anchor in vm.item.anchors" ng-class="{'is-active': vm.item.active && anchor.active}"> | ||
<a href="#group-{{anchor.id}}" ng-click="vm.anchorClicked(anchor, $event)" prevent-default> | ||
<span class="sr-only"><localize key="visuallyHiddenTexts_jumpTo">Jump to</localize></span> {{anchor.label}} <span class="sr-only"><localize key="visuallyHiddenTexts_group"> group</localize></span> | ||
</a> | ||
</li> | ||
</ul> | ||
</umb-dropdown-item> | ||
</umb-dropdown> |