From 461b1dcd9334da16f49895c7f914dbfd3fa372b3 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sat, 7 Sep 2019 22:54:00 +0200 Subject: [PATCH 1/7] Refactor empty tag to From f2cfeea54d9bbac0f16283ac6b4743766fe77a29 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 00:08:55 +0200 Subject: [PATCH 2/7] Add aria parameters and add missing documentation for autoFocus while we're at it --- .../components/buttons/umbbutton.directive.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js index f026a05c45ed..cc4482749772 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js @@ -67,6 +67,9 @@ Use this directive to render an umbraco button. The directive can be used to gen @param {boolean=} disabled Set to true to disable the button. @param {string=} addEllipsis Adds an ellipsis character (…) to the button label which means the button will open a dialog or prompt the user for more information. @param {string=} showCaret Shows a caret on the right side of the button label +@param {string=} autoFocus add autoFocus to the button +@param {string=} hasPopup Used to expose to the accessibility API whether the button will trigger a popup or not +@param {string=]} isExpanded Used to add an aria-expanded attribute and expose whether the button has expanded a popup or not **/ @@ -96,7 +99,9 @@ Use this directive to render an umbraco button. The directive can be used to gen alias: "@?", addEllipsis: "@?", showCaret: "@?", - autoFocus: "@?" + autoFocus: "@?", + hasPopup: "@?", + isExpanded: "=?" } }); @@ -126,13 +131,13 @@ Use this directive to render an umbraco button. The directive can be used to gen // make it possible to pass in multiple styles if(vm.buttonStyle.startsWith("[") && vm.buttonStyle.endsWith("]")) { - + // when using an attr it will always be a string so we need to remove square brackets // and turn it into and array var withoutBrackets = vm.buttonStyle.replace(/[\[\]']+/g,''); // split array by , + make sure to catch whitespaces var array = withoutBrackets.split(/\s?,\s?/g); - + angular.forEach(array, function(item){ vm.style = vm.style + " " + "btn-" + item; if(item === "block") { From 3c3185c7da33c78da6b03fc418d3075ab1f5c315 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 00:09:22 +0200 Subject: [PATCH 3/7] Add new attributes to the button directive view --- .../views/components/buttons/umb-button.html | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button.html b/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button.html index 8163b2807be0..a6a41dfeaeeb 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button.html @@ -15,11 +15,22 @@ - From 101b7b7ad44ec74e1d38561b8e3cea2bafbe7530 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 00:09:39 +0200 Subject: [PATCH 4/7] Add new attributes to the directive call --- .../src/views/components/editor/umb-editor-menu.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html index f542dec4328a..2a82d54c2fa3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html @@ -5,7 +5,10 @@ button-style="white" action="dropdown.isOpen = !dropdown.isOpen" label-key="general_actions" - show-caret="true"> + show-caret="true" + hasPopup="true" + isExpanded="dropdown.isOpen" + > From ab89add239a4f38ff8cac26e1c100172268907f1 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 00:31:05 +0200 Subject: [PATCH 5/7] Remember to use the correct attribute format and fix the bindings --- .../directives/components/buttons/umbbutton.directive.js | 2 +- .../src/views/components/editor/umb-editor-menu.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js index cc4482749772..56416e3544bf 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js @@ -101,7 +101,7 @@ Use this directive to render an umbraco button. The directive can be used to gen showCaret: "@?", autoFocus: "@?", hasPopup: "@?", - isExpanded: "=?" + isExpanded: " From 1d18dfb6ddc148ea0583c645671c3c0854441543 Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 00:45:26 +0200 Subject: [PATCH 6/7] Add aria-hidden attributes for non-visual elements --- .../src/views/components/buttons/umb-button.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button.html b/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button.html index a6a41dfeaeeb..0c4c58c38ffd 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/buttons/umb-button.html @@ -9,9 +9,9 @@ - + {{vm.buttonLabel}} - + @@ -36,9 +36,9 @@ From b64e18d96c00e78420cbc0fa792d68ebf653babe Mon Sep 17 00:00:00 2001 From: BatJan Date: Sun, 8 Sep 2019 00:45:41 +0200 Subject: [PATCH 7/7] Add deep-blur directive --- .../src/views/components/editor/umb-editor-menu.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html index 50e1e2f0c6bf..fe90fef07af2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html @@ -11,7 +11,7 @@ > - +