Skip to content

Commit 0355437

Browse files
authored
Legger til mulighet for altText på hoverFocusIcon (#1714)
1 parent 152de24 commit 0355437

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/components/_common/contact-option/opening-info/helpers/iconUtils.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,27 @@ interface HoverFocusIconProps {
3131
iconActive: string;
3232
isActive: boolean;
3333
style?: string;
34+
altText?: string;
3435
}
3536

3637
export const hoverFocusIcon = ({
3738
iconDefault,
3839
iconActive,
3940
isActive,
4041
style = '',
42+
altText = '',
4143
}: HoverFocusIconProps) => (
4244
<>
4345
<img
44-
alt=""
46+
alt={altText}
4547
className={`${style}`}
4648
src={`${appOrigin}/gfx/${iconDefault}`}
4749
style={{
4850
display: isActive ? 'none' : 'block',
4951
}}
5052
/>
5153
<img
52-
alt=""
54+
alt={altText}
5355
className={`${style}`}
5456
src={`${appOrigin}/gfx/${iconActive}`}
5557
style={{

src/components/parts/_legacy/main-article/komponenter/SosialeMedier.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const Icon = ({ type, text, href }) => {
5757
iconDefault: `${type}-filled.svg`,
5858
iconActive: `${type}-inverted.svg`,
5959
isActive: isActive,
60+
altText: text,
6061
})}
6162
</LenkeBase>
6263
</li>

0 commit comments

Comments
 (0)