feat: implement accessibility improvements by ensuring alt text is always present on image error events and initialize accessibility checking in App component
This commit is contained in:
@@ -33,6 +33,12 @@ const ProductImage = ({
|
||||
alt={product.name}
|
||||
fetchPriority="high"
|
||||
loading="eager"
|
||||
onError={(e) => {
|
||||
// Ensure alt text is always present even on error
|
||||
if (!e.target.alt) {
|
||||
e.target.alt = product.name || 'Produktbild';
|
||||
}
|
||||
}}
|
||||
sx={{ objectFit: "cover" }}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user