@plone/volto 17.21.0 → 17.22.0
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/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/packages/volto-slate/package.json +1 -1
- package/packages/volto-slate/src/blocks/Table/TableBlockView.jsx +24 -10
- package/src/components/manage/Widgets/TokenWidget.jsx +1 -0
- package/theme/themes/pastanaga/collections/table.overrides +9 -0
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,16 @@ myst:
|
|
|
17
17
|
|
|
18
18
|
<!-- towncrier release notes start -->
|
|
19
19
|
|
|
20
|
+
## 17.22.0 (2025-05-20)
|
|
21
|
+
|
|
22
|
+
### Feature
|
|
23
|
+
|
|
24
|
+
- Use table sorting icons from pastanaga `icons.woff` instead of assuming we have Font Awesome icons. Improve accessibility for sortable table headers in table block. @ichim-david @kreafox [#7091](https://github.com/plone/volto/issues/7091)
|
|
25
|
+
|
|
26
|
+
### Bugfix
|
|
27
|
+
|
|
28
|
+
- Added an `aria-label` to `CreatableSelect` inside `TokenWidget` to improve the component’s accessibility. @Wagner3UB [#6786](https://github.com/plone/volto/issues/6786)
|
|
29
|
+
|
|
20
30
|
## 17.21.0 (2025-03-05)
|
|
21
31
|
|
|
22
32
|
### Feature
|
package/package.json
CHANGED
|
@@ -71,6 +71,19 @@ const View = ({ data }) => {
|
|
|
71
71
|
});
|
|
72
72
|
}, [state, rows]);
|
|
73
73
|
|
|
74
|
+
const handleSort = (index) => {
|
|
75
|
+
if (!data.table.sortable) return;
|
|
76
|
+
setState({
|
|
77
|
+
column: index,
|
|
78
|
+
direction:
|
|
79
|
+
state.column !== index
|
|
80
|
+
? 'ascending'
|
|
81
|
+
: state.direction === 'ascending'
|
|
82
|
+
? 'descending'
|
|
83
|
+
: 'ascending',
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
74
87
|
return (
|
|
75
88
|
<>
|
|
76
89
|
{data && data.table && (
|
|
@@ -92,19 +105,20 @@ const View = ({ data }) => {
|
|
|
92
105
|
key={cell.key}
|
|
93
106
|
textAlign="left"
|
|
94
107
|
verticalAlign="middle"
|
|
108
|
+
tabIndex={data.table.sortable ? '0' : '-1'}
|
|
95
109
|
sorted={state.column === index ? state.direction : null}
|
|
96
110
|
onClick={() => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
? 'descending'
|
|
105
|
-
: 'ascending',
|
|
106
|
-
});
|
|
111
|
+
handleSort(index);
|
|
112
|
+
}}
|
|
113
|
+
onKeyDown={(e) => {
|
|
114
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
handleSort(index);
|
|
117
|
+
}
|
|
107
118
|
}}
|
|
119
|
+
aria-sort={
|
|
120
|
+
state.column === index ? state.direction : 'none'
|
|
121
|
+
}
|
|
108
122
|
>
|
|
109
123
|
{cell.value &&
|
|
110
124
|
Node.string({ children: cell.value }).length > 0
|
|
@@ -173,6 +173,7 @@ class TokenWidget extends Component {
|
|
|
173
173
|
<FormFieldWrapper {...this.props}>
|
|
174
174
|
<CreatableSelect
|
|
175
175
|
id={`field-${this.props.id}`}
|
|
176
|
+
aria-labelledby={`fieldset-${this.props.fieldSet}-field-label-${this.props.id}`}
|
|
176
177
|
key={this.props.id}
|
|
177
178
|
menuShouldScrollIntoView={false}
|
|
178
179
|
isDisabled={this.props.isDisabled}
|
|
@@ -19,6 +19,15 @@
|
|
|
19
19
|
vertical-align: @headerVerticalAlign;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// use sorting icons from icons.woff instead of assuming it's font awesome
|
|
23
|
+
.ui.sortable.table thead th.ascending::after {
|
|
24
|
+
content: '\E9EC';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ui.sortable.table thead th.descending::after {
|
|
28
|
+
content: '\E9EB';
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
.ui.table tr > th:first-child {
|
|
23
32
|
border-left: none;
|
|
24
33
|
}
|