@eeacms/volto-eea-website-theme 4.3.6 → 4.3.8

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/CHANGELOG.md CHANGED
@@ -4,7 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- ### [4.3.6](https://github.com/eea/volto-eea-website-theme/compare/4.3.5...4.3.6) - 3 June 2026
7
+ ### [4.3.8](https://github.com/eea/volto-eea-website-theme/compare/4.3.7...4.3.8) - 9 June 2026
8
+
9
+ #### :bug: Bug Fixes
10
+
11
+ - fix: Header images unsized CLS - refs #304010 [dobri1408 - [`7074063`](https://github.com/eea/volto-eea-website-theme/commit/7074063622e187e201d9cb36b2000b29387ec0dd)]
12
+
13
+ ### [4.3.7](https://github.com/eea/volto-eea-website-theme/compare/4.3.6...4.3.7) - 6 June 2026
14
+
15
+ #### :bug: Bug Fixes
16
+
17
+ - fix: accordion in view for gone pages - refs #304005 [Teodor Voicu - [`8b4adf9`](https://github.com/eea/volto-eea-website-theme/commit/8b4adf991b65a9e106603b04f386737611da0e0b)]
18
+ - fix: Print styles - refs #271000 [Teodor Voicu - [`1759cb2`](https://github.com/eea/volto-eea-website-theme/commit/1759cb2bfd91af6c173edf9d94f29d5a78f5cdf9)]
19
+
20
+ ### [4.3.6](https://github.com/eea/volto-eea-website-theme/compare/4.3.5...4.3.6) - 4 June 2026
8
21
 
9
22
  #### :bug: Bug Fixes
10
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-website-theme",
3
- "version": "4.3.6",
3
+ "version": "4.3.8",
4
4
  "description": "@eeacms/volto-eea-website-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -76,6 +76,7 @@ const GoneView = () => {
76
76
  aria-expanded={activeIndex === 0}
77
77
  onKeyDown={(e) => {
78
78
  if (e.keyCode === 13 || e.keyCode === 32) {
79
+ e.preventDefault();
79
80
  handleAccordionClick(e, { index: 0 });
80
81
  }
81
82
  }}
@@ -128,6 +129,7 @@ const GoneView = () => {
128
129
  aria-expanded={activeIndex === 2}
129
130
  onKeyDown={(e) => {
130
131
  if (e.keyCode === 13 || e.keyCode === 32) {
132
+ e.preventDefault();
131
133
  handleAccordionClick(e, { index: 2 });
132
134
  }
133
135
  }}
@@ -45,6 +45,15 @@ describe('GoneView Component', () => {
45
45
  let history;
46
46
  let store;
47
47
 
48
+ const renderGoneView = () =>
49
+ render(
50
+ <Provider store={store}>
51
+ <Router history={history}>
52
+ <GoneView />
53
+ </Router>
54
+ </Provider>,
55
+ );
56
+
48
57
  beforeEach(() => {
49
58
  history = createMemoryHistory();
50
59
  store = mockStore({
@@ -135,13 +144,7 @@ describe('GoneView Component', () => {
135
144
  });
136
145
 
137
146
  it('opens first accordion when clicked', () => {
138
- render(
139
- <Provider store={store}>
140
- <Router history={history}>
141
- <GoneView />
142
- </Router>
143
- </Provider>,
144
- );
147
+ renderGoneView();
145
148
 
146
149
  const firstAccordion = screen.getByText('View archived version');
147
150
  fireEvent.click(firstAccordion);
@@ -150,13 +153,7 @@ describe('GoneView Component', () => {
150
153
  });
151
154
 
152
155
  it('opens second accordion when clicked', () => {
153
- render(
154
- <Provider store={store}>
155
- <Router history={history}>
156
- <GoneView />
157
- </Router>
158
- </Provider>,
159
- );
156
+ renderGoneView();
160
157
 
161
158
  const secondAccordion = screen.getByText('Looking for something specific?');
162
159
  fireEvent.click(secondAccordion);
@@ -214,4 +211,53 @@ describe('GoneView Component', () => {
214
211
  expect(searchLink.getAttribute('href')).toBe('/en/advanced-search');
215
212
  expect(homepageLink.getAttribute('href')).toBe('/en');
216
213
  });
214
+
215
+ it('updates aria-expanded when the accordion titles are clicked', () => {
216
+ renderGoneView();
217
+
218
+ const archiveTitle = screen.getByRole('button', {
219
+ name: 'View archived version',
220
+ });
221
+ const searchTitle = screen.getByRole('button', {
222
+ name: 'Looking for something specific?',
223
+ });
224
+
225
+ expect(archiveTitle.getAttribute('aria-expanded')).toBe('false');
226
+ expect(searchTitle.getAttribute('aria-expanded')).toBe('false');
227
+
228
+ fireEvent.click(archiveTitle);
229
+
230
+ expect(archiveTitle.getAttribute('aria-expanded')).toBe('true');
231
+ expect(searchTitle.getAttribute('aria-expanded')).toBe('false');
232
+
233
+ fireEvent.click(searchTitle);
234
+
235
+ expect(archiveTitle.getAttribute('aria-expanded')).toBe('false');
236
+ expect(searchTitle.getAttribute('aria-expanded')).toBe('true');
237
+ });
238
+
239
+ it('toggles accordion titles with Enter and Space', () => {
240
+ renderGoneView();
241
+
242
+ const archiveTitle = screen.getByRole('button', {
243
+ name: 'View archived version',
244
+ });
245
+ const searchTitle = screen.getByRole('button', {
246
+ name: 'Looking for something specific?',
247
+ });
248
+
249
+ fireEvent.keyDown(archiveTitle, { keyCode: 13 });
250
+
251
+ expect(archiveTitle.getAttribute('aria-expanded')).toBe('true');
252
+ expect(screen.getByText('Wayback Machine')).toBeTruthy();
253
+
254
+ fireEvent.keyDown(archiveTitle, { keyCode: 32 });
255
+
256
+ expect(archiveTitle.getAttribute('aria-expanded')).toBe('false');
257
+
258
+ fireEvent.keyDown(searchTitle, { keyCode: 32 });
259
+
260
+ expect(searchTitle.getAttribute('aria-expanded')).toBe('true');
261
+ expect(screen.getByText('search')).toBeTruthy();
262
+ });
217
263
  });
@@ -224,7 +224,13 @@ const EEAHeader = ({ pathname, token, items, history, navroot, subsite }) => {
224
224
  <Header menuItems={items}>
225
225
  <Header.TopHeader>
226
226
  <Header.TopItem className="official-union">
227
- <Image src={eeaFlag} alt="European Union flag"></Image>
227
+ <Image
228
+ src={eeaFlag}
229
+ alt="European Union flag"
230
+ width={34}
231
+ height={24}
232
+ style={{ aspectRatio: '34 / 24' }}
233
+ ></Image>
228
234
  <Header.TopDropdownMenu
229
235
  text="An official website of the European Union | How do you know?"
230
236
  tabletText="EEA information systems"
@@ -314,6 +320,16 @@ const EEAHeader = ({ pathname, token, items, history, navroot, subsite }) => {
314
320
  <Image
315
321
  src={subsite.subsite_logo.scales.mini.download}
316
322
  alt={subsite.title}
323
+ width={subsite.subsite_logo.scales.mini.width || 80}
324
+ height={subsite.subsite_logo.scales.mini.height || 80}
325
+ style={
326
+ (subsite.subsite_logo.scales.mini.width || 80) &&
327
+ (subsite.subsite_logo.scales.mini.height || 80)
328
+ ? {
329
+ aspectRatio: `${subsite.subsite_logo.scales.mini.width || 80} / ${subsite.subsite_logo.scales.mini.height || 80}`,
330
+ }
331
+ : undefined
332
+ }
317
333
  />
318
334
  ) : (
319
335
  subsite.title
@@ -180,6 +180,8 @@ describe('Header', () => {
180
180
  mini: {
181
181
  download:
182
182
  'http://localhost:8080/Plone/subsite_logo/@@images/image/mini',
183
+ width: 80,
184
+ height: 80,
183
185
  },
184
186
  },
185
187
  },
@@ -51,7 +51,15 @@ const LanguageSwitcher = ({ width, history }) => {
51
51
  className="item"
52
52
  text={`${language.toUpperCase()}`}
53
53
  mobileText={`${language.toUpperCase()}`}
54
- icon={<Image src={globeIcon} alt="language dropdown globe icon"></Image>}
54
+ icon={
55
+ <Image
56
+ src={globeIcon}
57
+ alt="language dropdown globe icon"
58
+ width={24}
59
+ height={24}
60
+ style={{ aspectRatio: '24 / 24' }}
61
+ />
62
+ }
55
63
  viewportWidth={width}
56
64
  >
57
65
  <ul
@@ -168,6 +168,7 @@ class Html extends Component {
168
168
  criticalCss ? (
169
169
  <>
170
170
  <script
171
+ nonce={nonce}
171
172
  dangerouslySetInnerHTML={{
172
173
  __html: CRITICAL_CSS_TEMPLATE,
173
174
  }}
@@ -255,6 +255,9 @@ export const setupPrintView = (dispatch) => {
255
255
  window.print();
256
256
  } catch (error) {
257
257
  // Still try to print even if there was an error
258
+ Array.from(tabs).forEach((tab) => {
259
+ tab.style.display = '';
260
+ });
258
261
  dispatch(setPrintLoading(false));
259
262
  dispatch(setIsPrint(false));
260
263
  window.print();