Skip to content

Commit

Permalink
fix: added aria-hidden attribute to icons block (#595)
Browse files Browse the repository at this point in the history
* fix: added aria-hidden attribute to icons

* fix: removed unused null

* fix: used native aria-hidden attribute for icons
  • Loading branch information
sabrina-bongiovanni authored Mar 27, 2024
1 parent 48320ad commit da2e1a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

### Migliorie

- Migliorata l'accessibilità del blocco Icone.
- Migliorata l'accessibilità per la customer satisfaction.

### Fix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const ViewBlock = ({ data, isOpen, toggle, id, index }) => {
<CardBody tag="div">
{data.icon?.length > 0 && (
<div className="iconblock-icon">
<Icon icon={data.icon} />
<Icon icon={data.icon} aria-hidden={true} />
</div>
)}

Expand Down
1 change: 1 addition & 0 deletions src/components/ItaliaTheme/Icons/FontAwesomeIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const FontAwesomeIcon = (props) => {
? `<title>${title}</title>${loadedIcon.content}`
: loadedIcon.content,
}}
aria-hidden={props['aria-hidden']}
/>
) : icon ? (
<span className={`icon fa-icon placeholder ${className ?? ''}`}></span>
Expand Down

0 comments on commit da2e1a4

Please sign in to comment.