@eeacms/volto-eea-design-system 1.0.6 → 1.0.7

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 (46) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/package.json +1 -1
  3. package/src/ui/Breadcrumbs/Breadcrumb.stories.jsx +6 -34
  4. package/src/ui/Breadcrumbs/Breadcrumbs.jsx +24 -24
  5. package/src/ui/Card/Card.stories.jsx +6 -2
  6. package/src/ui/Comment/Comment.stories.js +25 -19
  7. package/src/ui/ContextNavigation/ContextNavigation.stories.jsx +18 -4
  8. package/src/ui/DownloadLabeledIcon/DownloadLabeledIcon.stories.jsx +3 -2
  9. package/src/ui/Form/Button/Button.stories.jsx +1 -1
  10. package/src/ui/Header/Header.jsx +13 -3
  11. package/src/ui/Header/Header.stories.js +112 -210
  12. package/src/ui/Header/HeaderMenuPopUp.js +50 -55
  13. package/src/ui/InpageNavigation/InpageNavigation.jsx +4 -4
  14. package/src/ui/InpageNavigation/InpageNavigation.stories.jsx +5 -4
  15. package/src/ui/Label/Label.stories.js +3 -1
  16. package/src/ui/LabeledIconGroup/LabeledIconGroup.jsx +5 -4
  17. package/src/ui/LanguageLabeledIcon/LanguageLabeledIcon.stories.jsx +3 -2
  18. package/src/ui/Modal/Modal.stories.js +9 -2
  19. package/src/ui/NewTabLabeledIcon/NewTabLabeledIcon.jsx +9 -3
  20. package/src/ui/Tag/Tag.stories.jsx +1 -1
  21. package/theme/themes/eea/assets/logo/eionet.svg +80 -11
  22. package/theme/themes/eea/collections/breadcrumb.overrides +11 -0
  23. package/theme/themes/eea/elements/button.overrides +26 -7
  24. package/theme/themes/eea/elements/button.variables +1 -0
  25. package/theme/themes/eea/elements/label.overrides +12 -8
  26. package/theme/themes/eea/extras/contextNavigation.less +4 -2
  27. package/theme/themes/eea/extras/contextNavigation.variables +1 -1
  28. package/theme/themes/eea/extras/downloadLabeledIcon.less +31 -22
  29. package/theme/themes/eea/extras/downloadLabeledIcon.variables +16 -14
  30. package/theme/themes/eea/extras/header.less +8 -0
  31. package/theme/themes/eea/extras/header.variables +4 -1
  32. package/theme/themes/eea/extras/inpageNavigation.less +2 -0
  33. package/theme/themes/eea/extras/inpageNavigation.variables +2 -0
  34. package/theme/themes/eea/extras/labeledIconGroup.variables +3 -3
  35. package/theme/themes/eea/extras/languageLabeledIcon.less +28 -20
  36. package/theme/themes/eea/extras/languageLabeledIcon.variables +18 -16
  37. package/theme/themes/eea/extras/newTabLabeledIcon.less +21 -15
  38. package/theme/themes/eea/extras/newTabLabeledIcon.variables +7 -5
  39. package/theme/themes/eea/globals/site.overrides +4 -1
  40. package/theme/themes/eea/modules/checkbox.overrides +6 -0
  41. package/theme/themes/eea/modules/checkbox.variables +3 -3
  42. package/theme/themes/eea/modules/modal.overrides +13 -0
  43. package/theme/themes/eea/modules/modal.variables +5 -1
  44. package/theme/themes/eea/views/card.overrides +9 -0
  45. package/theme/themes/eea/views/card.variables +6 -2
  46. package/theme/themes/eea/views/item.overrides +2 -2
package/CHANGELOG.md CHANGED
@@ -4,10 +4,69 @@ 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
+ ### [1.0.7](https://github.com/eea/volto-eea-design-system/compare/1.0.6...1.0.7) - 10 April 2023
8
+
9
+ #### :rocket: New Features
10
+
11
+ - feat(storybook): components keyboard and screen reader optimization #324 from eea/design-system-accessibility [ichim-david - [`85faff7`](https://github.com/eea/volto-eea-design-system/commit/85faff73025442a012f079b6734ef868862cc44f)]
12
+
13
+ #### :bug: Bug Fixes
14
+
15
+ - fix(cards): focus outline for header needed for the overflow hidden solution with max title lines [David Ichim - [`849a7a8`](https://github.com/eea/volto-eea-design-system/commit/849a7a8e3cf801bf0a4d7e9189b603ea15219fcc)]
16
+ - fix(header): external url in header now takes you to the correct url #330 from eea/header-external-url-fix [ichim-david - [`086c61d`](https://github.com/eea/volto-eea-design-system/commit/086c61d683a7ac67dea221aa39ffe4cef05a9a68)]
17
+ - fix(item): flex variant on edit when inside blockchooser #333 from eea/fix-item-csss [ichim-david - [`65b9099`](https://github.com/eea/volto-eea-design-system/commit/65b9099779180feeb7d10384928bb0a3224b947d)]
18
+ - fix(item): use child selector instead of descendent as it interferes with blockchooser refs #157040 [nileshgulia1 - [`ad4ca37`](https://github.com/eea/volto-eea-design-system/commit/ad4ca3725c595c8dbeaff69f730928313c1779ec)]
19
+ - fix: github autoformat [andreiggr - [`be97749`](https://github.com/eea/volto-eea-design-system/commit/be9774981032759b3284a6fb93490a204a817c7a)]
20
+ - fix: dont run isInternalURL twice [Andrei Grigore - [`a48984e`](https://github.com/eea/volto-eea-design-system/commit/a48984e0cb224944aed3846447c416511d080779)]
21
+ - fix: check if client method change [andreiggr - [`7c53b83`](https://github.com/eea/volto-eea-design-system/commit/7c53b83a54e4e7d3c5329c46de03cdf7aabedf13)]
22
+ - fix: external url in header [andreiggr - [`9e3aea6`](https://github.com/eea/volto-eea-design-system/commit/9e3aea649ca6f9446324d5d351cdfcde08332f84)]
23
+ - fix(tag): fix in args [Antonis Tarantilis - [`18eaaf4`](https://github.com/eea/volto-eea-design-system/commit/18eaaf41fa80a3e175341a2ddd7376b8281fee7d)]
24
+
25
+ #### :nail_care: Enhancements
26
+
27
+ - change(card): simplified headerLineHeightOffset used as margin top for cards header [David Ichim - [`ca61105`](https://github.com/eea/volto-eea-design-system/commit/ca61105f2f39e6880ce545ba4d54f3568e7b87e2)]
28
+ - change(storybook): removed links for Label and Comment that we implement without a link [David Ichim - [`ee0bfdf`](https://github.com/eea/volto-eea-design-system/commit/ee0bfdf3aee3e4b6b6eba6dabd7817a37ace48ae)]
29
+ - change(logos): updated eionet logo used in the site footer #318 from eea/footer-logo-update [ichim-david - [`70671d0`](https://github.com/eea/volto-eea-design-system/commit/70671d03bbc228e3013e382cb51e6764a83b01a8)]
30
+ - refactor(label): add href attribute to links [Antonis Tarantilis - [`05f664d`](https://github.com/eea/volto-eea-design-system/commit/05f664dde27f1e0580ab7f32a7934e4d8e85c918)]
31
+ - change(breadcrumbs,mega-menu): better screen readers support, see links instead of groups #309 from eea/firefox-accessibility-tab-issues [ichim-david - [`d6b0b4a`](https://github.com/eea/volto-eea-design-system/commit/d6b0b4adba8f04799491025fb41ac97e875bcce0)]
32
+ - change(mega-menu): added code to align countries left column subtitle with the right column [David Ichim - [`1aa33dd`](https://github.com/eea/volto-eea-design-system/commit/1aa33dd7ac7154a91515eef688f276d664d5d7f3)]
33
+ - change(mega-menu): sub-title padding tweaks for better spacing normalization [David Ichim - [`e08668d`](https://github.com/eea/volto-eea-design-system/commit/e08668dd9fd948e57628e5582e7a4a7f08d96451)]
34
+ - change(breadcrumbs): fixed sizing of breadcrumbs list items [David Ichim - [`1761e98`](https://github.com/eea/volto-eea-design-system/commit/1761e984a6ffebbcca0c7b88128a01235fc6b903)]
35
+ - change(inpageNavigation): story improvements [Antonis Tarantilis - [`ade63c6`](https://github.com/eea/volto-eea-design-system/commit/ade63c6f0b08c62318d31c54568cca29d0f106bc)]
36
+ - refactor(inpageNavigation): restructure as a button [Antonis Tarantilis - [`48e22ac`](https://github.com/eea/volto-eea-design-system/commit/48e22ac0ee521f87497822a0ec9d627829d849d5)]
37
+ - change(breadcrumbs): label modification for better screen reader output [David Ichim - [`c967bef`](https://github.com/eea/volto-eea-design-system/commit/c967bef63ac6f622f5936235dd5590831a674d15)]
38
+ - change(checkbox): toggle hover color correction [Antonis Tarantilis - [`4f4d0df`](https://github.com/eea/volto-eea-design-system/commit/4f4d0df7292fdccb89f83feface51639bd5d6559)]
39
+ - refactor(checkbox): accessibility fix [Antonis Tarantilis - [`3b3047f`](https://github.com/eea/volto-eea-design-system/commit/3b3047f6a6bdd9e9ad858e6a7ca0c6f6b404e605)]
40
+ - refactor(newTabLabeledIcon): accessibility fix [Antonis Tarantilis - [`211e40a`](https://github.com/eea/volto-eea-design-system/commit/211e40aa47d1f0de91b1d949770c452336b80248)]
41
+ - refactor(languageLabeledIcon): accessibility fix [Antonis Tarantilis - [`61edd9e`](https://github.com/eea/volto-eea-design-system/commit/61edd9e1022a8954930db30c262290680974d880)]
42
+ - refactor(downloadLabeledIcon): accessibility fix [Antonis Tarantilis - [`df3935d`](https://github.com/eea/volto-eea-design-system/commit/df3935dc5836298768316399ba36927325541fef)]
43
+ - refactor(labeledIconGroup): group updates for all labeled icons [Antonis Tarantilis - [`a679d9d`](https://github.com/eea/volto-eea-design-system/commit/a679d9d05b804f516fdeed449eba1e74e227818c)]
44
+ - change(ContextNavigation): accessibility updates, not restructuring of the volto component [Antonis Tarantilis - [`03fe83d`](https://github.com/eea/volto-eea-design-system/commit/03fe83dce70c6931c543b93c71e3cd8e16f99ec8)]
45
+ - refactor(comment): accessibility fixes and text button update [Antonis Tarantilis - [`dad8cb6`](https://github.com/eea/volto-eea-design-system/commit/dad8cb67a0092b01b50197c94691ed8a5d00a128)]
46
+ - change(card): add links to teaser titles [Antonis Tarantilis - [`cc64c74`](https://github.com/eea/volto-eea-design-system/commit/cc64c74a69539af287f424abdf96226635284303)]
47
+ - refactor(card): fix header outline not showing issue [Antonis Tarantilis - [`48fc2e2`](https://github.com/eea/volto-eea-design-system/commit/48fc2e2328ff184402e15edbaf1ed2507e771a14)]
48
+ - refactor(modal): restructure close icon as button [Antonis Tarantilis - [`f1b836e`](https://github.com/eea/volto-eea-design-system/commit/f1b836e3071c220235eb327ee7ef67edac4d467d)]
49
+ - change(logo): update eionet svg [Antonis Tarantilis - [`3c87fc7`](https://github.com/eea/volto-eea-design-system/commit/3c87fc750a3dc376205a643eefced410a41b22c6)]
50
+ - refactor(megaMenu): clean up function after test [Antonis Tarantilis - [`883eb73`](https://github.com/eea/volto-eea-design-system/commit/883eb73cbc3db6a1fadd0200118eafdce91b7aab)]
51
+ - refactor(megaMenu): align menu items with demo site for better testing [Antonis Tarantilis - [`82a5c84`](https://github.com/eea/volto-eea-design-system/commit/82a5c84cfde81dd8243f3f9a2d1fcaa8ac4b1463)]
52
+ - refactor(breadcrumbs): updates on structure and story for accessibility [Antonis Tarantilis - [`770c8c0`](https://github.com/eea/volto-eea-design-system/commit/770c8c0bce88c5d9301ab0293a8e4865849bfeb2)]
53
+ - refactor(megaMenu): Restructure Topics and Countries lists [Antonis Tarantilis - [`d816e7a`](https://github.com/eea/volto-eea-design-system/commit/d816e7ab9cdf2f202ab994201c16241cfb26c33a)]
54
+ - change(mega-menu): use lists for navigation, enhance voice over support for better accessibility [David Ichim - [`d13137f`](https://github.com/eea/volto-eea-design-system/commit/d13137f024d6357514b85f184d219eb81dd585f2)]
55
+ - refactor(header): firefox accessibility errors fix [Antonis Tarantilis - [`c7d35b9`](https://github.com/eea/volto-eea-design-system/commit/c7d35b92b90940b466ea016dbbb3f1c6dfa0c3ab)]
56
+
57
+ #### :house: Internal changes
58
+
59
+ - style(megaMenu): remove comments and unused properties [Antonis Tarantilis - [`fa5f8f8`](https://github.com/eea/volto-eea-design-system/commit/fa5f8f878421d879026aacd86e5390112b8852a1)]
60
+
61
+ #### :house: Documentation changes
62
+
63
+ - docs(footer): logo update [Manthos Matzios - [`ad982d6`](https://github.com/eea/volto-eea-design-system/commit/ad982d63423442bc292cd7553ad3163b33b337bb)]
64
+
7
65
  ### [1.0.6](https://github.com/eea/volto-eea-design-system/compare/1.0.5...1.0.6) - 29 March 2023
8
66
 
9
67
  #### :rocket: New Features
10
68
 
69
+ - feat: add viewport-(width/height) less functions and fixed banner image url #329 from eea/develop [ichim-david - [`e8e70bd`](https://github.com/eea/volto-eea-design-system/commit/e8e70bdc81f4f301a9dce370867a873e55563048)]
11
70
  - feat: add viewport-(width/height) less functions [Miu Razvan - [`68300a3`](https://github.com/eea/volto-eea-design-system/commit/68300a3c34e66954c7ef3a6e52baa37431fbfa9e)]
12
71
 
13
72
  #### :nail_care: Enhancements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-eea-design-system",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "@eeacms/volto-eea-design-system: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { Breadcrumb, Container, Icon, Image } from 'semantic-ui-react';
3
- import homeSVG from '@eeacms/volto-eea-design-system/../theme/themes/eea/assets/images/home-icon.svg';
4
- import { Link } from 'react-router-dom';
2
+ import { Breadcrumb } from 'semantic-ui-react';
3
+ import { BreadcrumbsComponent } from './Breadcrumbs';
5
4
 
6
5
  export default {
7
6
  title: 'Components/Breadcrumb',
@@ -37,43 +36,16 @@ export default {
37
36
  },
38
37
  };
39
38
 
40
- //const Template = (args) => <Breadcrumb {...args}></Breadcrumb>;
41
-
42
39
  const Template = (args) => (
43
- <Container>
44
- <Breadcrumb size="tiny">
45
- <Breadcrumb.Section key="home" href={args.root}>
46
- <Image src={homeSVG} alt="home" />
47
- </Breadcrumb.Section>
48
- <Breadcrumb.Divider>
49
- <Icon className="ri-arrow-right-s-line"></Icon>
50
- </Breadcrumb.Divider>
51
- {args.sections.map((section, index, sections) => [
52
- index !== 0 && (
53
- <Breadcrumb.Divider key={index}>
54
- <Icon className="ri-arrow-right-s-line"></Icon>
55
- </Breadcrumb.Divider>
56
- ),
57
- index < sections.length - 1 ? (
58
- <Link key={section.href} to={section.href} className="section">
59
- {section.content}{' '}
60
- </Link>
61
- ) : (
62
- <Breadcrumb.Section key={section.key} active>
63
- {section.content}{' '}
64
- </Breadcrumb.Section>
65
- ),
66
- ])}
67
- </Breadcrumb>
68
- </Container>
40
+ <BreadcrumbsComponent root={args.root} sections={args.sections} />
69
41
  );
70
42
 
71
43
  export const Default = Template.bind({});
72
44
  Default.args = {
73
45
  root: 'https://www.eea.europa.eu/',
74
46
  sections: [
75
- { key: 'Section 1', content: 'Section 1', href: '/#' },
76
- { key: 'Section 2', content: 'Section 2', href: '/#' },
77
- { key: 'Section 3', content: 'Section 3', href: '/#' },
47
+ { key: 'Section 1', title: 'Section 1', href: '/#' },
48
+ { key: 'Section 2', title: 'Section 2', href: '/#' },
49
+ { key: 'Section 3', title: 'Section 3', href: '/#' },
78
50
  ],
79
51
  };
@@ -17,32 +17,32 @@ const Breadcrumbs = ({
17
17
  size = 'tiny',
18
18
  }) => {
19
19
  return sections.length > 0 ? (
20
- <Segment
21
- role="navigation"
22
- aria-label={'breadcrumbs'}
23
- className="breadcrumbs"
24
- attached
25
- vertical
26
- >
20
+ <Segment className="breadcrumbs" attached vertical>
27
21
  <Container>
28
- <Breadcrumb size={size}>
29
- <Link to={root || '/'} className="section" title={'Home'}>
30
- <Image src={homeIcon} alt="home" />
31
- </Link>
32
- {sections.map((item, index, items) => [
33
- <Breadcrumb.Divider key={`divider-${item.href}`}>
34
- <Icon className={icon}></Icon>
35
- </Breadcrumb.Divider>,
36
- index < items.length - 1 ? (
37
- <Link key={item.key} to={item.href} className="section">
38
- {item.title}
22
+ <Breadcrumb size={size} as="nav" aria-label={'Breadcrumbs'}>
23
+ <ol aria-label="Breadcrumbs navigation">
24
+ <li>
25
+ <Link to={root || '/'} className="section" title={'Home'}>
26
+ <Image src={homeIcon} alt="" />
39
27
  </Link>
40
- ) : (
41
- <Breadcrumb.Section key={item.key} active>
42
- {item.title}
43
- </Breadcrumb.Section>
44
- ),
45
- ])}
28
+ </li>
29
+ {sections.map((item, index, items) => [
30
+ <li key={index}>
31
+ <Breadcrumb.Divider key={`divider-${item.href}`}>
32
+ <Icon className={icon}></Icon>
33
+ </Breadcrumb.Divider>
34
+ {index < items.length - 1 ? (
35
+ <Link key={item.key} to={item.href} className="section">
36
+ {item.title}
37
+ </Link>
38
+ ) : (
39
+ <Breadcrumb.Section key={item.key} active>
40
+ {item.title}
41
+ </Breadcrumb.Section>
42
+ )}
43
+ </li>,
44
+ ])}
45
+ </ol>
46
46
  </Breadcrumb>
47
47
  </Container>
48
48
  </Segment>
@@ -86,7 +86,9 @@ const CardTemplate = ({ variant, inverted, titleOnImage, card }) => (
86
86
 
87
87
  {/* Title */}
88
88
  {!titleOnImage || !card.hasImage ? (
89
- <Card.Header>{card.title}</Card.Header>
89
+ <Card.Header>
90
+ <a href={card.href}>{card.title}</a>
91
+ </Card.Header>
90
92
  ) : (
91
93
  ''
92
94
  )}
@@ -488,7 +490,9 @@ const TeaserCard = ({ variant, inverted, titleOnImage, card }) => (
488
490
 
489
491
  {!titleOnImage && (
490
492
  <div className="content">
491
- <div className="header">{card.title}</div>
493
+ <div className="header">
494
+ <a href={card.href}>{card.title}</a>
495
+ </div>
492
496
  <Card.Description>{card.description}</Card.Description>
493
497
  </div>
494
498
  )}
@@ -45,32 +45,38 @@ function CommentEEA({ title, comments, threaded, minimal, size }) {
45
45
  <Comment key={comIndex}>
46
46
  <Comment.Avatar src={comment.src} alt="user avatar" />
47
47
  <Comment.Content>
48
- <Comment.Author as="a">{comment.author}</Comment.Author>
48
+ <Comment.Author>{comment.author}</Comment.Author>
49
49
  <Comment.Metadata>
50
50
  <div>{comment.time}</div>
51
51
  </Comment.Metadata>
52
52
  <Comment.Text>{comment.text}</Comment.Text>
53
53
  <Comment.Actions>
54
- <Comment.Action>Reply</Comment.Action>
54
+ <Comment.Action as="button" className="ui button text">
55
+ Reply
56
+ </Comment.Action>
55
57
  </Comment.Actions>
56
58
  </Comment.Content>
57
- <Comment.Group>
58
- {comment.replies.map((reply, repIndex) => (
59
- <Comment key={repIndex}>
60
- <Comment.Avatar src={comment.src} alt="user avatar" />
61
- <Comment.Content>
62
- <Comment.Author as="a">{reply.author}</Comment.Author>
63
- <Comment.Metadata>
64
- <div>{reply.time}</div>
65
- </Comment.Metadata>
66
- <Comment.Text>{reply.text}</Comment.Text>
67
- <Comment.Actions>
68
- <Comment.Action>Reply</Comment.Action>
69
- </Comment.Actions>
70
- </Comment.Content>
71
- </Comment>
72
- ))}
73
- </Comment.Group>
59
+ {comment.replies.length > 0 && (
60
+ <Comment.Group>
61
+ {comment.replies.map((reply, repIndex) => (
62
+ <Comment key={repIndex}>
63
+ <Comment.Avatar src={comment.src} alt="user avatar" />
64
+ <Comment.Content>
65
+ <Comment.Author>{reply.author}</Comment.Author>
66
+ <Comment.Metadata>
67
+ <div>{reply.time}</div>
68
+ </Comment.Metadata>
69
+ <Comment.Text>{reply.text}</Comment.Text>
70
+ <Comment.Actions>
71
+ <Comment.Action as="button" className="ui button text">
72
+ Reply
73
+ </Comment.Action>
74
+ </Comment.Actions>
75
+ </Comment.Content>
76
+ </Comment>
77
+ ))}
78
+ </Comment.Group>
79
+ )}
74
80
  </Comment>
75
81
  ))}
76
82
  </Comment.Group>
@@ -125,14 +125,15 @@ function Template({ ...args }) {
125
125
  return (
126
126
  <Container>
127
127
  <nav className="context-navigation">
128
- <div className="context-navigation-header">
128
+ <div className="context-navigation-header" id="Navigation">
129
129
  {args?.header ? <a href="/#">{args?.header}</a> : 'Navigation'}
130
130
  </div>
131
- <div role="list" className="ui list">
131
+ <div role="list" className="ui list" aria-labelledby="Navigation">
132
132
  {args.sidenavItems &&
133
133
  args.sidenavItems.map((element, index) => {
134
134
  return (
135
135
  <div
136
+ key={index}
136
137
  role="listitem"
137
138
  className={
138
139
  (element.is_current ? 'active ' : '') +
@@ -142,6 +143,7 @@ function Template({ ...args }) {
142
143
  >
143
144
  <div className="content">
144
145
  <a
146
+ id={element['@id']}
145
147
  title={element.title}
146
148
  className={
147
149
  element?.items?.length > 0
@@ -155,7 +157,12 @@ function Template({ ...args }) {
155
157
  {element?.items?.length > 0
156
158
  ? element.items.map((subelement, index) => {
157
159
  return (
158
- <div className="list" role="list">
160
+ <div
161
+ className="list"
162
+ role="list"
163
+ key={index}
164
+ aria-labelledby={element['@id']}
165
+ >
159
166
  <div
160
167
  role="listitem"
161
168
  className={
@@ -166,6 +173,7 @@ function Template({ ...args }) {
166
173
  >
167
174
  <div className="content">
168
175
  <a
176
+ id={subelement['@id']}
169
177
  title={subelement.title}
170
178
  className="contenttype-document"
171
179
  href={subelement.url}
@@ -176,7 +184,12 @@ function Template({ ...args }) {
176
184
  subelement.items.map(
177
185
  (subparelement, index) => {
178
186
  return (
179
- <div className="list" role="list">
187
+ <div
188
+ className="list"
189
+ role="list"
190
+ key={index}
191
+ aria-labelledby={subelement['@id']}
192
+ >
180
193
  <div
181
194
  role="listitem"
182
195
  className={
@@ -187,6 +200,7 @@ function Template({ ...args }) {
187
200
  >
188
201
  <div className="content">
189
202
  <a
203
+ id={subparelement['@id']}
190
204
  title={subparelement.title}
191
205
  className="contenttype-document"
192
206
  href={subparelement.url}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { Button } from 'semantic-ui-react';
2
3
  import DownloadLabeledIcon from './DownloadLabeledIcon';
3
4
  import LabeledIconGroup from '../LabeledIconGroup/LabeledIconGroup';
4
5
 
@@ -42,12 +43,12 @@ const DefaultTemplate = (args) => (
42
43
  <DownloadLabeledIcon
43
44
  {...args}
44
45
  trigger={
45
- <div>
46
+ <Button className="text">
46
47
  <DownloadLabeledIcon.Icon {...args}>
47
48
  {args.icon}
48
49
  </DownloadLabeledIcon.Icon>
49
50
  <DownloadLabeledIcon.Label>{args.label}</DownloadLabeledIcon.Label>
50
- </div>
51
+ </Button>
51
52
  }
52
53
  >
53
54
  <DownloadLabeledIcon.Dropdown {...args}></DownloadLabeledIcon.Dropdown>
@@ -189,7 +189,7 @@ Labeled.argTypes = {
189
189
  export const Text = (args) => {
190
190
  return (
191
191
  <Container>
192
- <Button as="p" disabled={args.disabled}>
192
+ <Button className="text" disabled={args.disabled}>
193
193
  {args.label}
194
194
  </Button>
195
195
  </Container>
@@ -16,6 +16,8 @@ import HeaderSearchPopUp from './HeaderSearchPopUp';
16
16
  import HeaderMenuPopUp from './HeaderMenuPopUp';
17
17
  import PropTypes from 'prop-types';
18
18
 
19
+ import { isInternalURL } from '@plone/volto/helpers';
20
+
19
21
  Header.propTypes = {
20
22
  transparency: PropTypes.bool,
21
23
  inverted: PropTypes.bool,
@@ -143,6 +145,9 @@ const Main = ({
143
145
  const [searchIsActive, setSearchIsActive] = React.useState(false);
144
146
  const [burger, setBurger] = React.useState('');
145
147
  const searchInputRef = React.useRef(null);
148
+ const [isClient, setIsClient] = React.useState();
149
+
150
+ React.useEffect(() => setIsClient(true), []);
146
151
 
147
152
  React.useEffect(() => {
148
153
  setMenuIsActive(false);
@@ -203,7 +208,11 @@ const Main = ({
203
208
  if (item.items.length) {
204
209
  setMenuIsActive(true);
205
210
  } else {
206
- history.push(item.url);
211
+ if (isInternalURL(item.url)) {
212
+ history.push(item.url);
213
+ } else if (isClient) {
214
+ window.location.replace(item.url);
215
+ }
207
216
  }
208
217
  };
209
218
 
@@ -266,7 +275,7 @@ const Main = ({
266
275
  <Grid.Column mobile={4} tablet={4} computer={8}>
267
276
  <div className={inverted ? 'main-menu inverted' : 'main-menu'}>
268
277
  {menuItems && (
269
- <div
278
+ <ul
270
279
  className="ui text eea-main-menu tablet or lower hidden menu"
271
280
  ref={desktopMenuRef}
272
281
  id={'navigation'}
@@ -275,6 +284,7 @@ const Main = ({
275
284
  <Menu.Item
276
285
  name={item['@id'] || item.url}
277
286
  key={item['@id'] || item.url}
287
+ as={'li'}
278
288
  active={
279
289
  activeItem.indexOf(item['@id']) !== -1 ||
280
290
  activeItem.indexOf(item.url) !== -1
@@ -285,7 +295,7 @@ const Main = ({
285
295
  })}
286
296
  </Menu.Item>
287
297
  ))}
288
- </div>
298
+ </ul>
289
299
  )}
290
300
  {!hideSearch && (
291
301
  <button