diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js index 75fa0469bb6d..c82ca1481c85 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - function EditorContentHeader(serverValidationManager) { + function EditorContentHeader(serverValidationManager, localizationService, editorState) { function link(scope, el, attr, ctrl) { @@ -13,7 +13,24 @@ if (!scope.serverValidationAliasField) { scope.serverValidationAliasField = "Alias"; } - + + scope.isNew = scope.content.state == "NotCreated"; + + localizationService.localizeMany([ + scope.isNew ? "placeholders_a11yCreateItem" : "placeholders_a11yEdit", + "placeholders_a11yName"] + ).then(function (data) { + scope.a11yMessage = data[0]; + scope.a11yName = data[1]; + if (!scope.isNew) { + scope.a11yMessage += " " + scope.content.name; + + } else { + var name = editorState.current.contentTypeName; + scope.a11yMessage += " " + name; + scope.a11yName = name + " " + scope.a11yName; + } + }); scope.vm = {}; scope.vm.dropdownOpen = false; scope.vm.currentVariant = ""; diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html index 37f363f50d4b..ba6714987c2c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html @@ -11,24 +11,30 @@
+
+

+ {{a11yMessage}} +

+