Skip to content

Commit

Permalink
Accessibility: "Save and publish" has a drop down that can't be acces…
Browse files Browse the repository at this point in the history
…sed via keyboard (#5884)
  • Loading branch information
BatJan authored and nul800sebastiaan committed Sep 5, 2019
1 parent 5def93f commit 0379011
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ Use this directive to render a button with a dropdown of alternative actions.
float: "@?",
buttonStyle: "@?",
size: "@?",
icon: "@?"
icon: "@?",
label: "@?",
labelKey: "@?"
},
link: link
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="btn-group umb-button-group" ng-class="{'dropup': direction === 'up'}">

<umb-button
ng-if="defaultButton"
alias="{{defaultButton.alias ? defaultButton.alias : 'groupPrimary' }}"
Expand All @@ -16,21 +16,32 @@
add-ellipsis={{defaultButton.addEllipsis}}>
</umb-button>

<a data-element="button-group-toggle"
href="#"
<button data-element="button-group-toggle"
type="button"
prevent-default
class="btn btn-{{buttonStyle}} dropdown-toggle umb-button-group__toggle umb-button--{{size}}"
class="btn btn-{{buttonStyle}} dropdown-toggle umb-button-group__toggle umb-button--{{size}}"
ng-if="subButtons.length > 0"
ng-click="toggleDropdown()">
<span class="caret"></span>
</a>
ng-click="toggleDropdown()"
aria-haspopup="true"
aria-expanded="{{dropdown.isOpen}}">
<span class="caret">
<span class="sr-only">
<localize key="{{labelKey}}">{{label}}</localize>
</span>
</span>
</button>

<umb-dropdown ng-show="subButtons.length > 0 && dropdown.isOpen" class="umb-button-group__sub-buttons" on-close="closeDropdown()" ng-class="{'-align-right': float === 'right'}">
<umb-dropdown-item ng-repeat="subButton in subButtons">
<a data-element="{{subButton.alias ? 'button-' + subButton.alias : 'button-group-secondary-' + $index }}" href="#" ng-click="executeMenuItem(subButton)" hotkey="{{subButton.hotKey}}" hotkey-when-hidden="{{subButton.hotKeyWhenHidden}}" prevent-default>
<localize key="{{subButton.labelKey}}">{{subButton.labelKey}}</localize>
<span ng-if="subButton.addEllipsis === 'true'">...</span>
</a>
<button
data-element="{{subButton.alias ? 'button-' + subButton.alias : 'button-group-secondary-' + $index }}"
type="button" ng-click="executeMenuItem(subButton)"
hotkey="{{subButton.hotKey}}"
hotkey-when-hidden="{{subButton.hotKeyWhenHidden}}"
prevent-default>
<localize key="{{subButton.labelKey}}">{{subButton.labelKey}}</localize>
<span ng-if="subButton.addEllipsis === 'true'" aria-hidden="true">...</span>
</button>
</umb-dropdown-item>
</umb-dropdown>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
sub-buttons="subButtons"
state="page.buttonGroupState"
direction="up"
float="right">
float="right"
label-key="buttons_morePublishingOptions"
label="More publishing options">
</umb-button-group>

<umb-button
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<li ng-transclude></li>
<li role="menuitem" ng-transclude></li>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<ul class="dropdown-menu" on-outside-click="close()" ng-transclude></ul>
<ul class="dropdown-menu" role="menu" on-outside-click="close()" ng-transclude></ul>
1 change: 1 addition & 0 deletions src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
<key alias="deleteTag">Slet tag</key>
<key alias="confirmActionCancel">Fortryd</key>
<key alias="confirmActionConfirm">Bekræft</key>
<key alias="morePublishingOptions">Flere publiseringsmuligheder</key>
</area>
<area alias="auditTrails">
<key alias="atViewingFor">For</key>
Expand Down
1 change: 1 addition & 0 deletions src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
<key alias="deleteTag">Delete tag</key>
<key alias="confirmActionCancel">Cancel</key>
<key alias="confirmActionConfirm">Confirm</key>
<key alias="morePublishingOptions">More publishing options</key>
</area>
<area alias="auditTrails">
<key alias="atViewingFor">Viewing for</key>
Expand Down
1 change: 1 addition & 0 deletions src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
<key alias="deleteTag">Delete tag</key>
<key alias="confirmActionCancel">Cancel</key>
<key alias="confirmActionConfirm">Confirm</key>
<key alias="morePublishingOptions">More publishing options</key>
</area>
<area alias="auditTrails">
<key alias="atViewingFor">Viewing for</key>
Expand Down

0 comments on commit 0379011

Please sign in to comment.