@openui5/sap.ui.layout 1.120.27 → 1.120.29

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.
Files changed (83) hide show
  1. package/THIRDPARTY.txt +2 -2
  2. package/package.json +2 -2
  3. package/src/sap/ui/layout/.library +1 -1
  4. package/src/sap/ui/layout/AlignedFlowLayout.js +1 -1
  5. package/src/sap/ui/layout/AssociativeSplitter.js +1 -1
  6. package/src/sap/ui/layout/BlockLayout.js +1 -1
  7. package/src/sap/ui/layout/BlockLayoutCell.js +1 -1
  8. package/src/sap/ui/layout/BlockLayoutCellData.js +1 -1
  9. package/src/sap/ui/layout/BlockLayoutRow.js +1 -1
  10. package/src/sap/ui/layout/DynamicSideContent.js +1 -1
  11. package/src/sap/ui/layout/FixFlex.js +1 -1
  12. package/src/sap/ui/layout/Grid.js +1 -1
  13. package/src/sap/ui/layout/GridData.js +1 -1
  14. package/src/sap/ui/layout/GridRenderer.js +1 -1
  15. package/src/sap/ui/layout/HorizontalLayout.js +1 -1
  16. package/src/sap/ui/layout/PaneContainer.js +1 -1
  17. package/src/sap/ui/layout/ResponsiveFlowLayout.js +1 -1
  18. package/src/sap/ui/layout/ResponsiveFlowLayoutData.js +1 -1
  19. package/src/sap/ui/layout/ResponsiveSplitter.js +1 -1
  20. package/src/sap/ui/layout/ResponsiveSplitterPage.js +1 -1
  21. package/src/sap/ui/layout/SplitPane.js +1 -1
  22. package/src/sap/ui/layout/Splitter.js +1 -1
  23. package/src/sap/ui/layout/SplitterLayoutData.js +1 -1
  24. package/src/sap/ui/layout/VerticalLayout.js +1 -1
  25. package/src/sap/ui/layout/changeHandler/AddFormContainer.js +1 -1
  26. package/src/sap/ui/layout/changeHandler/AddFormField.js +1 -1
  27. package/src/sap/ui/layout/changeHandler/AddSimpleFormField.js +1 -1
  28. package/src/sap/ui/layout/changeHandler/AddSimpleFormGroup.js +1 -1
  29. package/src/sap/ui/layout/changeHandler/HideSimpleForm.js +1 -1
  30. package/src/sap/ui/layout/changeHandler/MoveSimpleForm.js +1 -1
  31. package/src/sap/ui/layout/changeHandler/RenameFormContainer.js +1 -1
  32. package/src/sap/ui/layout/changeHandler/RenameSimpleForm.js +1 -1
  33. package/src/sap/ui/layout/changeHandler/UnhideSimpleForm.js +1 -1
  34. package/src/sap/ui/layout/cssgrid/CSSGrid.js +1 -1
  35. package/src/sap/ui/layout/cssgrid/GridBasicLayout.js +1 -1
  36. package/src/sap/ui/layout/cssgrid/GridBoxLayout.js +1 -1
  37. package/src/sap/ui/layout/cssgrid/GridItemLayoutData.js +1 -1
  38. package/src/sap/ui/layout/cssgrid/GridLayoutBase.js +1 -1
  39. package/src/sap/ui/layout/cssgrid/GridLayoutDelegate.js +1 -1
  40. package/src/sap/ui/layout/cssgrid/GridResponsiveLayout.js +1 -1
  41. package/src/sap/ui/layout/cssgrid/GridSettings.js +1 -1
  42. package/src/sap/ui/layout/cssgrid/ResponsiveColumnItemLayoutData.js +1 -1
  43. package/src/sap/ui/layout/cssgrid/ResponsiveColumnLayout.js +1 -1
  44. package/src/sap/ui/layout/designtime/messagebundle_bg.properties +3 -3
  45. package/src/sap/ui/layout/designtime/messagebundle_ca.properties +3 -3
  46. package/src/sap/ui/layout/designtime/messagebundle_cy.properties +2 -2
  47. package/src/sap/ui/layout/designtime/messagebundle_da.properties +2 -2
  48. package/src/sap/ui/layout/designtime/messagebundle_de.properties +1 -1
  49. package/src/sap/ui/layout/designtime/messagebundle_es.properties +6 -6
  50. package/src/sap/ui/layout/designtime/messagebundle_es_MX.properties +1 -1
  51. package/src/sap/ui/layout/designtime/messagebundle_et.properties +1 -1
  52. package/src/sap/ui/layout/designtime/messagebundle_fr.properties +1 -1
  53. package/src/sap/ui/layout/designtime/messagebundle_fr_CA.properties +1 -1
  54. package/src/sap/ui/layout/designtime/messagebundle_hr.properties +3 -3
  55. package/src/sap/ui/layout/designtime/messagebundle_it.properties +1 -1
  56. package/src/sap/ui/layout/designtime/messagebundle_ja.properties +2 -2
  57. package/src/sap/ui/layout/designtime/messagebundle_lt.properties +1 -1
  58. package/src/sap/ui/layout/designtime/messagebundle_lv.properties +1 -1
  59. package/src/sap/ui/layout/designtime/messagebundle_pl.properties +1 -1
  60. package/src/sap/ui/layout/designtime/messagebundle_pt.properties +2 -2
  61. package/src/sap/ui/layout/designtime/messagebundle_pt_PT.properties +1 -1
  62. package/src/sap/ui/layout/designtime/messagebundle_sv.properties +2 -2
  63. package/src/sap/ui/layout/designtime/messagebundle_vi.properties +1 -1
  64. package/src/sap/ui/layout/form/ColumnContainerData.js +1 -1
  65. package/src/sap/ui/layout/form/ColumnElementData.js +1 -1
  66. package/src/sap/ui/layout/form/ColumnLayout.js +17 -1
  67. package/src/sap/ui/layout/form/ColumnLayoutRenderer.js +41 -16
  68. package/src/sap/ui/layout/form/Form.js +4 -2
  69. package/src/sap/ui/layout/form/FormContainer.js +1 -1
  70. package/src/sap/ui/layout/form/FormElement.js +1 -1
  71. package/src/sap/ui/layout/form/FormLayout.js +56 -1
  72. package/src/sap/ui/layout/form/FormLayoutRenderer.js +35 -21
  73. package/src/sap/ui/layout/form/FormRenderer.js +16 -20
  74. package/src/sap/ui/layout/form/GridContainerData.js +1 -1
  75. package/src/sap/ui/layout/form/GridElementData.js +1 -1
  76. package/src/sap/ui/layout/form/GridLayout.js +1 -1
  77. package/src/sap/ui/layout/form/ResponsiveGridLayout.js +2 -2
  78. package/src/sap/ui/layout/form/ResponsiveLayout.js +2 -2
  79. package/src/sap/ui/layout/form/SemanticFormElement.js +1 -1
  80. package/src/sap/ui/layout/form/SimpleForm.js +1 -1
  81. package/src/sap/ui/layout/library.js +2 -2
  82. package/src/sap/ui/layout/messagebundle_mk.properties +1 -1
  83. package/src/sap/ui/layout/themes/base/ColumnLayout.less +5 -4
@@ -1,7 +1,7 @@
1
1
 
2
2
  MSG_REMOVING_TOOLBAR=Obszar nag\u0142\u00F3wka tej grupy zawiera dodatkowe elementy. Usuni\u0119cie tej grupy spowoduje ich utrat\u0119. Czy mimo to usun\u0105\u0107 t\u0119 grup\u0119?
3
3
 
4
- GROUP_CONTROL_NAME=Grupa
4
+ GROUP_CONTROL_NAME=Grupowanie
5
5
  GROUP_CONTROL_NAME_PLURAL=Grupy
6
6
  FIELD_CONTROL_NAME=Pole
7
7
  FIELD_CONTROL_NAME_PLURAL=Pola
@@ -8,11 +8,11 @@ FIELD_CONTROL_NAME_PLURAL=Campos
8
8
 
9
9
  HORIZONTAL_LAYOUT_CONTROL_NAME=Container horizontal
10
10
 
11
- HORIZONTAL_LAYOUT_CONTROL_NAME_PLURAL=Container horizontal
11
+ HORIZONTAL_LAYOUT_CONTROL_NAME_PLURAL=Containers horizontais
12
12
 
13
13
  VERTICAL_LAYOUT_CONTROL_NAME=Container vertical
14
14
 
15
- VERTICAL_LAYOUT_NAME_PLURAL=Container vertical
15
+ VERTICAL_LAYOUT_NAME_PLURAL=Containers verticais
16
16
 
17
17
  GRID_CONTROL_NAME=Grade
18
18
 
@@ -1,5 +1,5 @@
1
1
 
2
- MSG_REMOVING_TOOLBAR=A \u00E1rea do cabe\u00E7alho deste grupo cont\u00E9m elementos adicionais. Se remover o grupo, eles ser\u00E3o perdidos. Pretende remover o grupo mesmo assim?
2
+ MSG_REMOVING_TOOLBAR=A \u00E1rea do cabe\u00E7alho deste grupo cont\u00E9m elementos adicionais. Se remover o grupo, esses elementos ser\u00E3o perdidos. Pretende remover o grupo mesmo assim?
3
3
 
4
4
  GROUP_CONTROL_NAME=Grupo
5
5
  GROUP_CONTROL_NAME_PLURAL=Grupos
@@ -14,6 +14,6 @@ VERTICAL_LAYOUT_CONTROL_NAME=Vertikal container
14
14
 
15
15
  VERTICAL_LAYOUT_NAME_PLURAL=Vertikala containrar
16
16
 
17
- GRID_CONTROL_NAME=Raster
17
+ GRID_CONTROL_NAME=Rutn\u00E4t
18
18
 
19
- GRID_CONTROL_NAME_PLURAL=Raster
19
+ GRID_CONTROL_NAME_PLURAL=Rutn\u00E4t
@@ -4,7 +4,7 @@ MSG_REMOVING_TOOLBAR=Vu\u0300ng ti\u00EAu \u0111\u00EA\u0300 cu\u0309a nho\u0301
4
4
  GROUP_CONTROL_NAME=Nho\u0301m
5
5
  GROUP_CONTROL_NAME_PLURAL=Nho\u0301m
6
6
  FIELD_CONTROL_NAME=Tr\u01B0\u01A1\u0300ng
7
- FIELD_CONTROL_NAME_PLURAL=Ca\u0301c tr\u01B0\u01A1\u0300ng
7
+ FIELD_CONTROL_NAME_PLURAL=Tr\u01B0\u01A1\u0300ng
8
8
 
9
9
  HORIZONTAL_LAYOUT_CONTROL_NAME=Vu\u0300ng ch\u01B0\u0301a ngang
10
10
 
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.LayoutData
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.120.27
29
+ * @version 1.120.29
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.LayoutData
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.120.27
29
+ * @version 1.120.29
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  * This control cannot be used stand-alone, it just renders a {@link sap.ui.layout.form.Form Form} control,
61
61
  * so it must be assigned to a {@link sap.ui.layout.form.Form Form} control using the <code>layout</code> aggregation.
62
62
  * @extends sap.ui.layout.form.FormLayout
63
- * @version 1.120.27
63
+ * @version 1.120.29
64
64
  *
65
65
  * @constructor
66
66
  * @public
@@ -687,6 +687,22 @@ sap.ui.define([
687
687
 
688
688
  };
689
689
 
690
+ ColumnLayout.prototype.hasLabelledContainers = function(oForm) {
691
+
692
+ const aContainers = oForm.getFormContainers();
693
+
694
+ // Let Form render role="region" also if FormContainer has no title.
695
+ // If only one FormContainer exist and it has no title let Form render role "form".
696
+ return aContainers.length !== 1 || this.isContainerLabelled(aContainers[0]);
697
+
698
+ };
699
+
700
+ ColumnLayout.prototype.invalidateEditableChange = function() {
701
+
702
+ return true; // display-mode renders <dl>
703
+
704
+ };
705
+
690
706
  return ColumnLayout;
691
707
 
692
708
  });
@@ -63,10 +63,12 @@ sap.ui.define([
63
63
  var oToolbar = oContainer.getToolbar();
64
64
  var oTitle = oContainer.getTitle();
65
65
  var oOptions = oLayout._getContainerSize(oContainer);
66
+ const bEditable = oContainer.getProperty("_editable");
67
+ const sContentNode = bEditable ? "div" : "dl";
66
68
 
67
69
  oContainer._checkProperties();
68
70
 
69
- oRm.openStart("section", oContainer);
71
+ oRm.openStart("div", oContainer);
70
72
  oRm.class("sapUiFormCLContainer");
71
73
  oRm.class("sapUiFormCLContainerS" + oOptions.S.Size);
72
74
  oRm.class("sapUiFormCLContainerM" + oOptions.M.Size);
@@ -109,15 +111,31 @@ sap.ui.define([
109
111
  oRm.attr('title', oContainer.getTooltip_AsString());
110
112
  }
111
113
 
112
- this.writeAccessibilityStateContainer(oRm, oContainer);
114
+ if (bEditable || bExpandable || oToolbar) {
115
+ // in display mode render accessibility attributes on content-node. If expandable or toolbar in disply mode, role "region" is needed to annonce region if focus goes to button or inside toolbar
116
+ const oForm = oContainer.getParent();
117
+ let sRole = "form";
118
+
119
+ if (bEditable && !oLayout.isContainerLabelled(oContainer) && oForm.getFormContainers().length === 1) {
120
+ sRole = ""; // Container has no title and is only one container, no role needed as set on Form-level
121
+ } else if (!bEditable && (bExpandable || oToolbar)) {
122
+ sRole = "region"; // to announce region if Expander is focused or focus moves inside Toolbar
123
+ }
124
+
125
+ // In edit mode let every container render role, even without title (expect there is only one container). So screenreader also announces forms structure. (Was not possible for some older layouts.)
126
+ this.writeAccessibilityStateContainer(oRm, oContainer, sRole);
127
+ }
113
128
 
114
129
  oRm.openEnd();
115
130
 
116
131
  this.renderHeader(oRm, oToolbar, oTitle, oContainer._oExpandButton, bExpandable, oLayout._sFormSubTitleSize, oContainer.getId());
117
132
 
118
- oRm.openStart("div", oContainer.getId() + "-content")
119
- .class("sapUiFormCLContainerCont")
120
- .openEnd();
133
+ oRm.openStart(sContentNode, oContainer.getId() + "-content")
134
+ .class("sapUiFormCLContainerCont");
135
+ if (!bEditable && !bExpandable && !oToolbar) {
136
+ this.writeAccessibilityStateContainer(oRm, oContainer, ""); // no role needed on <dl>
137
+ }
138
+ oRm.openEnd();
121
139
 
122
140
  var aElements = oContainer.getVisibleFormElements();
123
141
  for (var i = 0; i < aElements.length; i++) {
@@ -136,8 +154,8 @@ sap.ui.define([
136
154
  }
137
155
  }
138
156
 
139
- oRm.close("div");
140
- oRm.close("section");
157
+ oRm.close(sContentNode); // Container content
158
+ oRm.close("div"); // Container
141
159
 
142
160
  };
143
161
 
@@ -145,6 +163,8 @@ sap.ui.define([
145
163
 
146
164
  var oLabel = oElement.getLabelControl();
147
165
  var oOptions;
166
+ const bEditable = oElement.getProperty("_editable");
167
+ const sFieldsNode = bEditable ? "div" : "dd";
148
168
 
149
169
  oRm.openStart("div", oElement);
150
170
  oRm.class("sapUiFormCLElement");
@@ -155,7 +175,7 @@ sap.ui.define([
155
175
 
156
176
  if (oLabel) {
157
177
  oOptions = oLayout._getFieldSize(oLabel);
158
- _renderLabel(oRm, oLabel, oOptions);
178
+ _renderLabel(oRm, oElement, oLabel, oOptions);
159
179
  }
160
180
 
161
181
  var aFields = oElement.getFieldsForRendering();
@@ -166,7 +186,7 @@ sap.ui.define([
166
186
  throw new Error(oField + " is not a valid Form content! Only use valid content in " + oLayout);
167
187
  }
168
188
  oOptions = oLayout._getFieldSize(oField);
169
- oRm.openStart("div");
189
+ oRm.openStart(sFieldsNode);
170
190
  oRm.class("sapUiFormCLCellsS" + oOptions.S.Size);
171
191
  oRm.class("sapUiFormCLCellsL" + oOptions.L.Size);
172
192
  if (oOptions.S.Break) {
@@ -185,7 +205,7 @@ sap.ui.define([
185
205
 
186
206
  oRm.renderControl(oField);
187
207
 
188
- oRm.close("div");
208
+ oRm.close(sFieldsNode);
189
209
  }
190
210
  }
191
211
  oRm.close("div");
@@ -199,6 +219,8 @@ sap.ui.define([
199
219
  var iColumns = 12;
200
220
  var iSizeS = iColumns;
201
221
  var iSizeL = iColumns;
222
+ const bEditable = oElement.getProperty("_editable");
223
+ const sFieldsNode = bEditable ? "div" : "dd";
202
224
 
203
225
  oRm.openStart("div", oElement);
204
226
  oRm.class("sapUiFormCLElement").class("sapUiFormCLSemanticElement");
@@ -209,7 +231,7 @@ sap.ui.define([
209
231
 
210
232
  if (oLabel) {
211
233
  oOptions = oLayout._getFieldSize(oLabel);
212
- _renderLabel(oRm, oLabel, oOptions);
234
+ _renderLabel(oRm, oElement, oLabel, oOptions);
213
235
  if (oOptions.S.Size < iSizeS) {
214
236
  iSizeS = iSizeS - oOptions.S.Size;
215
237
  }
@@ -218,7 +240,7 @@ sap.ui.define([
218
240
  }
219
241
  }
220
242
 
221
- oRm.openStart("div");
243
+ oRm.openStart(sFieldsNode);
222
244
  oRm.class("sapUiFormCLCellsS" + iSizeS);
223
245
  oRm.class("sapUiFormCLCellsL" + iSizeL);
224
246
  oRm.openEnd();
@@ -234,14 +256,17 @@ sap.ui.define([
234
256
  }
235
257
  }
236
258
 
237
- oRm.close("div");
259
+ oRm.close(sFieldsNode);
238
260
  oRm.close("div");
239
261
 
240
262
  };
241
263
 
242
- function _renderLabel(oRm, oLabel, oOptions) {
264
+ function _renderLabel(oRm, oElement, oLabel, oOptions) {
265
+
266
+ const bEditable = oElement.getProperty("_editable");
267
+ const sLabelNode = bEditable ? "div" : "dt";
243
268
 
244
- oRm.openStart("div")
269
+ oRm.openStart(sLabelNode)
245
270
  .class("sapUiFormElementLbl")
246
271
  .class("sapUiFormCLCellsS" + oOptions.S.Size)
247
272
  .class("sapUiFormCLCellsL" + oOptions.L.Size)
@@ -249,7 +274,7 @@ sap.ui.define([
249
274
 
250
275
  oRm.renderControl(oLabel);
251
276
 
252
- oRm.close("div");
277
+ oRm.close(sLabelNode);
253
278
 
254
279
  }
255
280
 
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * @extends sap.ui.core.Control
45
45
  *
46
46
  * @author SAP SE
47
- * @version 1.120.27
47
+ * @version 1.120.29
48
48
  *
49
49
  * @constructor
50
50
  * @public
@@ -195,7 +195,9 @@ sap.ui.define([
195
195
 
196
196
  Form.prototype.setEditable = function(bEditable) {
197
197
 
198
- this.setProperty("editable", bEditable, true);
198
+ const oLayout = this.getLayout();
199
+ const bSuppressInvalidate = !oLayout?.invalidateEditableChange();
200
+ this.setProperty("editable", bEditable, bSuppressInvalidate);
199
201
 
200
202
  return this;
201
203
 
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.core.Element
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.120.27
31
+ * @version 1.120.29
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -26,7 +26,7 @@ sap.ui.define([
26
26
  * @extends sap.ui.core.Element
27
27
  *
28
28
  * @author SAP SE
29
- * @version 1.120.27
29
+ * @version 1.120.29
30
30
  *
31
31
  * @constructor
32
32
  * @public
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * @extends sap.ui.core.Control
38
38
  *
39
39
  * @author SAP SE
40
- * @version 1.120.27
40
+ * @version 1.120.29
41
41
  *
42
42
  * @constructor
43
43
  * @public
@@ -1024,6 +1024,61 @@ sap.ui.define([
1024
1024
 
1025
1025
  };
1026
1026
 
1027
+ /**
1028
+ * Checks if the <code>Form</code> contains <code>FormContainers</code> that have a <code>Title</code>, <code>Toolbar</code> or <code>AriaLabelledBy</code>.
1029
+ *
1030
+ * This is used to determine the role for screenreader support
1031
+ *
1032
+ * @param {sap.ui.layout.form.Form} oForm Form
1033
+ * @return {boolean} <code>true</code> if there is a container with own label
1034
+ * @private
1035
+ * @since 1.120.28
1036
+ */
1037
+ FormLayout.prototype.hasLabelledContainers = function(oForm) {
1038
+
1039
+ const aContainers = oForm.getFormContainers();
1040
+ let bResult = false;
1041
+
1042
+ for (let i = 0; i < aContainers.length; i++) {
1043
+ if (this.isContainerLabelled(aContainers[i])) {
1044
+ bResult = true;
1045
+ break;
1046
+ }
1047
+ }
1048
+
1049
+ return bResult;
1050
+
1051
+ };
1052
+
1053
+ /**
1054
+ * Checks if the <code>FormContainer</code> has a <code>Title</code>, <code>Toolbar</code> or <code>AriaLabelledBy</code>.
1055
+ *
1056
+ * This is used to determine the role for screenreader support
1057
+ *
1058
+ * @param {sap.ui.layout.form.FormContainer} oContainer FormContainer
1059
+ * @return {boolean} <code>true</code> if the <code>FormContainer</code> is labelled
1060
+ * @private
1061
+ * @since 1.120.28
1062
+ */
1063
+ FormLayout.prototype.isContainerLabelled = function(oContainer) {
1064
+
1065
+ return !!oContainer.getTitle() || !!oContainer.getToolbar() || oContainer.getAriaLabelledBy().length > 0 || oContainer.getExpandable();
1066
+
1067
+ };
1068
+
1069
+ /**
1070
+ * Defines if the rendering of the layout depends on the <code>editable</code> property.
1071
+ *
1072
+ * @return {boolean} <code>true</code> if the switching <code>editable</code> must trigger re-rendering
1073
+ * @private
1074
+ * @since 1.120.28
1075
+ */
1076
+ FormLayout.prototype.invalidateEditableChange = function() {
1077
+
1078
+ return false;
1079
+
1080
+ };
1081
+
1027
1082
  return FormLayout;
1028
1083
 
1029
1084
  });
@@ -97,7 +97,7 @@ sap.ui.define([
97
97
  var oToolbar = oContainer.getToolbar();
98
98
  var oTitle = oContainer.getTitle();
99
99
 
100
- rm.openStart("section", oContainer);
100
+ rm.openStart("div", oContainer);
101
101
  rm.class("sapUiFormContainer");
102
102
 
103
103
  if (oToolbar) {
@@ -110,7 +110,7 @@ sap.ui.define([
110
110
  rm.attr('title', oContainer.getTooltip_AsString());
111
111
  }
112
112
 
113
- this.writeAccessibilityStateContainer(rm, oContainer);
113
+ this.writeAccessibilityStateContainer(rm, oContainer, oLayout.isContainerLabelled(oContainer) ? "form" : "");
114
114
 
115
115
  rm.openEnd();
116
116
 
@@ -276,38 +276,52 @@ sap.ui.define([
276
276
 
277
277
  };
278
278
 
279
- /*
279
+ /**
280
280
  * Writes the accessibility attributes for FormContainers.
281
- * @param {sap.ui.core.RenderManager} rm
282
- * @param {sap.ui.layout.form.FormContainer} oContainer
281
+ * @param {sap.ui.core.RenderManager} rm the RenderManager that can be used for writing to the Render-Output-Buffer
282
+ * @param {sap.ui.layout.form.FormContainer} oContainer <code>FormContainer</code> to write accessibility attributes
283
+ * @param {string} sRole if set the given role is rendered, if no role given the DOM node needs no role (e.g. Container has no title)
283
284
  */
284
- FormLayoutRenderer.writeAccessibilityStateContainer = function(rm, oContainer){
285
+ FormLayoutRenderer.writeAccessibilityStateContainer = function(rm, oContainer, sRole){
285
286
 
286
- var mAriaProps = {};
287
- var oTitle = oContainer.getTitle();
288
- var oToolbar = oContainer.getToolbar();
287
+ const mAriaProps = {};
288
+ const sTitleID = this.getTitleId(oContainer);
289
+ if (sTitleID) {
290
+ mAriaProps["labelledby"] = {value: sTitleID, append: true};
291
+ }
292
+
293
+ if (sRole) {
294
+ mAriaProps["role"] = sRole;
295
+ }
296
+
297
+ rm.accessibilityState(oContainer, mAriaProps);
298
+
299
+ };
300
+
301
+ /**
302
+ * Determines the ID if the title of Form or Container used for aria-labelledby
303
+ * @param {sap.ui.layout.form.Form|sap.ui.layout.form.FormContainer} oContainer <code>Form</code> or <code>FormContainer</code> to determine the ID of it's title
304
+ * @returns {string} title ID
305
+ */
306
+ FormLayoutRenderer.getTitleId = function(oContainer){
307
+
308
+ const oTitle = oContainer.getTitle();
309
+ const oToolbar = oContainer.getToolbar();
310
+ let sID = "";
289
311
  if (oToolbar) {
290
312
  if (!oContainer.getAriaLabelledBy() || oContainer.getAriaLabelledBy().length == 0) {
291
313
  // no aria-label -> use Title of Toolbar
292
- var sToolbarTitleID = FormHelper.getToolbarTitle(oToolbar); // FormHelper must already be initialized by FormLayout
293
- mAriaProps["labelledby"] = {value: sToolbarTitleID, append: true};
314
+ sID = FormHelper.getToolbarTitle(oToolbar); // FormHelper must already be initialized by FormLayout
294
315
  }
295
316
  } else if (oTitle) {
296
- var sId = "";
297
317
  if (typeof oTitle == "string") {
298
- sId = oContainer.getId() + "--title";
318
+ sID = oContainer.getId() + "--title";
299
319
  } else {
300
- sId = oTitle.getId();
320
+ sID = oTitle.getId();
301
321
  }
302
- mAriaProps["labelledby"] = {value: sId, append: true};
303
- }
304
-
305
- if (mAriaProps["labelledby"] || oContainer.getAriaLabelledBy().length > 0) {
306
- // if no title or label do not set role because of JAWS 18 issues
307
- mAriaProps["role"] = "form";
308
322
  }
309
323
 
310
- rm.accessibilityState(oContainer, mAriaProps);
324
+ return sID;
311
325
 
312
326
  };
313
327
 
@@ -19,6 +19,17 @@ sap.ui.define([
19
19
  apiVersion: 2
20
20
  };
21
21
 
22
+
23
+ /*
24
+ * Form ARIA-Rendering:
25
+ * The Form itself should be rendered as role "region" and the fingle FormContainers (that will at the end have the labels and fields)
26
+ * should be rendered with role "form".
27
+ * Only if there is only one FormContainer without title (or other label) the Form itself renders with role "form" and the FormContainer
28
+ * renders without any role.
29
+ * For FormLayouts what renders FormContainers without any role (other Layout-controls) used. The Form needs to render role "form".
30
+ * At the end role "form" needs to be somewhere araund the labels and fields.
31
+ */
32
+
22
33
  /**
23
34
  * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
24
35
  *
@@ -26,8 +37,8 @@ sap.ui.define([
26
37
  * @param {sap.ui.layout.form.Form} oForm an object representation of the control that should be rendered
27
38
  */
28
39
  FormRenderer.render = function(rm, oForm){
29
- var oLayout = oForm.getLayout();
30
- var mAriaProps = {role: "form"};
40
+ const oLayout = oForm.getLayout();
41
+ const mAriaProps = {role: oLayout && oLayout.hasLabelledContainers(oForm) ? "region" : "form"};
31
42
 
32
43
  // write only a DIV for the form and let the layout render the rest
33
44
  rm.openStart("div", oForm)
@@ -54,24 +65,9 @@ sap.ui.define([
54
65
  rm.attr('title', oForm.getTooltip_AsString());
55
66
  }
56
67
 
57
- var oTitle = oForm.getTitle();
58
- var oToolbar = oForm.getToolbar();
59
- if (oToolbar) {
60
- if (!oForm.getAriaLabelledBy() || oForm.getAriaLabelledBy().length == 0) {
61
- // no aria-label -> use Title of Toolbar
62
- var sToolbarTitleID = FormHelper.getToolbarTitle(oToolbar); // FormHelper must already be initialized by Form
63
- mAriaProps["labelledby"] = sToolbarTitleID;
64
- }
65
- } else if (oTitle) {
66
- var sId = "";
67
- if (typeof oTitle == "string") {
68
- sId = oForm.getId() + "--title";
69
- } else {
70
- sId = oTitle.getId();
71
- }
72
- mAriaProps["labelledby"] = {value: sId, append: true};
73
- } else if (oForm._sSuggestedTitleId) {
74
- mAriaProps["labelledby"] = {value: oForm._sSuggestedTitleId, append: true};
68
+ const sTitleID = oLayout?.getRenderer().getTitleId(oForm) || oForm._sSuggestedTitleId;
69
+ if (sTitleID) {
70
+ mAriaProps["labelledby"] = {value: sTitleID, append: true};
75
71
  }
76
72
 
77
73
  rm.accessibilityState(oForm, mAriaProps);
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.LayoutData
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.120.27
25
+ * @version 1.120.29
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @extends sap.ui.core.LayoutData
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.120.27
25
+ * @version 1.120.29
26
26
  *
27
27
  * @constructor
28
28
  * @public
@@ -28,7 +28,7 @@ sap.ui.define(['sap/ui/layout/library', './FormLayout', './GridLayoutRenderer'],
28
28
  * @extends sap.ui.layout.form.FormLayout
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.120.27
31
+ * @version 1.120.29
32
32
  *
33
33
  * @constructor
34
34
  * @public
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  *
54
54
  * This control cannot be used stand-alone, it just renders a {@link sap.ui.layout.form.Form Form}, so it must be assigned to a {@link sap.ui.layout.form.Form Form} using the <code>layout</code> aggregation.
55
55
  * @extends sap.ui.layout.form.FormLayout
56
- * @version 1.120.27
56
+ * @version 1.120.29
57
57
  *
58
58
  * @constructor
59
59
  * @public
@@ -287,7 +287,7 @@ sap.ui.define([
287
287
  oRm.attr('title', sTooltip);
288
288
  }
289
289
 
290
- oLayout.getRenderer().writeAccessibilityStateContainer(oRm, oContainer);
290
+ oLayout.getRenderer().writeAccessibilityStateContainer(oRm, oContainer, "form"); // if Container-Panel used render always a role
291
291
 
292
292
  oRm.openEnd();
293
293
 
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  * @extends sap.ui.layout.form.FormLayout
51
51
  *
52
52
  * @author SAP SE
53
- * @version 1.120.27
53
+ * @version 1.120.29
54
54
  *
55
55
  * @constructor
56
56
  * @public
@@ -184,7 +184,7 @@ sap.ui.define([
184
184
  oRm.attr('title', sTooltip);
185
185
  }
186
186
 
187
- oLayout.getRenderer().writeAccessibilityStateContainer(oRm, oContainer);
187
+ oLayout.getRenderer().writeAccessibilityStateContainer(oRm, oContainer, "form"); // if Container-Panel used render always a role
188
188
 
189
189
  oRm.openEnd();
190
190
 
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @extends sap.ui.layout.form.FormElement
31
31
  *
32
32
  * @author SAP SE
33
- * @version 1.120.27
33
+ * @version 1.120.29
34
34
  *
35
35
  * @constructor
36
36
  * @public
@@ -67,7 +67,7 @@ sap.ui.define([
67
67
  * <b>Note:</b> If a more complex form is needed, use the <code>{@link sap.ui.layout.form.Form Form}</code> control instead.
68
68
  *
69
69
  * @extends sap.ui.core.Control
70
- * @version 1.120.27
70
+ * @version 1.120.29
71
71
  *
72
72
  * @constructor
73
73
  * @public
@@ -20,13 +20,13 @@ sap.ui.define([
20
20
  * @namespace
21
21
  * @alias sap.ui.layout
22
22
  * @author SAP SE
23
- * @version 1.120.27
23
+ * @version 1.120.29
24
24
  * @since 1.15
25
25
  * @public
26
26
  */
27
27
  var thisLib = sap.ui.getCore().initLibrary({
28
28
  name : "sap.ui.layout",
29
- version: "1.120.27",
29
+ version: "1.120.29",
30
30
  dependencies: ["sap.ui.core"],
31
31
  designtime: "sap/ui/layout/designtime/library.designtime",
32
32
  types: [
@@ -6,7 +6,7 @@ SPLITTER_MOVE=\u041A\u043E\u0440\u0438\u0441\u0442\u0435\u0442\u0435 \u0433\u043
6
6
 
7
7
  SIDE_CONTENT_LABEL=\u0421\u043F\u043E\u0440\u0435\u0434\u043D\u0430 \u0441\u043E\u0434\u0440\u0436\u0438\u043D\u0430
8
8
 
9
- RESPONSIVE_SPLITTER_RESIZE=\u041F\u0440\u043E\u043C\u0435\u043D\u0438 \u0458\u0430 \u0433\u043E\u043B\u0435\u043C\u0438\u043D\u0430\u0442\u0430 \u043F\u043E\u043C\u0435\u0453\u0443 \u043E\u043A\u043D\u043E {0} \u0438 \u043E\u043A\u043D\u043E {1}
9
+ RESPONSIVE_SPLITTER_RESIZE=\u041F\u0440\u043E\u043C\u0435\u043D\u0438 \u0458\u0430 \u0433\u043E\u043B\u0435\u043C\u0438\u043D\u0430\u0442\u0430 \u043C\u0435\u0453\u0443 \u043E\u043A\u043D\u043E {0} \u0438 \u043E\u043A\u043D\u043E {1}
10
10
 
11
11
  RESPONSIVE_SPLITTER_HOME=\u041E\u0434\u0438 \u043D\u0430 \u043F\u043E\u0434\u0435\u043B\u0435\u043D \u0435\u043A\u0440\u0430\u043D
12
12
 
@@ -161,7 +161,7 @@ html.sap-phone .sapUiFormCL > .sapUiFormCLContent > .sapUiFormCLContainer:not(:l
161
161
  visibility: hidden;
162
162
  }
163
163
 
164
- .sapUiFormCLElement > div {
164
+ .sapUiFormCLElement > * {
165
165
  float: left;
166
166
  padding: 0 0.25rem;
167
167
  box-sizing: border-box;
@@ -241,14 +241,15 @@ html[data-sap-ui-browser^="sf"] .sapUiFormEdit .sapUiFormCLElement {
241
241
 
242
242
  /* display mode */
243
243
  /* in display only mode add padding to controls as they don't have one */
244
- .sapUiForm:not(.sapUiFormEdit) .sapUiFormCLElement > div{
244
+ .sapUiForm:not(.sapUiFormEdit) .sapUiFormCLElement > *{
245
245
  padding-top: 0.25rem;
246
246
  padding-bottom: 0.25rem;
247
247
  font-size: 1px; /* as browser adds some px to text to meet font-size */
248
+ margin: 0; /* As <dd> would add a margin */
248
249
  }
249
250
 
250
- .sapUiForm:not(.sapUiFormEdit) .sapUiFormCLElement > div .sapUiIcon:not(.sapMBtnIcon),
251
- .sapUiForm:not(.sapUiFormEdit) .sapUiFormCLElement > div .sapMCbBg{
251
+ .sapUiForm:not(.sapUiFormEdit) .sapUiFormCLElement > * .sapUiIcon:not(.sapMBtnIcon),
252
+ .sapUiForm:not(.sapUiFormEdit) .sapUiFormCLElement > * .sapMCbBg{
252
253
  font-size: @sapUiFontSize; /* to set default font size on icons */
253
254
  }
254
255