Skip to content

Commit d015f67

Browse files
authored
fix: Add visible titles to image-based links
1 parent 6b98d10 commit d015f67

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Logo.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const Logo = ({
77
alt,
88
...attributes
99
}) => (
10-
<a href={href} className="logo" {...attributes}>
10+
<a href={href} className="logo" title={alt} {...attributes}>
1111
<img className="d-block" src={src} alt={alt} />
1212
</a>
1313
);

src/__snapshots__/Header.test.jsx.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ exports[`<Header /> renders correctly for anonymous desktop 1`] = `
1919
<a
2020
className="logo"
2121
href="http://localhost:18000/dashboard"
22+
title="edX"
2223
>
2324
<img
2425
alt="edX"
@@ -140,6 +141,7 @@ exports[`<Header /> renders correctly for anonymous mobile 1`] = `
140141
className="logo"
141142
href="http://localhost:18000/dashboard"
142143
itemType="http://schema.org/Organization"
144+
title="edX"
143145
>
144146
<img
145147
alt="edX"
@@ -208,6 +210,7 @@ exports[`<Header /> renders correctly for authenticated desktop 1`] = `
208210
<a
209211
className="logo"
210212
href="http://localhost:18000/dashboard"
213+
title="edX"
211214
>
212215
<img
213216
alt="edX"
@@ -379,6 +382,7 @@ exports[`<Header /> renders correctly for authenticated mobile 1`] = `
379382
className="logo"
380383
href="http://localhost:18000/dashboard"
381384
itemType="http://schema.org/Organization"
385+
title="edX"
382386
>
383387
<img
384388
alt="edX"

0 commit comments

Comments
 (0)