diff --git a/src/components/ItaliaTheme/View/CartellaModulisticaView/DocRow.jsx b/src/components/ItaliaTheme/View/CartellaModulisticaView/DocRow.jsx index 806b5d62d..d2cea39ae 100644 --- a/src/components/ItaliaTheme/View/CartellaModulisticaView/DocRow.jsx +++ b/src/components/ItaliaTheme/View/CartellaModulisticaView/DocRow.jsx @@ -5,6 +5,7 @@ import React, { useState, useEffect } from 'react'; import cx from 'classnames'; +import { v4 as uuid } from 'uuid'; import Highlighter from 'react-highlight-words'; import { UniversalLink } from '@plone/volto/components'; @@ -40,24 +41,41 @@ const Downloads = ({ item, titleDoc, filteredWords }) => { ) : ( - -
{item.title}
- -
+ <> +
+ + + +
+
+ + + +
+ ); }; const DocRow = ({ doc, items, searchableText, collapsable }) => { const filteredWords = searchableText.split(' '); + const id = uuid(); const [itemOpen, setItemOpen] = useState(!collapsable); @@ -131,19 +149,20 @@ const DocRow = ({ doc, items, searchableText, collapsable }) => { setItemOpen(itemOpen ? false : true); }} aria-expanded={itemOpen} - aria-controls="collapsedContent" + aria-controls={`accordion-content-${id}`} aria-labelledby={`title-${doc.id}`} > )}