From 87cd3d1c6e8b1180654746e72462757ec699c315 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 16:42:41 +0200 Subject: [PATCH 01/10] Remove params that appears to be unused --- .../directives/components/umbnodepreview.directive.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js index 9f1f7a0d2e9d..a9b428f0666d 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js @@ -88,9 +88,6 @@ @param {function} onRemove (expression): Callback function when the remove button is clicked. @param {function} onOpen (expression): Callback function when the open button is clicked. @param {function} onEdit (expression): Callback function when the edit button is clicked (Added in version 7.7.0). -@param {string} openUrl (binding): Fallback URL for onOpen (Added in version 7.12.0). -@param {string} editUrl (binding): Fallback URL for onEdit (Added in version 7.12.0). -@param {string} removeUrl (binding): Fallback URL for onRemove (Added in version 7.12.0). **/ (function () { @@ -125,10 +122,7 @@ allowEdit: "=?", onOpen: "&?", onRemove: "&?", - onEdit: "&?", - openUrl: '=?', - editUrl: '=?', - removeUrl: '=?' + onEdit: "&?" }, link: link }; From 2680c126e657245c52d22b7b0a05ca923393ce88 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 16:43:13 +0200 Subject: [PATCH 02/10] Add aria-hidden attribute for the i element and removing the ng-href directive since it appears to not be referencing anything --- .../src/views/components/umb-node-preview.html | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html index 00ca425d7a54..f594313c5338 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html @@ -1,7 +1,7 @@
- +
- +
{{ name }}
{{ description }}
@@ -13,9 +13,15 @@
From 887d5dc5687f784d5ab2c758ba15e6a70588daa6 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 17:14:18 +0200 Subject: [PATCH 03/10] Re-add unused params after a chat with abjerner - There is a reason behind it --- .../directives/components/umbnodepreview.directive.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js index a9b428f0666d..9f1f7a0d2e9d 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js @@ -88,6 +88,9 @@ @param {function} onRemove (expression): Callback function when the remove button is clicked. @param {function} onOpen (expression): Callback function when the open button is clicked. @param {function} onEdit (expression): Callback function when the edit button is clicked (Added in version 7.7.0). +@param {string} openUrl (binding): Fallback URL for onOpen (Added in version 7.12.0). +@param {string} editUrl (binding): Fallback URL for onEdit (Added in version 7.12.0). +@param {string} removeUrl (binding): Fallback URL for onRemove (Added in version 7.12.0). **/ (function () { @@ -122,7 +125,10 @@ allowEdit: "=?", onOpen: "&?", onRemove: "&?", - onEdit: "&?" + onEdit: "&?", + openUrl: '=?', + editUrl: '=?', + removeUrl: '=?' }, link: link }; From e794bc12bee7296c517a62d04f2bd06d9ae1fe24 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 17:14:50 +0200 Subject: [PATCH 04/10] Adjust the styling so it looks the same whether it's or + + + Open + {{name}} - + + + + + Remove + {{name}} + + From eaf56c622b45cc018f8534d6ad5dd46b98914375 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 18:14:17 +0200 Subject: [PATCH 08/10] Remove uneeded line --- .../src/views/prevalueeditors/treepicker.controller.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js index bb1b9f7967ab..12cae6105402 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js @@ -61,7 +61,6 @@ angular.module('umbraco') } else { populate(model.selection[0]); } - $scope.isOpen = false; editorService.close(); }; From 9187694a49178e598e4df78b2788510d1d12485d Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 18:15:00 +0200 Subject: [PATCH 09/10] Add aria attributes --- .../common/directives/components/umbnodepreview.directive.js | 4 +++- .../src/views/components/umb-node-preview.html | 1 + .../views/propertyeditors/contentpicker/contentpicker.html | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js index f6530d17a74a..a97837a1dd96 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js @@ -92,6 +92,7 @@ @param {string} editUrl (binding): Fallback URL for onEdit (Added in version 7.12.0). @param {string} removeUrl (binding): Fallback URL for onRemove (Added in version 7.12.0). @param {boolean} isEditExpanded (biding): Determines whether a popup is visible or not (Accessibility option) (Added in version 8.2.0) +@param {boolean} isOpenExpanded (biding): Determines whether a popup is expanded/open or not (Accessibility option) (Added in version 8.2.0) **/ (function () { @@ -130,7 +131,8 @@ openUrl: '=?', editUrl: '=?', removeUrl: '=?', - isEditExpanded: '=?' + isEditExpanded: '=?', + isOpenExpanded: '=?' }, link: link }; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html index 26ff63322370..a4dd39de25ab 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html @@ -56,6 +56,7 @@ title="Open {{name}}" ng-if="allowOpen && !openUrl" ng-click="onOpen()" + aria-haspopup="true" > Open {{name}} diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html index a589cf894750..638413c5b05a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html @@ -5,6 +5,7 @@ + {{isOpen}}
+ on-open="openContentEditor(node)" + is-open-expanded="isContentEditorOpen">
From c2b771f326367c72b7e5d42aa74e030f823c5f50 Mon Sep 17 00:00:00 2001 From: BatJan Date: Mon, 9 Sep 2019 16:52:05 +0200 Subject: [PATCH 10/10] Undo aria-extended since it's usage scenario is not correct in this case --- .../directives/components/umbnodepreview.directive.js | 6 +----- .../src/views/components/umb-node-preview.html | 5 ++--- .../src/views/prevalueeditors/treepicker.controller.js | 3 --- .../src/views/prevalueeditors/treepicker.html | 3 +-- .../views/propertyeditors/contentpicker/contentpicker.html | 4 +--- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js index a97837a1dd96..9f1f7a0d2e9d 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbnodepreview.directive.js @@ -91,8 +91,6 @@ @param {string} openUrl (binding): Fallback URL for onOpen (Added in version 7.12.0). @param {string} editUrl (binding): Fallback URL for onEdit (Added in version 7.12.0). @param {string} removeUrl (binding): Fallback URL for onRemove (Added in version 7.12.0). -@param {boolean} isEditExpanded (biding): Determines whether a popup is visible or not (Accessibility option) (Added in version 8.2.0) -@param {boolean} isOpenExpanded (biding): Determines whether a popup is expanded/open or not (Accessibility option) (Added in version 8.2.0) **/ (function () { @@ -130,9 +128,7 @@ onEdit: "&?", openUrl: '=?', editUrl: '=?', - removeUrl: '=?', - isEditExpanded: '=?', - isOpenExpanded: '=?' + removeUrl: '=?' }, link: link }; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html index a4dd39de25ab..4f835f4c044b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-node-preview.html @@ -31,8 +31,7 @@ title="Edit {{name}}" ng-if="allowEdit && !editUrl" ng-click="onEdit()" - aria-haspopup="true" - aria-expanded="{{isEditExpanded}}" + aria-haspopup="dialog" > Edit {{name}} @@ -56,7 +55,7 @@ title="Open {{name}}" ng-if="allowOpen && !openUrl" ng-click="onOpen()" - aria-haspopup="true" + aria-haspopup="dialog" > Open {{name}} diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js index 12cae6105402..951b76193fb7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.controller.js @@ -10,7 +10,6 @@ angular.module('umbraco') $scope.allowRemove = true; $scope.allowEdit = true; $scope.sortable = false; - $scope.isOpen = false; var config = { multiPicker: false, @@ -53,7 +52,6 @@ angular.module('umbraco') $scope.openContentPicker = function () { var treePicker = config; treePicker.section = config.type; - $scope.isOpen = true; treePicker.submit = function (model) { if (config.multiPicker) { @@ -65,7 +63,6 @@ angular.module('umbraco') }; treePicker.close = function () { - $scope.isOpen = false; editorService.close(); }; diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.html b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.html index 8dc4f73ddc3e..ab1b84db97e0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treepicker.html @@ -11,8 +11,7 @@ allow-remove="allowRemove" allow-edit="allowEdit" on-remove="remove($index)" - on-edit="openContentPicker()" - is-edit-expanded="isOpen"> + on-edit="openContentPicker()"> diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html index 638413c5b05a..a589cf894750 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.html @@ -5,7 +5,6 @@ - {{isOpen}}
+ on-open="openContentEditor(node)">