diff --git a/RELEASE.md b/RELEASE.md index 6880a2837..9af415e84 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,11 @@ - ... --> +## Versione X.X.X (xx/xx/xxxx) + +### Migliorie + +- Migliorata l'accessibilità dei titoli dei contenuti ## Versione 8.9.0 (03/11/2023) ### Novità diff --git a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx index d68ca7704..2215a9514 100644 --- a/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx +++ b/src/components/ItaliaTheme/Blocks/Listing/SliderTemplate.jsx @@ -79,7 +79,9 @@ function NextArrow(props) { id="sliderNextArrow" > - {intl.formatMessage(messages.successivo)} + + {intl.formatMessage(messages.successivo)} + ); } @@ -122,7 +124,9 @@ function PrevArrow(props) { onKeyDown={handleKeyboardUsers} > - {intl.formatMessage(messages.precedente)} + + {intl.formatMessage(messages.precedente)} + ); } diff --git a/src/components/ItaliaTheme/CustomerSatisfaction/Steps/Commons/Rating.jsx b/src/components/ItaliaTheme/CustomerSatisfaction/Steps/Commons/Rating.jsx index 6691398ac..b8de09e01 100644 --- a/src/components/ItaliaTheme/CustomerSatisfaction/Steps/Commons/Rating.jsx +++ b/src/components/ItaliaTheme/CustomerSatisfaction/Steps/Commons/Rating.jsx @@ -79,7 +79,7 @@ export const Rating: FC = ({ if (isCustomLegendObject(legend)) { legendClass = classNames({ - 'sr-only': legend.srOnly + 'visually-hidden': legend.srOnly }); legendText = legend.content; } diff --git a/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx b/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx index cc7bcc5c8..7d6047783 100644 --- a/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx +++ b/src/components/ItaliaTheme/View/BandoView/BandoApprofondimenti.jsx @@ -47,7 +47,7 @@ const BandoApprofondimenti = ({ content }) => { padding={false} /> - + { > - + { <> {content.approfondimento.map((item, i) => ( <> -
{item.title}
+

{item.title}

{content.approfondimento[i].children.map((inner_item, x) => inner_item.type === 'Modulo' ? ( diff --git a/src/components/ItaliaTheme/View/BandoView/BandoText.jsx b/src/components/ItaliaTheme/View/BandoView/BandoText.jsx index 211e0bf31..dbb9ed64a 100644 --- a/src/components/ItaliaTheme/View/BandoView/BandoText.jsx +++ b/src/components/ItaliaTheme/View/BandoView/BandoText.jsx @@ -38,20 +38,18 @@ const BandoText = ({ content }) => { show_title={true} > {/* DESCRIZIONE DEL BANDO */} - {richTextHasContent(content?.text) && ( - - )} + {richTextHasContent(content?.text) && } {/* TIPOLOGIA DEL BANDO */} {content?.tipologia_bando && ( <> -
{intl.formatMessage(messages.tipologia_bando)}
+

{intl.formatMessage(messages.tipologia_bando)}

{content.tipologia_bando.title} )} {/* DESTINATARI DEL BANDO */} {content?.destinatari?.length > 0 && ( <> -
{intl.formatMessage(messages.destinatari)}
+

{intl.formatMessage(messages.destinatari)}

{content.destinatari.map((item, i) => (

{item.title}

))} @@ -60,7 +58,7 @@ const BandoText = ({ content }) => { {/* ENTE DEL BANDO */} {content?.ente_bando?.length > 0 && ( <> -
{intl.formatMessage(messages.ente)}
+

{intl.formatMessage(messages.ente)}

{content.ente_bando.map((item, i) => ( {item} diff --git a/src/components/ItaliaTheme/View/BandoView/BandoView.jsx b/src/components/ItaliaTheme/View/BandoView/BandoView.jsx index afc140b2b..d42b015df 100644 --- a/src/components/ItaliaTheme/View/BandoView/BandoView.jsx +++ b/src/components/ItaliaTheme/View/BandoView/BandoView.jsx @@ -65,7 +65,7 @@ const BandoView = ({ content, location }) => { showtassonomiaargomenti={true} showbandostate={true} /> -
+
diff --git a/src/components/ItaliaTheme/View/Commons/RichText.jsx b/src/components/ItaliaTheme/View/Commons/RichText.jsx index a48186b87..4a346c798 100644 --- a/src/components/ItaliaTheme/View/Commons/RichText.jsx +++ b/src/components/ItaliaTheme/View/Commons/RichText.jsx @@ -9,7 +9,8 @@ import { RichTextRender } from 'design-comuni-plone-theme/components/ItaliaTheme */ const RichText = ({ title, - title_size = 'h5', + title_size = 'h3', + title_class_name = 'h5', data, add_class, children, @@ -33,6 +34,7 @@ const RichText = ({ {title} @@ -48,6 +50,7 @@ export default RichText; RichText.propTypes = { title: PropTypes.string, title_size: PropTypes.oneOf(['h2', 'h3', 'h4', 'h5', 'h6']), + title_class_name: PropTypes.string, data: PropTypes.object, add_class: PropTypes.string, serif: PropTypes.bool, diff --git a/src/components/ItaliaTheme/View/Commons/RichTextArticle.jsx b/src/components/ItaliaTheme/View/Commons/RichTextArticle.jsx deleted file mode 100644 index c05a0cfc4..000000000 --- a/src/components/ItaliaTheme/View/Commons/RichTextArticle.jsx +++ /dev/null @@ -1,56 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { RichTextRender } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; -/** - * RichTextArticle view component class. - * @function RichTextArticle - * @params {object} content: Content object. - * @returns {string} Markup of the component. - */ -const RichTextArticle = ({ - title, - title_size, - show_title = true, - data, - tag_id, - add_class, - children, -}) => { - let content_to_display = RichTextRender({ - data, - add_class, - serif: true, - }); - - return content_to_display || children ? ( -
- {title && show_title ? ( - title_size === 'h5' ? ( -
{title}
- ) : ( -

{title}

- ) - ) : ( -

- {title} -

- )} - - {content_to_display} - {children} -
- ) : null; -}; -export default RichTextArticle; - -RichTextArticle.propTypes = { - title: PropTypes.string, - data: PropTypes.object, - tag_id: PropTypes.string, - add_class: PropTypes.string, -}; diff --git a/src/components/ItaliaTheme/View/Commons/RichTextSection.jsx b/src/components/ItaliaTheme/View/Commons/RichTextSection.jsx index ad1e07e8f..b8a76280b 100644 --- a/src/components/ItaliaTheme/View/Commons/RichTextSection.jsx +++ b/src/components/ItaliaTheme/View/Commons/RichTextSection.jsx @@ -5,6 +5,7 @@ import { RichTextRender } from 'design-comuni-plone-theme/components/ItaliaTheme const RichTextSection = ({ title, title_tag = 'h2', + title_class_name = 'h4', show_title = true, data, tag_id, @@ -41,8 +42,9 @@ const RichTextSection = ({ {title && ( {title} @@ -58,6 +60,7 @@ export default RichTextSection; RichTextSection.propTypes = { title: PropTypes.string, title_tag: PropTypes.oneOf(['h2', 'h3', 'h4', 'h5', 'h6']), + title_class_name: PropTypes.string, data: PropTypes.object, tag_id: PropTypes.string, add_class: PropTypes.string, diff --git a/src/components/ItaliaTheme/View/Commons/SmallVenue.jsx b/src/components/ItaliaTheme/View/Commons/SmallVenue.jsx index 0424eaa3a..23035376d 100644 --- a/src/components/ItaliaTheme/View/Commons/SmallVenue.jsx +++ b/src/components/ItaliaTheme/View/Commons/SmallVenue.jsx @@ -35,11 +35,11 @@ const SmallVenue = ({ venue }) => { <>
-
+
{venue_fo.title} -
+
{venue_fo.telefono && (

diff --git a/src/components/ItaliaTheme/View/Commons/TrasparenzaFields.jsx b/src/components/ItaliaTheme/View/Commons/TrasparenzaFields.jsx index 877200d8f..e8ad474a0 100644 --- a/src/components/ItaliaTheme/View/Commons/TrasparenzaFields.jsx +++ b/src/components/ItaliaTheme/View/Commons/TrasparenzaFields.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; import { - RichTextArticle, + RichTextSection, RichTextRender, } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; import { UniversalLink } from '@plone/volto/components'; @@ -284,12 +284,12 @@ const TrasparenzaFields = ({ content }) => { }); return fields.length > 0 ? ( -

{fields}
- + ) : null; }; diff --git a/src/components/ItaliaTheme/View/Commons/VenuesSmall.jsx b/src/components/ItaliaTheme/View/Commons/VenuesSmall.jsx index f3a0efaf9..9b0f16d49 100644 --- a/src/components/ItaliaTheme/View/Commons/VenuesSmall.jsx +++ b/src/components/ItaliaTheme/View/Commons/VenuesSmall.jsx @@ -47,10 +47,10 @@ const Location = ({ location, show_icon }) => { let location_fo = locationContent?.data; return location_fo ? ( -
+
{show_icon && }
-
{location_fo.title}
+
{location_fo.title}
{(location_fo.street || location_fo.zip_code) && (

diff --git a/src/components/ItaliaTheme/View/Commons/index.jsx b/src/components/ItaliaTheme/View/Commons/index.jsx index 1b3fb7102..e22bad0a2 100644 --- a/src/components/ItaliaTheme/View/Commons/index.jsx +++ b/src/components/ItaliaTheme/View/Commons/index.jsx @@ -6,7 +6,6 @@ export VenuesSmall from 'design-comuni-plone-theme/components/ItaliaTheme/View/C export WideImage from 'design-comuni-plone-theme/components/ItaliaTheme/View/Commons/WideImage'; export SideMenu from 'design-comuni-plone-theme/components/ItaliaTheme/View/Commons/SideMenu'; export PageHeader from 'design-comuni-plone-theme/components/ItaliaTheme/View/Commons/PageHeader/PageHeader'; -export RichTextArticle from 'design-comuni-plone-theme/components/ItaliaTheme/View/Commons/RichTextArticle'; export OfficeCard from 'design-comuni-plone-theme/components/ItaliaTheme/View/Commons/OfficeCard'; export Metadata from 'design-comuni-plone-theme/components/ItaliaTheme/View/Commons/Metadata'; export Sharing from 'design-comuni-plone-theme/components/ItaliaTheme/View/Commons/Sharing'; diff --git a/src/components/ItaliaTheme/View/DocumentoView/DocumentoAutori.jsx b/src/components/ItaliaTheme/View/DocumentoView/DocumentoAutori.jsx index 329fd227e..9b06567d9 100644 --- a/src/components/ItaliaTheme/View/DocumentoView/DocumentoAutori.jsx +++ b/src/components/ItaliaTheme/View/DocumentoView/DocumentoAutori.jsx @@ -37,7 +37,8 @@ const DocumentoAutori = ({ autori, title }) => { diff --git a/src/components/ItaliaTheme/View/DocumentoView/DocumentoDocumenti.jsx b/src/components/ItaliaTheme/View/DocumentoView/DocumentoDocumenti.jsx index 5bf734de4..a3bca83fb 100644 --- a/src/components/ItaliaTheme/View/DocumentoView/DocumentoDocumenti.jsx +++ b/src/components/ItaliaTheme/View/DocumentoView/DocumentoDocumenti.jsx @@ -28,6 +28,7 @@ const DocumentoDocumenti = ({ content }) => { title={intl.formatMessage(messages.documenti)} id="elenco-documenti" /> + {richTextHasContent(content.formati_disponibili) && ( { richTextHasContent(content?.riferimenti_normativi), [content], ); + return ( - + {richTextHasContent(content?.ulteriori_informazioni) && ( )} @@ -32,7 +33,9 @@ const DocumentoUlterioriInformazioni = ({ content }) => { {/* RIFERIMENTI NORMATIVI */} {richTextHasContent(content?.riferimenti_normativi) && (

-
{intl.formatMessage(messages.riferimenti_normativi)}
+

+ {intl.formatMessage(messages.riferimenti_normativi)} +

)} diff --git a/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx b/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx index 4ea5edcb6..9bfab862e 100644 --- a/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx +++ b/src/components/ItaliaTheme/View/DocumentoView/DocumentoView.jsx @@ -72,7 +72,7 @@ const DocumentoView = ({ content, location }) => { {/* HEADER IMAGE */} -
+
) : null} - {/* ---contatti interno */} {content?.organizzato_da_interno?.length > 0 && (
-
{intl.formatMessage(messages.organizzato_da)}
+

{intl.formatMessage(messages.organizzato_da)}

{content?.organizzato_da_interno?.map((item, index) => ( { ))}
)} - {/* ---supportato da */} - {getSupportatoDa()} + {content?.supportato_da?.length > 0 && ( +
+

+ {intl.formatMessage(messages.supported_by)} +

+ {content?.supportato_da?.map((item) => ( + + ))} +
+ )} ) : null; }; -EventoDocumenti.propTypes = { +EventoContatti.propTypes = { content: PropTypes.object.isRequired, }; -export default EventoDocumenti; +export default EventoContatti; diff --git a/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx b/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx index f1e670518..939176598 100644 --- a/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx +++ b/src/components/ItaliaTheme/View/EventoView/EventoCosE.jsx @@ -50,9 +50,9 @@ const EventoCosE = ({ content }) => { > {content?.persone_amministrazione?.length > 0 && ( <> -
+

{intl.formatMessage(messages.parteciperanno)} -

+ {content?.persone_amministrazione?.map((item, i) => ( { {richTextHasContent(content?.descrizione_destinatari) && (
diff --git a/src/components/ItaliaTheme/View/EventoView/EventoSponsors.jsx b/src/components/ItaliaTheme/View/EventoView/EventoSponsors.jsx index 11bf749e4..a92480116 100644 --- a/src/components/ItaliaTheme/View/EventoView/EventoSponsors.jsx +++ b/src/components/ItaliaTheme/View/EventoView/EventoSponsors.jsx @@ -4,7 +4,9 @@ import PropTypes from 'prop-types'; import { Sponsors } from 'design-comuni-plone-theme/components/ItaliaTheme/View'; const EventoSponsors = ({ content }) => ( - +
+ +
); EventoSponsors.propTypes = { diff --git a/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx b/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx index 62c77724a..40c2692d5 100644 --- a/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx +++ b/src/components/ItaliaTheme/View/EventoView/EventoUlterioriInformazioni.jsx @@ -45,7 +45,7 @@ const EventoUlterioriInformazioni = ({ content }) => { )} {content?.event_url && (
-
{intl.formatMessage(messages.event_url)}
+

{intl.formatMessage(messages.event_url)}

{content.event_url} @@ -56,7 +56,6 @@ const EventoUlterioriInformazioni = ({ content }) => { {richTextHasContent(content?.patrocinato_da) && (
@@ -66,7 +65,9 @@ const EventoUlterioriInformazioni = ({ content }) => { )} {content?.strutture_politiche?.length > 0 && (
-
{intl.formatMessage(messages.strutture_politiche)}
+

+ {intl.formatMessage(messages.strutture_politiche)} +

{content?.strutture_politiche?.map((item, i) => ( { {/* HEADER IMAGE */} -
+