design-comuni-plone-theme 11.26.4 → 11.27.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.
Files changed (85) hide show
  1. package/.yarn/cache/{volto-venue-npm-4.1.0-481d5ba425-64ca36bc93.zip → volto-venue-npm-4.1.1-d5be247928-f796d519ad.zip} +0 -0
  2. package/.yarn/install-state.gz +0 -0
  3. package/CHANGELOG.md +53 -0
  4. package/RELEASE.md +38 -0
  5. package/locales/de/LC_MESSAGES/volto.po +102 -7
  6. package/locales/en/LC_MESSAGES/volto.po +104 -9
  7. package/locales/es/LC_MESSAGES/volto.po +102 -7
  8. package/locales/fr/LC_MESSAGES/volto.po +102 -7
  9. package/locales/it/LC_MESSAGES/volto.po +103 -8
  10. package/locales/volto.pot +103 -8
  11. package/package.json +2 -2
  12. package/publiccode.yml +2 -2
  13. package/src/components/ImageWithErrors/ImageWithErrors.jsx +0 -1
  14. package/src/components/ItaliaTheme/Blocks/Accordion/Block/ViewBlock.jsx +1 -0
  15. package/src/components/ItaliaTheme/Blocks/Listing/AttachmentCardTemplate.jsx +13 -10
  16. package/src/components/ItaliaTheme/Blocks/Listing/CardWithImage/CardWithImageDefault.jsx +7 -7
  17. package/src/components/ItaliaTheme/Blocks/Listing/CardWithSlideUpTextTemplate.jsx +23 -14
  18. package/src/components/ItaliaTheme/Blocks/Listing/Commons/ListingImage.jsx +51 -16
  19. package/src/components/ItaliaTheme/Blocks/Listing/CompleteBlockLinksTemplate.jsx +15 -10
  20. package/src/components/ItaliaTheme/Blocks/Listing/ContentInEvidenceTemplate.jsx +11 -9
  21. package/src/components/ItaliaTheme/Blocks/Listing/GridGalleryTemplate.jsx +4 -3
  22. package/src/components/ItaliaTheme/Blocks/Listing/InEvidenceTemplate.jsx +8 -8
  23. package/src/components/ItaliaTheme/Blocks/Listing/PhotogalleryTemplate.jsx +7 -6
  24. package/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +9 -6
  25. package/src/components/ItaliaTheme/Blocks/Listing/SmallBlockLinksTemplate.jsx +19 -23
  26. package/src/components/ItaliaTheme/Blocks/__tests__/Accordion.test.jsx +0 -3
  27. package/src/components/ItaliaTheme/Cards/CardPersona.jsx +5 -8
  28. package/src/components/ItaliaTheme/CustomerSatisfaction/FeedbackForm.jsx +9 -1
  29. package/src/components/ItaliaTheme/Header/HeaderSearch/HeaderSearch.jsx +9 -1
  30. package/src/components/ItaliaTheme/Header/HeaderSearch/SearchModal.jsx +10 -1
  31. package/src/components/ItaliaTheme/Header/HeaderSlim/HeaderSlim.jsx +15 -2
  32. package/src/components/ItaliaTheme/Header/HeaderSlim/TertiaryMenu.jsx +1 -1
  33. package/src/components/ItaliaTheme/Header/ParentSiteMenu.jsx +14 -1
  34. package/src/components/ItaliaTheme/SkipLinks/SkipLinks.jsx +9 -1
  35. package/src/components/ItaliaTheme/View/BandoView/BandoView.jsx +19 -1
  36. package/src/components/ItaliaTheme/View/Commons/GenericCard.jsx +14 -13
  37. package/src/components/ItaliaTheme/View/Commons/LocationItem.jsx +15 -9
  38. package/src/components/ItaliaTheme/View/Commons/OfficeCard.jsx +7 -3
  39. package/src/components/ItaliaTheme/View/Commons/PageHeader/PageHeader.jsx +3 -4
  40. package/src/components/ItaliaTheme/View/Commons/RelatedItemInEvidence/RelatedItemInEvidence.jsx +14 -1
  41. package/src/components/ItaliaTheme/View/Commons/RelatedItems.jsx +5 -1
  42. package/src/components/ItaliaTheme/View/Commons/SideMenu.jsx +10 -6
  43. package/src/components/ItaliaTheme/View/Commons/Sponsors.jsx +14 -10
  44. package/src/components/ItaliaTheme/View/Commons/VenuesSmall.jsx +13 -6
  45. package/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx +20 -1
  46. package/src/components/ItaliaTheme/View/EventoView/EventoContatti.jsx +8 -7
  47. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreEsterno.jsx +1 -12
  48. package/src/components/ItaliaTheme/View/EventoView/EventoContattiOrganizzatoreInterno.jsx +1 -12
  49. package/src/components/ItaliaTheme/View/EventoView/EventoOrganizzatoDa.jsx +38 -0
  50. package/src/components/ItaliaTheme/View/EventoView/EventoPatrocinatoDa.jsx +38 -0
  51. package/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx +0 -18
  52. package/src/components/ItaliaTheme/View/EventoView/EventoView.jsx +20 -1
  53. package/src/components/ItaliaTheme/View/FAQ/FaqFolder/SearchBar.jsx +2 -0
  54. package/src/components/ItaliaTheme/View/NewsItemView/NewsItemText.jsx +1 -0
  55. package/src/components/ItaliaTheme/View/NewsItemView/NewsItemView.jsx +19 -1
  56. package/src/components/ItaliaTheme/View/PaginaArgomentoView/PaginaArgomentoViewNoBlocks.jsx +14 -1
  57. package/src/components/ItaliaTheme/View/PersonaView/PersonaView.jsx +20 -1
  58. package/src/components/ItaliaTheme/View/ServizioView/ServizioView.jsx +19 -2
  59. package/src/components/ItaliaTheme/View/UOView/UOView.jsx +20 -1
  60. package/src/components/ItaliaTheme/View/VenueView/VenueView.jsx +24 -11
  61. package/src/components/SelectInput/SelectInput.jsx +10 -4
  62. package/src/components/TextInput.jsx +1 -0
  63. package/src/config/Blocks/ListingOptions/attachmentCardTemplate.js +1 -1
  64. package/src/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate.js +1 -6
  65. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +15 -11
  66. package/src/customizations/volto/components/manage/Widgets/RecurrenceWidget/RecurrenceWidget.jsx +5 -2
  67. package/src/customizations/volto/components/theme/Navigation/Navigation.jsx +16 -2
  68. package/src/customizations/volto/components/theme/View/ListingView.jsx +3 -3
  69. package/src/customizations/volto/helpers/FormValidation/FormValidation.js +8 -5
  70. package/src/customizations/volto-form-block/components/Field.jsx +7 -0
  71. package/src/customizations/volto-form-block/fieldSchema.js +345 -0
  72. package/src/helpers/images.js +25 -1
  73. package/src/helpers/index.js +4 -1
  74. package/src/overrideTranslations.jsx +4 -0
  75. package/src/theme/ItaliaTheme/Blocks/_cardWithImage.scss +5 -0
  76. package/src/theme/ItaliaTheme/Blocks/_cardWithSlideUpTextTemplate.scss +10 -0
  77. package/src/theme/ItaliaTheme/Blocks/_gridBlock.scss +9 -0
  78. package/src/theme/ItaliaTheme/Blocks/_search.scss +8 -2
  79. package/src/theme/ItaliaTheme/Components/_cardLocationItem.scss +12 -0
  80. package/src/theme/ItaliaTheme/Components/_cardPersona.scss +21 -1
  81. package/src/theme/ItaliaTheme/Widgets/_blocksWidget.scss +36 -0
  82. package/src/theme/ItaliaTheme/_ar.scss +3 -2
  83. package/src/theme/_cms-ui.scss +21 -0
  84. package/src/theme/bootstrap-override/_bootstrap-italia-site.scss +1 -0
  85. package/src/theme/bootstrap-override/bootstrap-italia/_avatar.scss +28 -0
@@ -69,17 +69,13 @@ const CardWithSlideUpTextTemplate = (props) => {
69
69
  }).component;
70
70
 
71
71
  return (
72
- <UniversalLink
73
- item={!isEditMode ? item : null}
74
- href={isEditMode ? '#' : null}
72
+ <div
73
+ className="listing-item box bg-img"
75
74
  style={
76
75
  image && {
77
76
  backgroundImage: `url(${image})`,
78
77
  }
79
78
  }
80
- className="listing-item box bg-img"
81
- key={index}
82
- data-element={id_lighthouse}
83
79
  >
84
80
  <div className="bg-gradient"></div>
85
81
  {(category || date) && (
@@ -89,14 +85,22 @@ const CardWithSlideUpTextTemplate = (props) => {
89
85
  {date}
90
86
  </div>
91
87
  )}
92
- <h3
93
- className={cx('title', {
94
- ellipsis: title.length > 50,
95
- })}
96
- title={title.length > 50 ? title : undefined}
88
+ <UniversalLink
89
+ item={!isEditMode ? item : null}
90
+ href={isEditMode ? '#' : null}
91
+ key={index}
92
+ data-element={id_lighthouse}
97
93
  >
98
- {title.substring(0, 50)}
99
- </h3>
94
+ <h3
95
+ className={cx('title', {
96
+ ellipsis: title.length > 50,
97
+ })}
98
+ title={title.length > 50 ? title : undefined}
99
+ >
100
+ {title.substring(0, 50)}
101
+ </h3>
102
+ </UniversalLink>
103
+
100
104
  <div className="box-slide-up">
101
105
  {show_description && item.description && (
102
106
  <p>{item.description}</p>
@@ -111,7 +115,12 @@ const CardWithSlideUpTextTemplate = (props) => {
111
115
  className="justify-content-end"
112
116
  />
113
117
  </div>
114
- </UniversalLink>
118
+ <UniversalLink
119
+ item={!isEditMode ? item : null}
120
+ className="card-link"
121
+ aria-hidden="true"
122
+ ></UniversalLink>
123
+ </div>
115
124
  );
116
125
  })}
117
126
  </div>
@@ -1,24 +1,62 @@
1
1
  import { UniversalLink } from '@plone/volto/components';
2
2
  import DefaultImageSVG from '@plone/volto/components/manage/Blocks/Listing/default-image.svg';
3
3
  import { flattenToAppURL } from '@plone/volto/helpers';
4
+ import { contentHasImage } from 'design-comuni-plone-theme/helpers';
4
5
  import config from '@plone/volto/registry';
5
6
 
7
+ const ListingImageWrapper = ({ children, item, noWrapLink }) => {
8
+ return noWrapLink ? (
9
+ children
10
+ ) : (
11
+ <UniversalLink item={item} className="img-wrapper">
12
+ {children}
13
+ </UniversalLink>
14
+ );
15
+ };
16
+
6
17
  const ListingImage = ({
7
18
  item = {},
8
19
  loading = 'lazy',
9
20
  showDefault = false,
10
21
  className = 'listing-image',
11
22
  responsive = true,
12
- showTitleAttr = true,
13
23
  sizes = '(max-width:320px) 200px, (max-width:425px) 300px, (max-width:767px) 500px, 410px',
14
24
  noWrapLink = false,
15
25
  ...imageProps
16
26
  }) => {
27
+ if (!contentHasImage(item) && !imageProps?.image_field) {
28
+ if (showDefault) {
29
+ return (
30
+ <ListingImageWrapper item={item} noWrapLink={noWrapLink}>
31
+ <img
32
+ src={DefaultImageSVG}
33
+ alt=""
34
+ sizes={sizes}
35
+ aria-hidden={true}
36
+ role="presentation"
37
+ className="listing-image responsive"
38
+ style={{
39
+ minHeight: 'unset',
40
+ height: '100%',
41
+ }}
42
+ />
43
+ </ListingImageWrapper>
44
+ );
45
+ } else return null;
46
+ }
17
47
  const Image = config.getComponent({ name: 'Image' }).component;
48
+
49
+ //Verifies if the item has a preview image or an header image
50
+ const showTitleAttr = !!(item.hasPreviewImage && item.preview_caption);
51
+
52
+ //Verifies with caption to show as alt and title text
53
+ const imageCaption =
54
+ item.hasPreviewImage && item.preview_caption ? item.preview_caption : null;
55
+
18
56
  let commonImageProps = {
19
57
  item,
20
58
  'aria-hidden': imageProps.alt || item.title ? false : true,
21
- alt: imageProps.alt ?? item.title ?? '',
59
+ alt: imageProps.alt ?? imageCaption ?? '',
22
60
  role: imageProps.alt || item.title ? '' : 'presentation',
23
61
  className,
24
62
  loading,
@@ -26,22 +64,19 @@ const ListingImage = ({
26
64
  sizes,
27
65
  ...imageProps,
28
66
  };
29
- if (showTitleAttr)
30
- commonImageProps = { ...commonImageProps, title: item.title };
31
- // photogallery needs to check for null image
32
- // https://stackoverflow.com/questions/33136399/is-there-a-way-to-tell-if-reactelement-renders-null
33
67
 
34
- const image = Image(commonImageProps);
35
- const defaultImage = <img src={DefaultImageSVG} alt="" />;
36
-
37
- if (image === null && !showDefault) return null;
68
+ // show title attribute if preview_caption or image_caption is present for the alt text
69
+ if (showTitleAttr) {
70
+ commonImageProps = {
71
+ ...commonImageProps,
72
+ title: imageCaption,
73
+ };
74
+ }
38
75
 
39
- return !noWrapLink ? (
40
- <UniversalLink item={item} className="img-wrapper">
41
- {image ?? defaultImage}
42
- </UniversalLink>
43
- ) : (
44
- image ?? defaultImage
76
+ return (
77
+ <ListingImageWrapper item={item} noWrapLink={noWrapLink}>
78
+ <Image {...commonImageProps} />
79
+ </ListingImageWrapper>
45
80
  );
46
81
  };
47
82
 
@@ -19,7 +19,10 @@ import {
19
19
  ListingImage,
20
20
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
21
21
  import { Icon } from 'design-comuni-plone-theme/components/ItaliaTheme';
22
- import { getComponentWithFallback } from 'design-comuni-plone-theme/helpers';
22
+ import {
23
+ getComponentWithFallback,
24
+ contentHasImage,
25
+ } from 'design-comuni-plone-theme/helpers';
23
26
  import { isInternalURL } from '@plone/volto/helpers/Url/Url';
24
27
 
25
28
  import config from '@plone/volto/registry';
@@ -56,14 +59,7 @@ const CompleteBlockLinksTemplate = (props) => {
56
59
  )}
57
60
  <Row className="items">
58
61
  {items.map((item, index) => {
59
- const image = ListingImage({
60
- item,
61
- className: '',
62
- sizes: '60px',
63
- showTitleAttr: false,
64
- alt: item.title,
65
- });
66
-
62
+ const hasImage = contentHasImage(item);
67
63
  const BlockExtraTags = getComponentWithFallback({
68
64
  name: 'BlockExtraTags',
69
65
  dependencies: ['CompleteBlockLinksTemplate', item['@type']],
@@ -84,7 +80,16 @@ const CompleteBlockLinksTemplate = (props) => {
84
80
  className={'no-external-if-link'}
85
81
  >
86
82
  <div className="d-flex">
87
- {image && <div className="image-container">{image}</div>}
83
+ {hasImage && (
84
+ <div className="image-container">
85
+ <ListingImage
86
+ item={item}
87
+ className=""
88
+ sizes="60px"
89
+ alt={item.title}
90
+ />
91
+ </div>
92
+ )}
88
93
  <div>
89
94
  <CardBody>
90
95
  <CardTitle tag="h3" className="text-secondary">
@@ -23,6 +23,7 @@ import {
23
23
  getCalendarDate,
24
24
  getEventRecurrenceMore,
25
25
  getComponentWithFallback,
26
+ contentHasImage,
26
27
  } from 'design-comuni-plone-theme/helpers';
27
28
  import {
28
29
  ListingCategory,
@@ -66,13 +67,7 @@ const ContentInEvidenceTemplate = (props) => {
66
67
  const date = getCalendarDate(item, rrule.rrulestr);
67
68
  const eventRecurrenceMore = getEventRecurrenceMore(item, isEditMode);
68
69
  const listingText = <ListingText item={item} />;
69
- const image = ListingImage({
70
- item,
71
- className: 'item-image',
72
- loading: 'eager',
73
- sizes: '(max-width:425px) 400px, (max-width:767px) 520px, 650px',
74
- showTitleAttr: false,
75
- });
70
+ const hasImage = contentHasImage(item);
76
71
  const icon = getItemIcon(item);
77
72
  const BlockExtraTags = getComponentWithFallback({
78
73
  name: 'BlockExtraTags',
@@ -84,8 +79,15 @@ const ContentInEvidenceTemplate = (props) => {
84
79
 
85
80
  return (
86
81
  <Row key={item['@id']} className="content-in-evidence">
87
- {image && (
88
- <Col lg={{ size: 6, offset: 1, order: 2 }}>{image}</Col>
82
+ {hasImage && (
83
+ <Col lg={{ size: 6, offset: 1, order: 2 }}>
84
+ <ListingImage
85
+ item={item}
86
+ className="item-image"
87
+ loading="eager"
88
+ sizes="(max-width:425px) 400px, (max-width:767px) 520px, 650px"
89
+ />
90
+ </Col>
89
91
  )}
90
92
  <Col lg={{ size: 5, order: 1 }}>
91
93
  <Card>
@@ -7,7 +7,7 @@ import {
7
7
  ListingLinkMore,
8
8
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
9
9
  import { defineMessages, useIntl } from 'react-intl';
10
-
10
+ import { contentHasImage } from 'design-comuni-plone-theme/helpers';
11
11
  import PropTypes from 'prop-types';
12
12
  import React from 'react';
13
13
  import { UniversalLink } from '@plone/volto/components';
@@ -58,9 +58,9 @@ const GridGalleryTemplate = ({
58
58
  let image = ListingImage({
59
59
  item,
60
60
  className: '',
61
- showTitleAttr: false,
62
61
  });
63
62
  let scale = null;
63
+ let hasImage = contentHasImage(item);
64
64
  if (index % 7 === 0 || index % 7 === 6 || index % 7 === 3) {
65
65
  scale = 'great';
66
66
  }
@@ -83,6 +83,7 @@ const GridGalleryTemplate = ({
83
83
  loading={critical ? 'eager' : 'lazy'}
84
84
  />
85
85
  );
86
+ hasImage = true;
86
87
  }
87
88
 
88
89
  return (
@@ -94,7 +95,7 @@ const GridGalleryTemplate = ({
94
95
  item={!isEditMode ? item : null}
95
96
  href={isEditMode ? '#' : null}
96
97
  >
97
- {image && (
98
+ {hasImage && (
98
99
  <picture className="volto-image responsive">
99
100
  {image}
100
101
  </picture>
@@ -23,6 +23,7 @@ import { injectLazyLibs } from '@plone/volto/helpers/Loadable/Loadable';
23
23
  import {
24
24
  getCalendarDate,
25
25
  getEventRecurrenceMore,
26
+ contentHasImage,
26
27
  } from 'design-comuni-plone-theme/helpers';
27
28
  import {
28
29
  CardCalendar,
@@ -87,11 +88,7 @@ const InEvidenceTemplate = (props) => {
87
88
  const listingText = show_description ? (
88
89
  <ListingText item={item} />
89
90
  ) : null;
90
- const image = ListingImage({
91
- item,
92
- sizes: '(max-width:320px) 200px, 300px',
93
- showTitleAttr: false,
94
- });
91
+ const hasImage = contentHasImage(item);
95
92
  const category = getCategory(item, show_type, show_section, props);
96
93
  const topics = show_topics ? item.tassonomia_argomenti : null;
97
94
 
@@ -103,7 +100,7 @@ const InEvidenceTemplate = (props) => {
103
100
  <CardPersona
104
101
  item={item}
105
102
  className="listing-item card-bg"
106
- showImage={image ? true : false}
103
+ showImage={hasImage}
107
104
  show_description={show_description}
108
105
  icon={icon}
109
106
  isEditMode={isEditMode}
@@ -111,10 +108,13 @@ const InEvidenceTemplate = (props) => {
111
108
  />
112
109
  ) : (
113
110
  <Card key={index} className={cx('listing-item card-bg')}>
114
- {index === 0 && image && (
111
+ {index === 0 && hasImage && (
115
112
  <div className="img-responsive-wrapper">
116
113
  <div className="img-responsive">
117
- {image}
114
+ <ListingImage
115
+ item={item}
116
+ sizes="(max-width:320px) 200px, 300px"
117
+ />
118
118
  {item['@type'] === 'Event' && (
119
119
  <CardCalendar start={item.start} end={item.end} />
120
120
  )}
@@ -127,10 +127,10 @@ const PhotogalleryTemplate = ({
127
127
 
128
128
  const getCaption = (item) => item.description ?? item.rights ?? null;
129
129
 
130
- const figure = (image, item) => {
130
+ const figure = (imageProps, item) => {
131
131
  return (
132
132
  <figure className="img-wrapper volto-image responsive">
133
- {image}
133
+ <ListingImage {...imageProps} />
134
134
  {getCaption(item) && <figcaption>{getCaption(item)}</figcaption>}
135
135
  </figure>
136
136
  );
@@ -152,7 +152,7 @@ const PhotogalleryTemplate = ({
152
152
  <CarouselWrapper className="it-card-bg">
153
153
  <Slider {...settings} ref={slider}>
154
154
  {items.map((item, i) => {
155
- const image = ListingImage({
155
+ const imageProps = {
156
156
  item,
157
157
  sizes: `(max-width:600px) 450px, (max-width:1024px) ${
158
158
  items.length < 2 ? '1000' : '500'
@@ -164,7 +164,8 @@ const PhotogalleryTemplate = ({
164
164
  : '450'
165
165
  }px`,
166
166
  noWrapLink: true,
167
- });
167
+ showDefault: true,
168
+ };
168
169
  return (
169
170
  <SingleSlideWrapper
170
171
  className={cx('', {
@@ -179,7 +180,7 @@ const PhotogalleryTemplate = ({
179
180
  openLinkInNewTab={true}
180
181
  title={intl.formatMessage(messages.viewImage)}
181
182
  >
182
- {figure(image, item)}
183
+ {figure(imageProps, item)}
183
184
  </UniversalLink>
184
185
  ) : (
185
186
  <a
@@ -204,7 +205,7 @@ const PhotogalleryTemplate = ({
204
205
  messages.viewPreview,
205
206
  )} ${item.title}`}
206
207
  >
207
- {figure(image, item)}
208
+ {figure(imageProps, item)}
208
209
  </a>
209
210
  )}
210
211
  </SingleSlideWrapper>
@@ -218,12 +218,15 @@ const SliderTemplate = ({
218
218
 
219
219
  <Slider {...settings} ref={slider}>
220
220
  {items.map((item, index) => {
221
- const image = ListingImage({
222
- item,
223
- loading: index === 0 ? 'eager' : 'lazy',
224
- sizes: `max-width(991px) 620px, ${1300 / nSlidesToShow}px`,
225
- critical: true,
226
- });
221
+ const image = (
222
+ <ListingImage
223
+ item={item}
224
+ loading={index === 0 ? 'eager' : 'lazy'}
225
+ sizes={`max-width(991px) 620px, ${1300 / nSlidesToShow}px`}
226
+ critical
227
+ showDefault
228
+ />
229
+ );
227
230
  const nextIndex = index < items.length - 1 ? index + 1 : null;
228
231
  const prevIndex = index > 0 ? index - 1 : null;
229
232
  return (
@@ -6,7 +6,6 @@ import PropTypes from 'prop-types';
6
6
  import { Container, Row, Col } from 'design-react-kit';
7
7
  import { UniversalLink } from '@plone/volto/components';
8
8
  import cx from 'classnames';
9
-
10
9
  import {
11
10
  ListingLinkMore,
12
11
  ListingImage,
@@ -38,34 +37,31 @@ const SmallBlockLinksTemplate = ({
38
37
  )}
39
38
  <Row className="items">
40
39
  {items.map((item, index) => {
41
- const image = ListingImage({
42
- item,
43
- sizes: '(max-width:575px) 520px, 200px',
44
- style: {},
45
- alt: item.title,
46
- noWrapLink: true,
47
- });
48
-
49
40
  return (
50
41
  <Col
51
42
  md="3"
52
43
  key={item['@id']}
53
44
  className="col-item col-sm-4 col-lg-2"
54
45
  >
55
- {image && (
56
- <div className="center-image-card">
57
- <UniversalLink
58
- item={!isEditMode ? item : null}
59
- href={isEditMode ? '#' : ''}
60
- className="img-link"
61
- overrideMarkSpecialLinks={
62
- override_links_accessibility_marker
63
- }
64
- >
65
- {image}
66
- </UniversalLink>
67
- </div>
68
- )}
46
+ <div className="center-image-card">
47
+ <UniversalLink
48
+ item={!isEditMode ? item : null}
49
+ href={isEditMode ? '#' : ''}
50
+ className="img-link"
51
+ overrideMarkSpecialLinks={
52
+ override_links_accessibility_marker
53
+ }
54
+ >
55
+ <ListingImage
56
+ item={item}
57
+ sizes="(max-width:575px) 520px, 200px"
58
+ style={{}}
59
+ alt={item.title}
60
+ noWrapLink
61
+ showDefault
62
+ />
63
+ </UniversalLink>
64
+ </div>
69
65
  </Col>
70
66
  );
71
67
  })}
@@ -68,7 +68,4 @@ test('View renders all fields', async () => {
68
68
 
69
69
  expect(screen.getByText(/Accordion 1/i)).toBeInTheDocument();
70
70
  expect(screen.getByText(/Is this just fantasy/i)).toBeInTheDocument();
71
- expect(
72
- screen.getByRole('link', { name: /Caught in a landside/i }),
73
- ).toBeInTheDocument();
74
71
  });
@@ -8,6 +8,7 @@ import {
8
8
  ListingCategory,
9
9
  ListingImage,
10
10
  } from 'design-comuni-plone-theme/components/ItaliaTheme';
11
+ import { contentHasImage } from 'design-comuni-plone-theme/helpers';
11
12
 
12
13
  export const CardPersona = ({
13
14
  item,
@@ -20,13 +21,7 @@ export const CardPersona = ({
20
21
  type,
21
22
  isEditMode,
22
23
  }) => {
23
- const image = ListingImage({
24
- item,
25
- sizes: '130px',
26
- showTitleAttr: false,
27
- });
28
-
29
- const hasImage = image !== null && showImage;
24
+ const hasImage = contentHasImage(item) && showImage;
30
25
 
31
26
  return (
32
27
  <Card
@@ -58,7 +53,9 @@ export const CardPersona = ({
58
53
  )}
59
54
  </CardBody>
60
55
  {hasImage && (
61
- <div className="card-image card-image-rounded">{image}</div>
56
+ <div className="card-image card-image-rounded">
57
+ <ListingImage item={item} sizes="130px" />
58
+ </div>
62
59
  )}
63
60
  </div>
64
61
  </Card>
@@ -32,6 +32,10 @@ const messages = defineMessages({
32
32
  id: 'feedback_form_title',
33
33
  defaultMessage: 'How clear is the information on this page?',
34
34
  },
35
+ aria_title_feedback: {
36
+ id: 'feedback_form_aria_title',
37
+ defaultMessage: 'Feedback form',
38
+ },
35
39
  yes: {
36
40
  id: 'feedback_form_yes',
37
41
  defaultMessage: 'Yes',
@@ -255,7 +259,11 @@ const FeedbackForm = ({ title, pathname }) => {
255
259
  <Container>
256
260
  <Row className="d-flex justify-content-center bg-primary">
257
261
  <Col className="col-12 col-lg-6">
258
- <div className="feedback-form" role="form">
262
+ <div
263
+ className="feedback-form"
264
+ role="form"
265
+ aria-label={intl.formatMessage(messages.aria_title_feedback)}
266
+ >
259
267
  <Card
260
268
  className="shadow card-wrapper py-4 px-4"
261
269
  data-element="feedback"
@@ -13,6 +13,10 @@ const messages = defineMessages({
13
13
  id: 'Cerca',
14
14
  defaultMessage: 'Cerca',
15
15
  },
16
+ searchLabel: {
17
+ id: 'searchLabel',
18
+ defaultMessage: 'Cerca nel sito',
19
+ },
16
20
  });
17
21
 
18
22
  const HeaderSearch = () => {
@@ -21,7 +25,11 @@ const HeaderSearch = () => {
21
25
 
22
26
  return (
23
27
  <>
24
- <div className="it-search-wrapper">
28
+ <div
29
+ className="it-search-wrapper"
30
+ role="search"
31
+ aria-label={intl.formatMessage(messages.searchLabel)}
32
+ >
25
33
  <span className="d-none d-md-block">
26
34
  {intl.formatMessage(messages.search)}
27
35
  </span>
@@ -166,6 +166,10 @@ const messages = defineMessages({
166
166
  id: 'currentActive',
167
167
  defaultMessage: 'attivo',
168
168
  },
169
+ searchLabel: {
170
+ id: 'searchLabel',
171
+ defaultMessage: 'Cerca nel sito',
172
+ },
169
173
  });
170
174
 
171
175
  const SearchModal = ({ closeModal, show }) => {
@@ -334,6 +338,7 @@ const SearchModal = ({ closeModal, show }) => {
334
338
  id="search-modal"
335
339
  isOpen={show}
336
340
  toggle={closeModal}
341
+ role="alertdialog"
337
342
  >
338
343
  <ModalHeader toggle={closeModal}>
339
344
  <Container>
@@ -392,7 +397,11 @@ const SearchModal = ({ closeModal, show }) => {
392
397
  <>
393
398
  <div className="search-filters search-filters-text">
394
399
  <div className="form-group">
395
- <div className="input-group mb-3">
400
+ <div
401
+ className="input-group mb-3"
402
+ role="search"
403
+ aria-label={intl.formatMessage(messages.searchLabel)}
404
+ >
396
405
  <input
397
406
  id="search-text"
398
407
  type="text"
@@ -12,13 +12,20 @@ import {
12
12
  HeaderContent,
13
13
  HeaderRightZone,
14
14
  } from 'design-react-kit';
15
- import { useIntl } from 'react-intl';
15
+ import { defineMessages, useIntl } from 'react-intl';
16
16
  import {
17
17
  getSiteProperty,
18
18
  useHomePath,
19
19
  } from 'design-comuni-plone-theme/helpers';
20
20
  import { SiteProperty } from 'volto-site-settings';
21
21
 
22
+ const messages = defineMessages({
23
+ utilityMenu: {
24
+ id: 'utilityMenu',
25
+ defaultMessage: 'Utility Menu',
26
+ },
27
+ });
28
+
22
29
  const HeaderSlim = () => {
23
30
  const subsite = useSelector((state) => state.subsite?.data);
24
31
  const intl = useIntl();
@@ -45,7 +52,13 @@ const HeaderSlim = () => {
45
52
 
46
53
  const target = subsite ? null : '_blank';
47
54
  return (
48
- <Header small={false} theme="" type="slim" role="navigation">
55
+ <Header
56
+ small={false}
57
+ theme=""
58
+ type="slim"
59
+ role="navigation"
60
+ aria-label={intl.formatMessage(messages.utilityMenu)}
61
+ >
49
62
  <HeaderContent>
50
63
  <HeaderBrand
51
64
  responsive
@@ -7,10 +7,10 @@ import React, { useEffect } from 'react';
7
7
  import cx from 'classnames';
8
8
  import { useDispatch, useSelector } from 'react-redux';
9
9
  import { useLocation } from 'react-router-dom';
10
+ import { useIntl } from 'react-intl';
10
11
  import { Nav, NavItem, NavLink } from 'design-react-kit';
11
12
  import { UniversalLink } from '@plone/volto/components';
12
13
  import { flattenToAppURL } from '@plone/volto/helpers';
13
- import { useIntl } from 'react-intl';
14
14
  import { getSiteProperty } from 'design-comuni-plone-theme/helpers';
15
15
  import { getSlimHeader, getItemsByPath } from 'volto-slimheader';
16
16