@openui5/sap.ui.table 1.141.2 → 1.142.1
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/README.md +2 -2
- package/REUSE.toml +39 -1
- package/THIRDPARTY.txt +36 -3
- package/package.json +3 -3
- package/src/sap/ui/table/.library +1 -1
- package/src/sap/ui/table/AnalyticalColumn.js +1 -1
- package/src/sap/ui/table/AnalyticalColumnMenu.js +1 -1
- package/src/sap/ui/table/AnalyticalTable.js +1 -1
- package/src/sap/ui/table/Column.js +1 -1
- package/src/sap/ui/table/ColumnMenu.js +1 -1
- package/src/sap/ui/table/CreationRow.js +1 -1
- package/src/sap/ui/table/Row.js +1 -1
- package/src/sap/ui/table/RowAction.js +62 -143
- package/src/sap/ui/table/RowActionItem.js +61 -41
- package/src/sap/ui/table/RowActionRenderer.js +40 -5
- package/src/sap/ui/table/RowSettings.js +1 -1
- package/src/sap/ui/table/Table.js +62 -4
- package/src/sap/ui/table/TablePersoController.js +1 -1
- package/src/sap/ui/table/TableRenderer.js +50 -24
- package/src/sap/ui/table/TreeTable.js +1 -1
- package/src/sap/ui/table/extensions/Accessibility.js +56 -16
- package/src/sap/ui/table/extensions/AccessibilityRender.js +1 -1
- package/src/sap/ui/table/extensions/DragAndDrop.js +1 -1
- package/src/sap/ui/table/extensions/ExtensionBase.js +1 -1
- package/src/sap/ui/table/extensions/Keyboard.js +1 -1
- package/src/sap/ui/table/extensions/KeyboardDelegate.js +1 -1
- package/src/sap/ui/table/extensions/Pointer.js +1 -1
- package/src/sap/ui/table/extensions/Scrolling.js +1 -1
- package/src/sap/ui/table/extensions/ScrollingIOS.js +1 -1
- package/src/sap/ui/table/extensions/Synchronization.js +1 -1
- package/src/sap/ui/table/library.js +10 -10
- package/src/sap/ui/table/menus/AnalyticalTableContextMenu.js +1 -1
- package/src/sap/ui/table/menus/ColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/menus/ContextMenu.js +1 -1
- package/src/sap/ui/table/menus/MobileColumnHeaderMenuAdapter.js +1 -1
- package/src/sap/ui/table/messagebundle.properties +12 -0
- package/src/sap/ui/table/plugins/BindingSelection.js +1 -1
- package/src/sap/ui/table/plugins/MultiSelectionPlugin.js +10 -2
- package/src/sap/ui/table/plugins/ODataV4Aggregation.js +1 -1
- package/src/sap/ui/table/plugins/ODataV4Hierarchy.js +1 -1
- package/src/sap/ui/table/plugins/ODataV4MultiLevel.js +1 -1
- package/src/sap/ui/table/plugins/ODataV4MultiSelection.js +1 -1
- package/src/sap/ui/table/plugins/ODataV4Selection.js +1 -1
- package/src/sap/ui/table/plugins/ODataV4SingleSelection.js +1 -1
- package/src/sap/ui/table/plugins/PluginBase.js +1 -1
- package/src/sap/ui/table/plugins/SelectionModelSelection.js +1 -1
- package/src/sap/ui/table/plugins/SelectionPlugin.js +1 -1
- package/src/sap/ui/table/rowmodes/Auto.js +1 -1
- package/src/sap/ui/table/rowmodes/Fixed.js +1 -1
- package/src/sap/ui/table/rowmodes/Interactive.js +1 -1
- package/src/sap/ui/table/rowmodes/RowMode.js +1 -1
- package/src/sap/ui/table/rowmodes/Variable.js +1 -1
- package/src/sap/ui/table/rules/ColumnTemplate.support.js +2 -7
- package/src/sap/ui/table/themes/base/Cell.less +53 -28
- package/src/sap/ui/table/themes/base/Scrolling.less +58 -24
- package/src/sap/ui/table/themes/base/library.source.less +7 -3
- package/src/sap/ui/table/themes/sap_hcb/base_Cell.less +54 -29
- package/src/sap/ui/table/themes/sap_hcb/base_Scrolling.less +49 -21
- package/src/sap/ui/table/themes/sap_hcb/library.source.less +7 -3
- package/src/sap/ui/table/utils/TableUtils.js +1 -1
- package/src/sap/ui/table/utils/_ColumnUtils.js +1 -1
- package/src/sap/ui/table/utils/_GroupingUtils.js +1 -1
- package/src/sap/ui/table/utils/_HookUtils.js +1 -1
- package/src/sap/ui/table/utils/_MenuUtils.js +1 -1
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
//Provides default renderer for control sap.ui.table.RowAction
|
|
8
|
-
sap.ui.define([
|
|
9
|
-
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"./library"
|
|
10
|
+
], function(
|
|
11
|
+
library
|
|
12
|
+
) {
|
|
10
13
|
"use strict";
|
|
11
14
|
|
|
12
15
|
/**
|
|
@@ -42,13 +45,45 @@ sap.ui.define([],
|
|
|
42
45
|
|
|
43
46
|
rm.openEnd();
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
// special handling is needed for the navigation item
|
|
49
|
+
const aItems = [];
|
|
50
|
+
const aNavigationItems = [];
|
|
51
|
+
oAction._getVisibleItems().forEach((oItem) => {
|
|
52
|
+
oItem.getType() === library.RowActionType.Navigation ? aNavigationItems.push(oItem) : aItems.push(oItem);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
if (oAction._getSize() >= aItems.length + aNavigationItems.length /*No overflow*/) {
|
|
56
|
+
aItems.forEach((oItem) => {
|
|
57
|
+
renderItem(rm, oItem);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
aNavigationItems.forEach((oItem) => {
|
|
61
|
+
renderItem(rm, oItem);
|
|
62
|
+
});
|
|
63
|
+
} else {
|
|
64
|
+
const iItemsBeforeOverflow = Math.max(0, oAction._getSize() - aNavigationItems.length - 1);
|
|
65
|
+
for (let i = 0; i < iItemsBeforeOverflow; i++) {
|
|
66
|
+
renderItem(rm, aItems[i]);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const oIcon = oAction._getOverflowIcon(aItems, aNavigationItems, iItemsBeforeOverflow);
|
|
70
|
+
rm.renderControl(oIcon);
|
|
71
|
+
|
|
72
|
+
for (let i = 0; i < Math.min(aNavigationItems.length, oAction._getSize() - 1); i++) {
|
|
73
|
+
renderItem(rm, aNavigationItems[i]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
48
76
|
|
|
49
77
|
rm.close("div");
|
|
50
78
|
};
|
|
51
79
|
|
|
80
|
+
function renderItem(rm, oActionItem) {
|
|
81
|
+
const oIcon = oActionItem._getIcon();
|
|
82
|
+
oIcon.addStyleClass("sapUiTableActionIcon");
|
|
83
|
+
|
|
84
|
+
rm.renderControl(oIcon);
|
|
85
|
+
}
|
|
86
|
+
|
|
52
87
|
return RowActionRenderer;
|
|
53
88
|
|
|
54
89
|
}, /* bExport= */ true);
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* The <code>RowSettings</code> control allows you to configure a row.
|
|
28
28
|
* You can only use this control in the context of the <code>sap.ui.table.Table</code> control to define row settings.
|
|
29
29
|
* @extends sap.ui.core.Element
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.142.1
|
|
31
31
|
*
|
|
32
32
|
* @constructor
|
|
33
33
|
* @public
|
|
@@ -106,7 +106,7 @@ sap.ui.define([
|
|
|
106
106
|
* the data model and binding being used.
|
|
107
107
|
* </p>
|
|
108
108
|
* @extends sap.ui.core.Control
|
|
109
|
-
* @version 1.
|
|
109
|
+
* @version 1.142.1
|
|
110
110
|
*
|
|
111
111
|
* @constructor
|
|
112
112
|
* @public
|
|
@@ -398,8 +398,9 @@ sap.ui.define([
|
|
|
398
398
|
enableBusyIndicator: {type: "boolean", group: "Behavior", defaultValue: false},
|
|
399
399
|
|
|
400
400
|
/**
|
|
401
|
-
* Number of row actions made visible
|
|
402
|
-
* The
|
|
401
|
+
* Number of row actions made visible, hence this property also determines the width of the row action column.
|
|
402
|
+
* The maximum number of visible row actions is 3. If the <code>rowActionTemplate</code> contains more <code>rowActionItems</code>, they
|
|
403
|
+
* are shown in an overflow menu.
|
|
403
404
|
* @since 1.45.0
|
|
404
405
|
*/
|
|
405
406
|
rowActionCount: {type: "int", group: "Appearance", defaultValue: 0},
|
|
@@ -1977,6 +1978,63 @@ sap.ui.define([
|
|
|
1977
1978
|
oTable.getRows()[Math.min(iIndex, iTotalRowCount - 1) - iFirstRenderedRowIndex]._setFocus(bFirstInteractiveElement);
|
|
1978
1979
|
}
|
|
1979
1980
|
|
|
1981
|
+
/**
|
|
1982
|
+
* Scrolls to the specified row index. If the <code>iIndex</code> is not in the visible area,
|
|
1983
|
+
* it scrolls the row into view.
|
|
1984
|
+
*
|
|
1985
|
+
* If the given index is already in the visible area, it resolves the promise immediately without scrolling.
|
|
1986
|
+
*
|
|
1987
|
+
* @param {number} iIndex The index of the row to scroll into the visible area
|
|
1988
|
+
*
|
|
1989
|
+
* @private
|
|
1990
|
+
* @ui5-restricted sap.ui.mdc
|
|
1991
|
+
* @returns {Promise} A <code>Promise</code> that resolves after scrolling is finished if scrolling was required
|
|
1992
|
+
* @throws {Error} If the table has fixed top rows
|
|
1993
|
+
* @throws {Error} If the index is not a number or less than -1
|
|
1994
|
+
*/
|
|
1995
|
+
Table.prototype._scrollToIndex = function(iIndex) {
|
|
1996
|
+
const mRowCounts = this._getRowCounts();
|
|
1997
|
+
|
|
1998
|
+
if (mRowCounts.fixedTop > 0) {
|
|
1999
|
+
throw new Error("The table has fixed top rows. Scrolling to a specific row index is not supported in this case.");
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
if (typeof iIndex !== "number" || iIndex < -1) {
|
|
2003
|
+
throw new Error("Invalid index: " + iIndex);
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
const iRowCount = this._getRowCounts().count;
|
|
2007
|
+
|
|
2008
|
+
if (iRowCount === 0) {
|
|
2009
|
+
return Promise.resolve();
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
if (iIndex === -1) {
|
|
2013
|
+
// Instead of _getMaxFirstVisibleRowIndex() we use _getTotalRowCount() here.
|
|
2014
|
+
// Scenario: The table displays 5 rows, the first visible row is 7, the total row count is 16.
|
|
2015
|
+
// Rows 7 to 11 are displayed. The user calls _scrollToIndex(-1) to scroll to the last row.
|
|
2016
|
+
// _getMaxFirstVisibleRowIndex() would return 11. Since 11 is currently the last visible row, no scrolling would happen.
|
|
2017
|
+
iIndex = this._getTotalRowCount();
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
const iFirstVisibleRow = this.getFirstVisibleRow();
|
|
2021
|
+
|
|
2022
|
+
if (iIndex >= iFirstVisibleRow && iIndex <= iFirstVisibleRow + iRowCount) {
|
|
2023
|
+
return Promise.resolve();
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
const bExpectRowsUpdated = this._setFirstVisibleRowIndex(iIndex);
|
|
2027
|
+
|
|
2028
|
+
return new Promise((resolve) => {
|
|
2029
|
+
this.attachEventOnce("_rowsUpdated", () => {
|
|
2030
|
+
if (!bExpectRowsUpdated) {
|
|
2031
|
+
this._scrollToIndex(iIndex);
|
|
2032
|
+
}
|
|
2033
|
+
resolve();
|
|
2034
|
+
});
|
|
2035
|
+
});
|
|
2036
|
+
};
|
|
2037
|
+
|
|
1980
2038
|
// enable calling 'bindAggregation("rows")' without a factory
|
|
1981
2039
|
Table.getMetadata().getAggregation("rows")._doesNotRequireFactory = true;
|
|
1982
2040
|
|
|
@@ -4055,7 +4113,7 @@ sap.ui.define([
|
|
|
4055
4113
|
|
|
4056
4114
|
Table.prototype.setRowActionCount = function(iCount) {
|
|
4057
4115
|
if (typeof iCount === "number") {
|
|
4058
|
-
iCount = Math.max(0, Math.min(iCount,
|
|
4116
|
+
iCount = Math.max(0, Math.min(iCount, 3));
|
|
4059
4117
|
}
|
|
4060
4118
|
|
|
4061
4119
|
return this.setProperty("rowActionCount", iCount);
|
|
@@ -97,6 +97,7 @@ sap.ui.define([
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
const oScrollExtension = oTable._getScrollExtension();
|
|
100
|
+
const oAccRenderExtension = oTable._getAccRenderExtension();
|
|
100
101
|
if (oScrollExtension.isVerticalScrollbarRequired() && !oScrollExtension.isVerticalScrollbarExternal()) {
|
|
101
102
|
rm.class("sapUiTableVScr"); // show vertical scrollbar
|
|
102
103
|
}
|
|
@@ -108,8 +109,15 @@ sap.ui.define([
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
if (TableUtils.hasRowActions(oTable)) {
|
|
112
|
+
rm.class("sapUiTableRAct");
|
|
111
113
|
const iRowActionCount = oTable.getRowActionCount();
|
|
112
|
-
|
|
114
|
+
if (iRowActionCount === 1) {
|
|
115
|
+
rm.class("sapUiTableRActS");
|
|
116
|
+
} else if (iRowActionCount === 2) {
|
|
117
|
+
rm.class("sapUiTableRActM");
|
|
118
|
+
} else {
|
|
119
|
+
rm.class("sapUiTableRActL");
|
|
120
|
+
}
|
|
113
121
|
} else if (TableUtils.hasRowNavigationIndicators(oTable)) {
|
|
114
122
|
rm.class("sapUiTableRowNavIndicator");
|
|
115
123
|
}
|
|
@@ -179,7 +187,7 @@ sap.ui.define([
|
|
|
179
187
|
this.renderTabElement(rm, "sapUiTableCtrlBefore", bDummyTabbable ? "0" : "-1");
|
|
180
188
|
|
|
181
189
|
rm.openStart("div", oTable.getId() + "-sapUiTableGridCnt");
|
|
182
|
-
|
|
190
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "Content");
|
|
183
191
|
rm.openEnd();
|
|
184
192
|
|
|
185
193
|
this.renderColRsz(rm, oTable);
|
|
@@ -199,12 +207,12 @@ sap.ui.define([
|
|
|
199
207
|
this.renderHSbBackground(rm, oTable);
|
|
200
208
|
this.renderHSb(rm, oTable);
|
|
201
209
|
|
|
202
|
-
|
|
210
|
+
oAccRenderExtension.writeHiddenAccTexts(rm, oTable);
|
|
203
211
|
|
|
204
212
|
rm.openStart("div", oTable.getId() + "-overlay");
|
|
205
213
|
rm.class("sapUiTableOverlayArea");
|
|
206
214
|
rm.attr("tabindex", "0");
|
|
207
|
-
|
|
215
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "Overlay");
|
|
208
216
|
rm.openEnd();
|
|
209
217
|
rm.close("div");
|
|
210
218
|
|
|
@@ -408,12 +416,28 @@ sap.ui.define([
|
|
|
408
416
|
let bEnabled = false;
|
|
409
417
|
let bSelAll = false;
|
|
410
418
|
const mRenderConfig = oTable._getSelectionPlugin().getRenderConfig();
|
|
419
|
+
const oAccRenderExtension = oTable._getAccRenderExtension();
|
|
411
420
|
|
|
412
421
|
rm.openStart("div");
|
|
413
|
-
|
|
422
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "ColumnRowHeaderRow");
|
|
414
423
|
rm.openEnd();
|
|
415
|
-
|
|
416
|
-
|
|
424
|
+
|
|
425
|
+
const iHeaderRowCount = TableUtils.getHeaderRowCount(oTable);
|
|
426
|
+
if (iHeaderRowCount > 1) {
|
|
427
|
+
// In multi label scenario extra hidden cells are rendered in order to maintain correct aria-ownns relationship for each header row. They
|
|
428
|
+
// are rendered in the same row which does not affect the announcement because the row has aria-hidden.
|
|
429
|
+
for (let i = 0; i < iHeaderRowCount - 1; i++) {
|
|
430
|
+
rm.openStart("div", oTable.getId() + "-rowcolhdr" + i);
|
|
431
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "ColumnRowHeaderCell", {bLabel: false});
|
|
432
|
+
rm.openEnd();
|
|
433
|
+
rm.close("div");
|
|
434
|
+
}
|
|
435
|
+
rm.openStart("div", oTable.getId() + "-rowcolhdr" + (iHeaderRowCount - 1));
|
|
436
|
+
} else {
|
|
437
|
+
rm.openStart("div", oTable.getId() + "-rowcolhdr");
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "ColumnRowHeaderCell", {bLabel: true});
|
|
417
441
|
rm.openEnd();
|
|
418
442
|
rm.openStart("div", oTable.getId() + "-selall");
|
|
419
443
|
|
|
@@ -451,7 +475,7 @@ sap.ui.define([
|
|
|
451
475
|
enabled: bEnabled,
|
|
452
476
|
checked: bSelAll
|
|
453
477
|
};
|
|
454
|
-
|
|
478
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "ColumnRowHeader", oParams);
|
|
455
479
|
|
|
456
480
|
rm.openEnd();
|
|
457
481
|
|
|
@@ -620,11 +644,12 @@ sap.ui.define([
|
|
|
620
644
|
// =============================================================================
|
|
621
645
|
|
|
622
646
|
TableRenderer.renderRowHdr = function(rm, oTable) {
|
|
647
|
+
const oAccRenderExtension = oTable._getAccRenderExtension();
|
|
623
648
|
rm.openStart("div", oTable.getId() + "-sapUiTableRowHdrScr");
|
|
624
|
-
|
|
649
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "Presentation");
|
|
625
650
|
rm.class("sapUiTableRowHdrScr");
|
|
626
651
|
rm.class("sapUiTableNoOpacity");
|
|
627
|
-
|
|
652
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "RowHeaderCol");
|
|
628
653
|
rm.openEnd();
|
|
629
654
|
|
|
630
655
|
// start with the first current top visible row
|
|
@@ -681,9 +706,10 @@ sap.ui.define([
|
|
|
681
706
|
|
|
682
707
|
TableRenderer.renderRowAddon = function(rm, oTable, oRow, iRowIndex, bHeader) {
|
|
683
708
|
const bRowSelected = oRow._isSelected();
|
|
709
|
+
const oAccRenderExtension = oTable._getAccRenderExtension();
|
|
684
710
|
|
|
685
711
|
rm.openStart("div");
|
|
686
|
-
|
|
712
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "RowAddon");
|
|
687
713
|
|
|
688
714
|
rm.attr("data-sap-ui-related", oRow.getId());
|
|
689
715
|
rm.attr("data-sap-ui-rowindex", iRowIndex);
|
|
@@ -718,7 +744,7 @@ sap.ui.define([
|
|
|
718
744
|
rowSelected: bRowSelected,
|
|
719
745
|
rowHidden: oRow.isEmpty()
|
|
720
746
|
};
|
|
721
|
-
|
|
747
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, bHeader ? "RowHeader" : "RowAction", oParams);
|
|
722
748
|
|
|
723
749
|
rm.openEnd();
|
|
724
750
|
if (bHeader) {
|
|
@@ -817,7 +843,8 @@ sap.ui.define([
|
|
|
817
843
|
rm.class(sClass);
|
|
818
844
|
});
|
|
819
845
|
|
|
820
|
-
oTable._getAccRenderExtension()
|
|
846
|
+
const oAccRenderExtension = oTable._getAccRenderExtension();
|
|
847
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, bHeader ? "Presentation" : "Table");
|
|
821
848
|
|
|
822
849
|
rm.class("sapUiTableCtrl");
|
|
823
850
|
if (bHeader) {
|
|
@@ -883,7 +910,7 @@ sap.ui.define([
|
|
|
883
910
|
if (oColParam.shouldRender) {
|
|
884
911
|
if (iStartRow === 0) {
|
|
885
912
|
rm.openStart("th", oTable.getId() + sSuffix + iCol);
|
|
886
|
-
|
|
913
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "Th", {column: oColumn});
|
|
887
914
|
} else {
|
|
888
915
|
rm.openStart("th");
|
|
889
916
|
}
|
|
@@ -908,7 +935,7 @@ sap.ui.define([
|
|
|
908
935
|
// dummy column to fill the table width
|
|
909
936
|
if (bRenderDummyColumn) {
|
|
910
937
|
rm.openStart("th", bHeader && oTable.getId() + "-dummycolhdr");
|
|
911
|
-
|
|
938
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "Presentation");
|
|
912
939
|
rm.openEnd().close("th");
|
|
913
940
|
}
|
|
914
941
|
|
|
@@ -1009,7 +1036,8 @@ sap.ui.define([
|
|
|
1009
1036
|
rm.class("sapUiTableRow");
|
|
1010
1037
|
rm.class("sapUiTableHeaderRow");
|
|
1011
1038
|
rm.class("sapUiTableColHdrTr");
|
|
1012
|
-
oTable._getAccRenderExtension()
|
|
1039
|
+
const oAccRenderExtension = oTable._getAccRenderExtension();
|
|
1040
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "ColumnHeaderRow", {rowIndex: iRow, fixedCol: bFixedTable});
|
|
1013
1041
|
rm.openEnd();
|
|
1014
1042
|
|
|
1015
1043
|
//
|
|
@@ -1061,7 +1089,7 @@ sap.ui.define([
|
|
|
1061
1089
|
|
|
1062
1090
|
if (!bFixedTable && bHasOnlyFixedColumns && aColumns.length > 0) {
|
|
1063
1091
|
rm.openStart("td").class("sapUiTableCellDummy");
|
|
1064
|
-
|
|
1092
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "Presentation");
|
|
1065
1093
|
rm.openEnd().close("td");
|
|
1066
1094
|
}
|
|
1067
1095
|
rm.close("tr");
|
|
@@ -1111,7 +1139,8 @@ sap.ui.define([
|
|
|
1111
1139
|
fixedCol: bFixedTable,
|
|
1112
1140
|
rowNavigated: oRowSettings ? oRowSettings.getNavigated() : false
|
|
1113
1141
|
};
|
|
1114
|
-
oTable._getAccRenderExtension()
|
|
1142
|
+
const oAccRenderExtension = oTable._getAccRenderExtension();
|
|
1143
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "Tr", oParams);
|
|
1115
1144
|
|
|
1116
1145
|
rm.openEnd();
|
|
1117
1146
|
|
|
@@ -1123,14 +1152,14 @@ sap.ui.define([
|
|
|
1123
1152
|
}
|
|
1124
1153
|
if (!bFixedTable && bHasOnlyFixedColumns && aCells.length > 0) {
|
|
1125
1154
|
rm.openStart("td").class("sapUiTableCellDummy");
|
|
1126
|
-
|
|
1155
|
+
oAccRenderExtension.writeAriaAttributesFor(rm, oTable, "Presentation");
|
|
1127
1156
|
rm.openEnd();
|
|
1128
1157
|
rm.close("td");
|
|
1129
1158
|
}
|
|
1130
1159
|
rm.close("tr");
|
|
1131
1160
|
};
|
|
1132
1161
|
|
|
1133
|
-
TableRenderer.renderTableCell = function(rm, oTable, oRow, oCell, iCellIndex, bFixedTable, iStartColumn, iEndColumn, aVisibleColumns, iLastFixedColumnIndex
|
|
1162
|
+
TableRenderer.renderTableCell = function(rm, oTable, oRow, oCell, iCellIndex, bFixedTable, iStartColumn, iEndColumn, aVisibleColumns, iLastFixedColumnIndex) {
|
|
1134
1163
|
const oColumn = Column.ofCell(oCell);
|
|
1135
1164
|
const iColIndex = oColumn.getIndex();
|
|
1136
1165
|
|
|
@@ -1146,10 +1175,7 @@ sap.ui.define([
|
|
|
1146
1175
|
const bIsLastFixedColumn = bFixedTable && iLastFixedColumnIndex === iColIndex;
|
|
1147
1176
|
|
|
1148
1177
|
const oParams = {
|
|
1149
|
-
column: oColumn
|
|
1150
|
-
row: oRow,
|
|
1151
|
-
fixed: bFixedTable,
|
|
1152
|
-
rowSelected: bSelected
|
|
1178
|
+
column: oColumn
|
|
1153
1179
|
};
|
|
1154
1180
|
oTable._getAccRenderExtension().writeAriaAttributesFor(rm, oTable, "DataCell", oParams);
|
|
1155
1181
|
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* The control can be used in combination with {@link sap.ui.model.json.JSONModel JSONModel} and {@link sap.ui.model.odata.v2.ODataModel ODataModel V2}.
|
|
39
39
|
* For a tree-table-like behavior with OData V4 services, use the {@link sap.ui.table.Table Table} control with the {@link sap.ui.table.plugins.ODataV4Hierarchy ODataV4Hierarchy} plugin.
|
|
40
40
|
* @extends sap.ui.table.Table
|
|
41
|
-
* @version 1.
|
|
41
|
+
* @version 1.142.1
|
|
42
42
|
*
|
|
43
43
|
* @constructor
|
|
44
44
|
* @public
|
|
@@ -449,6 +449,12 @@ sap.ui.define([
|
|
|
449
449
|
let sText = "";
|
|
450
450
|
if (oInfo) {
|
|
451
451
|
sText = oInfo.description;
|
|
452
|
+
if (bIsTreeColumnCell && !bHidden) {
|
|
453
|
+
const sExpandCollapseButtonText = oTableInstances.row.isExpanded() ?
|
|
454
|
+
TableUtils.getResourceText("TBL_COLLAPSE_BUTTON") : TableUtils.getResourceText("TBL_EXPAND_BUTTON");
|
|
455
|
+
|
|
456
|
+
sText = sExpandCollapseButtonText.concat(" ", oInfo.description);
|
|
457
|
+
}
|
|
452
458
|
if (TableUtils.getInteractiveElements($Cell) !== null) {
|
|
453
459
|
sText = TableUtils.getResourceText("TBL_CELL_INCLUDES", [sText]);
|
|
454
460
|
}
|
|
@@ -634,10 +640,26 @@ sap.ui.define([
|
|
|
634
640
|
|
|
635
641
|
/**
|
|
636
642
|
* Returns the aria attributes for the column row header cell.
|
|
643
|
+
*
|
|
644
|
+
* @param {sap.ui.table.extensions.Accessibility} oExtension The accessibility extension
|
|
645
|
+
* @param {{bLabel: boolean}} mParams Whether an aria-label should be added
|
|
637
646
|
* @returns {object} An object containing the aria attributes
|
|
638
647
|
*/
|
|
639
|
-
getAriaAttributesForColumnRowHeaderCell: function() {
|
|
640
|
-
|
|
648
|
+
getAriaAttributesForColumnRowHeaderCell: function(oExtension, mParams) {
|
|
649
|
+
const mAttributes = {"role": "columnheader"};
|
|
650
|
+
const oTable = oExtension.getTable();
|
|
651
|
+
const sSelectionMode = oTable.getSelectionMode();
|
|
652
|
+
|
|
653
|
+
if (mParams.bLabel) {
|
|
654
|
+
if (sSelectionMode !== SelectionMode.None) {
|
|
655
|
+
mAttributes["aria-label"] = TableUtils.getResourceText("TBL_TABLE_SELECTION_COLUMNHEADER");
|
|
656
|
+
} else if (TableUtils.hasRowHeader(oTable)) {
|
|
657
|
+
// Table has no selection, but because group mode is active, selection column is still visible with focusable row header cells.
|
|
658
|
+
mAttributes["aria-label"] = TableUtils.getResourceText("TBL_ROW_SELECTION_COLUMN_LABEL");
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
return mAttributes;
|
|
641
663
|
},
|
|
642
664
|
|
|
643
665
|
/**
|
|
@@ -725,8 +747,8 @@ sap.ui.define([
|
|
|
725
747
|
* Returns the aria attributes for a column header.
|
|
726
748
|
*
|
|
727
749
|
* @param {sap.ui.table.extensions.Accessibility} oExtension The accessibility extension
|
|
728
|
-
* @param {{column: sap.ui.table.Column, headerId: string,
|
|
729
|
-
* column, the id of the header cell,
|
|
750
|
+
* @param {{column: sap.ui.table.Column, headerId: string, colspan: boolean}} mParams An object containing the instance of the
|
|
751
|
+
* column, the id of the header cell, and whether the column has span
|
|
730
752
|
* @returns {object} An object containing the aria attributes
|
|
731
753
|
*/
|
|
732
754
|
getAriaAttributesForColumnHeader: function(oExtension, mParams) {
|
|
@@ -778,9 +800,7 @@ sap.ui.define([
|
|
|
778
800
|
* Returns the aria attributes for a data cell.
|
|
779
801
|
*
|
|
780
802
|
* @param {sap.ui.table.extensions.Accessibility} oExtension The accessibility extension
|
|
781
|
-
* @param {{
|
|
782
|
-
* containing the index of the row, the instance of the column, the instance of the row, whether the column is fixed and whether the row is
|
|
783
|
-
* selected
|
|
803
|
+
* @param {{column: sap.ui.table.Column}} mParams An object containing the instance of the column
|
|
784
804
|
* @returns {object} An object containing the aria attributes
|
|
785
805
|
*/
|
|
786
806
|
getAriaAttributesForDataCell: function(oExtension, mParams) {
|
|
@@ -820,7 +840,9 @@ sap.ui.define([
|
|
|
820
840
|
const sTableId = oTable.getId();
|
|
821
841
|
|
|
822
842
|
mAttributes["role"] = TableUtils.Grouping.isInGroupMode(oTable) || TableUtils.Grouping.isInTreeMode(oTable) ? "treegrid" : "grid";
|
|
823
|
-
|
|
843
|
+
if (oTable.getSelectionMode() !== SelectionMode.None) {
|
|
844
|
+
mAttributes["aria-describedby"] = [sTableId + "-ariaselection"];
|
|
845
|
+
}
|
|
824
846
|
mAttributes["aria-labelledby"] = [].concat(oTable.getAriaLabelledBy());
|
|
825
847
|
if (oTable.getTitle()) {
|
|
826
848
|
mAttributes["aria-labelledby"].push(oTable.getTitle().getId());
|
|
@@ -891,23 +913,37 @@ sap.ui.define([
|
|
|
891
913
|
* Returns the aria attributes for the row that contains the column headers.
|
|
892
914
|
*
|
|
893
915
|
* @param {sap.ui.table.extensions.Accessibility} oExtension The accessibility extension
|
|
894
|
-
* @param {
|
|
895
|
-
* @param {int} mParams.rowIndex The index of the row
|
|
916
|
+
* @param {{rowIndex: int, fixedCol: boolean}} mParams An object containing the index of the row and whether the column is fixed
|
|
896
917
|
* @returns {object} An object containing the aria attributes
|
|
897
918
|
*/
|
|
898
919
|
getAriaAttributesForColumnHeaderRow: function(oExtension, mParams) {
|
|
899
920
|
const mAttributes = {"role": "row"};
|
|
921
|
+
if (mParams.fixedCol) {
|
|
922
|
+
return mAttributes;
|
|
923
|
+
}
|
|
900
924
|
const oTable = oExtension.getTable();
|
|
901
925
|
const sTableId = oTable.getId();
|
|
902
926
|
|
|
903
927
|
mAttributes["aria-rowindex"] = mParams.rowIndex + 1;
|
|
904
928
|
mAttributes["aria-owns"] = [];
|
|
905
|
-
if (TableUtils.hasRowHeader(oTable)) {
|
|
906
|
-
mAttributes["aria-owns"].push(sTableId + "-rowcolhdr");
|
|
907
|
-
}
|
|
908
929
|
|
|
909
|
-
|
|
910
|
-
|
|
930
|
+
const aVisibleColumns = oTable._getVisibleColumns();
|
|
931
|
+
if (TableUtils.getHeaderRowCount(oTable) > 1) {
|
|
932
|
+
if (TableUtils.hasRowHeader(oTable)) {
|
|
933
|
+
mAttributes["aria-owns"].push(sTableId + "-rowcolhdr" + mParams.rowIndex);
|
|
934
|
+
}
|
|
935
|
+
let j = 0;
|
|
936
|
+
while (j < TableUtils.getVisibleColumnCount(oTable)) {
|
|
937
|
+
mAttributes["aria-owns"].push(aVisibleColumns[j].getId() + (mParams.rowIndex > 0 ? "_" + mParams.rowIndex : ""));
|
|
938
|
+
j += parseInt(aVisibleColumns[j].getHeaderSpan()[mParams.rowIndex]) || 1;
|
|
939
|
+
}
|
|
940
|
+
} else {
|
|
941
|
+
if (TableUtils.hasRowHeader(oTable)) {
|
|
942
|
+
mAttributes["aria-owns"].push(sTableId + "-rowcolhdr");
|
|
943
|
+
}
|
|
944
|
+
for (let j = 0; j < TableUtils.getVisibleColumnCount(oTable); j++) {
|
|
945
|
+
mAttributes["aria-owns"].push(aVisibleColumns[j].getId());
|
|
946
|
+
}
|
|
911
947
|
}
|
|
912
948
|
|
|
913
949
|
if (TableUtils.hasRowActions(oTable)) {
|
|
@@ -978,6 +1014,10 @@ sap.ui.define([
|
|
|
978
1014
|
mAttributes["aria-current"] = true;
|
|
979
1015
|
}
|
|
980
1016
|
|
|
1017
|
+
if (mParams.fixedCol) {
|
|
1018
|
+
return mAttributes;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
981
1021
|
mAttributes["aria-owns"] = [];
|
|
982
1022
|
if (TableUtils.hasRowHeader(oTable)) {
|
|
983
1023
|
mAttributes["aria-owns"].push(sTableId + "-rowsel" + mParams.index);
|
|
@@ -1143,7 +1183,7 @@ sap.ui.define([
|
|
|
1143
1183
|
* @class Extension for sap.ui.table.Table which handles ACC related things.
|
|
1144
1184
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
1145
1185
|
* @author SAP SE
|
|
1146
|
-
* @version 1.
|
|
1186
|
+
* @version 1.142.1
|
|
1147
1187
|
* @constructor
|
|
1148
1188
|
* @private
|
|
1149
1189
|
* @alias sap.ui.table.extensions.Accessibility
|
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* @class Extension for sap.ui.table.TableRenderer which handles ACC related things.
|
|
45
45
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
46
46
|
* @author SAP SE
|
|
47
|
-
* @version 1.
|
|
47
|
+
* @version 1.142.1
|
|
48
48
|
* @constructor
|
|
49
49
|
* @private
|
|
50
50
|
* @alias sap.ui.table.extensions.AccessibilityRender
|
|
@@ -265,7 +265,7 @@ sap.ui.define([
|
|
|
265
265
|
* @class Extension for sap.ui.table.Table which handles keyboard related things.
|
|
266
266
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
267
267
|
* @author SAP SE
|
|
268
|
-
* @version 1.
|
|
268
|
+
* @version 1.142.1
|
|
269
269
|
* @constructor
|
|
270
270
|
* @private
|
|
271
271
|
* @alias sap.ui.table.extensions.Keyboard
|
|
@@ -670,7 +670,7 @@ sap.ui.define([
|
|
|
670
670
|
* @class Extension for sap.ui.table.Table which handles mouse and touch related things.
|
|
671
671
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
672
672
|
* @author SAP SE
|
|
673
|
-
* @version 1.
|
|
673
|
+
* @version 1.142.1
|
|
674
674
|
* @constructor
|
|
675
675
|
* @private
|
|
676
676
|
* @alias sap.ui.table.extensions.Pointer
|
|
@@ -2314,7 +2314,7 @@ sap.ui.define([
|
|
|
2314
2314
|
* @class Extension for sap.ui.table.Table which handles scrolling.
|
|
2315
2315
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
2316
2316
|
* @author SAP SE
|
|
2317
|
-
* @version 1.
|
|
2317
|
+
* @version 1.142.1
|
|
2318
2318
|
* @constructor
|
|
2319
2319
|
* @private
|
|
2320
2320
|
* @alias sap.ui.table.extensions.Scrolling
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @class Extension for sap.ui.table.Table which handles the scrollbar on iOS.
|
|
30
30
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.142.1
|
|
33
33
|
* @constructor
|
|
34
34
|
* @private
|
|
35
35
|
* @alias sap.ui.table.extensions.ScrollingIOS
|
|
@@ -185,7 +185,7 @@ sap.ui.define([
|
|
|
185
185
|
* @class Extension for sap.ui.table.Table that allows synchronization with a table.
|
|
186
186
|
* @extends sap.ui.table.extensions.ExtensionBase
|
|
187
187
|
* @author SAP SE
|
|
188
|
-
* @version 1.
|
|
188
|
+
* @version 1.142.1
|
|
189
189
|
* @constructor
|
|
190
190
|
* @private
|
|
191
191
|
* @alias sap.ui.table.extensions.Synchronization
|