Improve frontend accessibility

This commit is contained in:
Thuvaraka Yogarajah committed 2026-06-14 11:58:04 +02:00
1 parent de1d3d2d63
commit af7271e2f8
25 files changed
+478 -225

No files matched your search

+52
View File
@@ -18,6 +18,58 @@ body {
color: var(--text);
}
.skip-link {
position: fixed;
top: 12px;
left: 12px;
z-index: 1000;
transform: translateY(-160%);
padding: 10px 14px;
border-radius: 8px;
background: #111827;
color: #ffffff;
font-weight: 700;
text-decoration: none;
transition: transform 0.2s ease;
}
.skip-link + .skip-link {
top: 58px;
}
.skip-link:focus {
transform: translateY(0);
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
outline: 3px solid #2563eb;
outline-offset: 3px;
outline-style: solid !important;
outline-width: 3px !important;
}
button:disabled,
[aria-disabled="true"] {
cursor: not-allowed;
}
/* Form errors */
.form-error {
color: red;
+9 -2
View File
@@ -53,15 +53,22 @@
}
.chat-item {
background: transparent;
border: 0;
border-bottom: 1px solid #f0f2f5;
color: inherit;
display: flex;
align-items: center;
gap: 12px;
font: inherit;
text-align: left;
padding: 16px 20px;
cursor: pointer;
transition: background 0.2s;
border-bottom: 1px solid #f0f2f5;
width: 100%;
}
.chat-item:hover {
.chat-item:hover,
.chat-item:focus-visible {
background: #f8fafc;
}
.chat-item.active {
+17 -7
View File
@@ -71,11 +71,18 @@
transform 0.2s,
box-shadow 0.2s;
}
.creator-card:hover {
.creator-card:hover,
.creator-card:focus-within {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
}
.creator-avatar-link {
border-radius: 50%;
display: inline-flex;
flex-shrink: 0;
}
.creator-avatar {
width: 70px;
height: 70px;
@@ -92,6 +99,15 @@
font-weight: 700;
margin-bottom: 4px;
}
.creator-name a {
color: inherit;
text-decoration: none;
}
.creator-name a:hover {
text-decoration: underline;
}
.creator-handle {
color: #64748b;
font-size: 0.85rem;
@@ -181,9 +197,3 @@
color: #64748b;
font-size: 0.8rem;
}
/* Clickable elements */
.creator-card .creator-avatar,
.creator-card .creator-name {
cursor: pointer;
}
+2 -1
View File
@@ -49,7 +49,8 @@
flex-direction: column;
gap: 8px;
}
.form-group label {
.form-group label,
.form-label {
font-weight: 600;
font-size: 0.95rem;
}
+10 -1
View File
@@ -72,11 +72,20 @@
display: flex;
flex-direction: column;
}
.post-card:hover {
.post-card:hover,
.post-card:focus-within {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
}
.post-card-link {
color: inherit;
display: flex;
flex: 1;
flex-direction: column;
text-decoration: none;
}
/* Post Header */
.post-header {
display: flex;
+2
View File
@@ -146,6 +146,7 @@
gap: 8px;
font-size: 0.85rem;
color: #f59e0b;
text-decoration: none;
}
.prompt-rating span:first-child i {
color: #f59e0b;
@@ -251,6 +252,7 @@
.market-rating-none {
color: #94a3b8;
font-size: 0.8rem;
text-decoration: none;
}
.market-rating-clickable {
cursor: pointer;
+14 -1
View File
@@ -158,7 +158,19 @@
padding: 18px;
display: flex;
gap: 16px;
cursor: pointer;
align-items: flex-start;
}
.profile-prompt-card:focus-within,
.profile-prompt-card:hover {
box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
}
.profile-prompt-link {
color: inherit;
display: flex;
flex: 1;
gap: 16px;
min-width: 0;
text-decoration: none;
}
.profile-prompt-img {
width: 72px;
@@ -196,6 +208,7 @@
padding: 6px 10px;
font-weight: 700;
cursor: pointer;
flex-shrink: 0;
}
/* ── Inner spacing for the profile card ─────────────────────────────── */
+13 -1
View File
@@ -154,7 +154,18 @@
}
.sidebar .nav-text,
.sidebar-logout .nav-text,
.sidebar-logout .nav-text {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.logout-arrow {
display: none;
}
@@ -163,6 +174,7 @@
.sidebar-logout {
justify-content: center;
padding: 12px;
position: relative;
}
.sidebar a.active {
+5
View File
@@ -46,6 +46,11 @@
width: 100%;
}
.topbar-search:focus-within {
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.topbar-search input::placeholder {
color: #94a3b8;
font-weight: 400;