@openui5/sap.uxap 1.96.16 → 1.96.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.uxap",
3
- "version": "1.96.16",
3
+ "version": "1.96.18",
4
4
  "description": "OpenUI5 UI Library sap.uxap",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,9 +14,9 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.f": "1.96.16",
18
- "@openui5/sap.m": "1.96.16",
19
- "@openui5/sap.ui.core": "1.96.16",
20
- "@openui5/sap.ui.layout": "1.96.16"
17
+ "@openui5/sap.f": "1.96.18",
18
+ "@openui5/sap.m": "1.96.18",
19
+ "@openui5/sap.ui.core": "1.96.18",
20
+ "@openui5/sap.ui.layout": "1.96.18"
21
21
  }
22
22
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  <name>sap.uxap</name>
5
5
  <vendor>SAP SE</vendor>
6
- <version>1.96.16</version>
6
+ <version>1.96.18</version>
7
7
  <copyright>OpenUI5
8
8
  * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
9
9
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  *
22
22
  * @class
23
23
  * @author SAP SE
24
- * @version 1.96.16
24
+ * @version 1.96.18
25
25
  * @since 1.26
26
26
  * @alias sap.uxap.BlockBaseMetadata
27
27
  * @extends sap.ui.core.ElementMetadata
@@ -22,7 +22,7 @@ sap.ui.define(['sap/ui/core/Element', './library'],
22
22
  * @extends sap.ui.core.Element
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.96.16
25
+ * @version 1.96.18
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  * @implements sap.uxap.IHeaderContent
42
42
  *
43
43
  * @author SAP SE
44
- * @version 1.96.16
44
+ * @version 1.96.18
45
45
  *
46
46
  * @constructor
47
47
  * @public
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @implements sap.uxap.IHeaderTitle
43
43
  *
44
44
  * @author SAP SE
45
- * @version 1.96.16
45
+ * @version 1.96.18
46
46
  *
47
47
  * @constructor
48
48
  * @public
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @extends sap.ui.core.Element
38
38
  *
39
39
  * @author SAP SE
40
- * @version 1.96.16
40
+ * @version 1.96.18
41
41
  *
42
42
  * @constructor
43
43
  * @public
@@ -134,6 +134,10 @@ sap.ui.define([
134
134
 
135
135
  ObjectPageSection.prototype.exit = function () {
136
136
  this._detachMediaContainerWidthChange(this._updateImportance, this);
137
+
138
+ if (ObjectPageSectionBase.prototype.exit) {
139
+ ObjectPageSectionBase.prototype.exit.call(this);
140
+ }
137
141
  };
138
142
 
139
143
  ObjectPageSection.prototype._getImportanceLevelToHide = function (oCurrentMedia) {
@@ -133,10 +133,18 @@ sap.ui.define([
133
133
  ObjectPageSectionBase.prototype.onBeforeRendering = function () {
134
134
  var sAriaLabeledBy = "ariaLabelledBy";
135
135
 
136
- this.setInvisibleTextLabelValue(this._getTitle());
137
-
138
136
  if (!this.getAggregation(sAriaLabeledBy)) {
139
137
  this.setAggregation(sAriaLabeledBy, this._getAriaLabelledBy(), true); // this is called onBeforeRendering, so suppress invalidate
138
+ } else {
139
+ this.updateInvisibleTextLabelValue();
140
+ }
141
+ };
142
+
143
+
144
+ ObjectPageSectionBase.prototype.exit = function () {
145
+ if (this._oInvisibleText) {
146
+ this._oInvisibleText.destroy();
147
+ this._oInvisibleText = null;
140
148
  }
141
149
  };
142
150
 
@@ -163,18 +171,15 @@ sap.ui.define([
163
171
  };
164
172
 
165
173
  /**
166
- * Returns the DOM Element that should get the focus.
167
- *
168
- * To be overwritten by the specific control method.
174
+ * Performs the update of the invisible text label.
175
+ * This method is called for example when the section title is changed.
169
176
  *
170
177
  * @return {this} this for chaining
171
178
  * @protected
172
179
  */
173
- ObjectPageSectionBase.prototype.setInvisibleTextLabelValue = function (sValue) {
180
+ ObjectPageSectionBase.prototype.updateInvisibleTextLabelValue = function () {
174
181
  var oAriaLabelledBy = this.getAggregation("ariaLabelledBy"),
175
- sLabel = "";
176
-
177
- sLabel = sValue || this.getSectionText();
182
+ sLabel = this._getAriaLabelledByText();
178
183
 
179
184
  if (oAriaLabelledBy) {
180
185
  sap.ui.getCore().byId(oAriaLabelledBy.getId()).setText(sLabel);
@@ -184,22 +189,46 @@ sap.ui.define([
184
189
  };
185
190
 
186
191
  /**
187
- * provide a default aria-labeled by text
192
+ * Returns the invisible text control with the label already set to be for to the ariaLabelledBy aggregation.
188
193
  * @private
189
194
  * @returns {*} sap.ui.core.InvisibleText
190
195
  */
191
196
  ObjectPageSectionBase.prototype._getAriaLabelledBy = function () {
197
+ var sLabel = this._getAriaLabelledByText();
198
+ return this._getInvisibleText().setText(sLabel);
199
+ };
200
+
201
+ /**
202
+ * Returns the label string for the section.
203
+ * @private
204
+ * @returns {string} aria-labeled by text
205
+ */
206
+ ObjectPageSectionBase.prototype._getAriaLabelledByText = function () {
192
207
  // Each section should be labelled as:
193
208
  // 'titleName' - if the section has a title
194
- // 'Section' - if it does not have a title
209
+ // 'Section' - if it does not have a title or its hidden (for example, showTitle=false)
210
+ var sTitle = this._getShouldLabelTitle() && this._getTitle();
211
+ return sTitle || this.getSectionText();
212
+ };
195
213
 
196
- var sLabel = "";
214
+ ObjectPageSectionBase.prototype._getInvisibleText = function () {
215
+ if (!this._oInvisibleText) {
216
+ this._oInvisibleText = new InvisibleText();
217
+ this._oInvisibleText.toStatic();
218
+ }
197
219
 
198
- sLabel = this._getTitle() || this.getSectionText();
220
+ return this._oInvisibleText;
221
+ };
199
222
 
200
- return new InvisibleText({
201
- text: sLabel
202
- }).toStatic();
223
+ /**
224
+ * Returns a boolean value indicating whether the title should be added to the section's aria label.
225
+ * Aware of whether the subsection is promoted or not.
226
+ *
227
+ * @returns {boolean} true if title should be part of the label
228
+ * @private
229
+ */
230
+ ObjectPageSectionBase.prototype._getShouldLabelTitle = function () {
231
+ return this.getShowTitle ? this.getShowTitle() : true;
203
232
  };
204
233
 
205
234
  /**
@@ -395,7 +424,7 @@ sap.ui.define([
395
424
  this.setProperty("title", sValue, bSuppressInvalidate);
396
425
  this._notifyObjectPageLayout();
397
426
 
398
- this.setInvisibleTextLabelValue(sValue);
427
+ this.updateInvisibleTextLabelValue();
399
428
 
400
429
  return this;
401
430
  };
@@ -263,6 +263,26 @@ sap.ui.define([
263
263
  return ObjectPageSubSection._getLibraryResourceBundle().getText("SUBSECTION_CONTROL_NAME");
264
264
  };
265
265
 
266
+ /**
267
+ * @override
268
+ * @private
269
+ */
270
+ ObjectPageSubSection.prototype._getShouldLabelTitle = function () {
271
+ if (this._getUseTitleOnTheLeft()) {
272
+ // in case layout is "TitleOnTheLeft", the title of promoted section
273
+ // is visible and should be labeled if showTitle is true
274
+ return this.getShowTitle();
275
+ }
276
+
277
+ if (this._sBorrowedTitleDomId) {
278
+ // in case section is promoted the title is not displayed
279
+ // on the subsection level - we don't need to include it in the aria label
280
+ return false;
281
+ }
282
+
283
+ return this.getShowTitle();
284
+ };
285
+
266
286
  /**
267
287
  * Returns Title DOM ID of the Title of this SubSection
268
288
  * @returns {string|boolean} DOM ID
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @constructor
26
26
  * @alias sap.uxap.changeHandler.AddIFrameObjectPageLayout
27
27
  * @author SAP SE
28
- * @version 1.96.16
28
+ * @version 1.96.18
29
29
  * @since 1.75
30
30
  * @experimental Since 1.75
31
31
  */
@@ -13,7 +13,7 @@ sap.ui.define(["sap/ui/fl/changeHandler/MoveControls", "sap/ui/core/Core", "sap/
13
13
  * @constructor
14
14
  * @alias sap.uxap.changeHandler.MoveObjectPageSection
15
15
  * @author SAP SE
16
- * @version 1.96.16
16
+ * @version 1.96.18
17
17
  * @experimental Since 1.54
18
18
  */
19
19
 
@@ -21,7 +21,7 @@ sap.ui.define([
21
21
  * @constructor
22
22
  * @alias sap.uxap.changeHandler.RenameObjectPageSection
23
23
  * @author SAP SE
24
- * @version 1.96.16
24
+ * @version 1.96.18
25
25
  * @experimental Since 1.50
26
26
  */
27
27
 
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @namespace
25
25
  * @name sap.uxap
26
26
  * @author SAP SE
27
- * @version 1.96.16
27
+ * @version 1.96.18
28
28
  * @since 1.36
29
29
  * @public
30
30
  */
@@ -69,7 +69,7 @@ sap.ui.define([
69
69
  "sap.uxap.ObjectPageHeaderLayoutData",
70
70
  "sap.uxap.ObjectPageLazyLoader"
71
71
  ],
72
- version: "1.96.16",
72
+ version: "1.96.18",
73
73
  extensions: {
74
74
  flChangeHandlers: {
75
75
  "sap.uxap.ObjectPageHeader": "sap/uxap/flexibility/ObjectPageHeader",
@@ -39,7 +39,7 @@ TOOLTIP_OP_CHANGES_MARK_VALUE=Ungesicherte \u00C4nderungen
39
39
 
40
40
  TOOLTIP_OP_EXPAND_HEADER_BTN=Kopfdaten expandieren
41
41
 
42
- TOOLTIP_OP_SHOW_SIDE_CONTENT=Seitenbereich \u00F6ffnen
42
+ TOOLTIP_OP_SHOW_SIDE_CONTENT=Seiten-Panel \u00F6ffnen
43
43
 
44
44
  ROOT_ARIA_LABEL_WITH_TITLE=Details
45
45