Skip to content

Commit 6f1d28d

Browse files
authored
fix: Improve accessibility and consistency in 404 and index views (#61)
- Added spacing and cleaned up HTML structure in `404.ejs` and `index.ejs`. - Removed redundant `loading="lazy"` attribute where unnecessary due to default browser behavior. - Improved readability and consistency of `<img>` tags with proper formatting and alignment. - Ensured clean and valid HTML across both views.
1 parent 2ca2e57 commit 6f1d28d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/views/404.ejs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
45
<meta charset="UTF-8">
56
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
67
<title>404 - Page not found - Oops!</title>
78
<link rel="preload" href="../assets/fonts/Poppins-Regular-latin.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
89
<link rel="preload" href="../assets/images/confused-robot.png?as=webp" as="image" type="image/webp" />
910
</head>
11+
1012
<body>
1113
<div class="clazz-error-container">
1214
<header>
@@ -16,12 +18,17 @@
1618
<picture>
1719
<!-- Source of the image: https://www.cleanpng.com/png-http-404-error-user-interface-design-google-chrome-2045552/ -->
1820
<source type="image/webp" srcset="../assets/images/confused-robot.png?as=webp">
19-
<img src="../assets/images/confused-robot.png" alt="Confused robot looking for the page" loading="lazy" width="300" height="270" />
21+
<img
22+
src="../assets/images/confused-robot.png"
23+
alt="Confused robot looking for the page"
24+
width="300"
25+
height="270" />
2026
</picture>
2127
<div class="clazz-action">
2228
<p>Don't worry, even robots get lost sometimes.</p>
2329
<a href="/" aria-label="Visit the Home Page" class="clazz-home-link">Take Me Home</a>
2430
</div>
2531
</div>
2632
</body>
33+
2734
</html>

src/views/index.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<header>
4444
<picture>
4545
<source type="image/webp" srcset="../assets/images/profile100w100h.png?as=webp" />
46-
<img class="clazz-profile-image" src="../assets/images/profile100w100h.png" alt="Profile picture of Balázs Varga, CTO @ Apter" loading="lazy" width="100" height="100" />
46+
<img class="clazz-profile-image" src="../assets/images/profile100w100h.png" alt="Profile picture of Balázs Varga, CTO @ Apter" width="100" height="100" />
4747
</picture>
4848
<h1 class="clazz-text-center">Balázs Varga</h1>
4949
</header>

0 commit comments

Comments
 (0)