Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/routes/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ export function createNotificationsRouter(pool) {
router.get('/reads', optionalAuth, async (req, res) => {
if (!req.user?.id) return res.json({ keys: [] });
try {
const result = await pool.query(
const readsRows = await pool.query(
`SELECT notification_key FROM user_notification_reads WHERE user_id = $1`,
[req.user.id]
);
res.json({ keys: result.rows.map(r => r.notification_key) });
res.json({ keys: readsRows.rows.map(r => r.notification_key) });
} catch (err) {
console.error('GET /api/notifications/reads failed:', err);
res.status(500).json({ error: 'Failed to load read state' });
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -15087,7 +15087,7 @@ button.feedback-link-inline {
border-bottom: 1px solid #f0f0f0;
}
.notification-item.unread {
background: #f3f8ee;
background: #dcebc6;
}
Comment on lines 15089 to 15091
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The new background color #dcebc6 for unread notifications combined with the meta text color #777 (defined in .notification-meta) results in a contrast ratio of approximately 3.6:1. This falls below the WCAG 2.1 Level AA minimum contrast requirement of 4.5:1 for normal text, which may make timestamps and other metadata difficult to read for users with visual impairments.

To resolve this while keeping the darker background, we can darken the meta text color specifically for unread notification items to #555 (which yields a contrast ratio of 6.0:1).

.notification-item.unread {
  background: #dcebc6;
}
.notification-item.unread .notification-meta {
  color: #555;
}

.notification-item-btn {
display: flex;
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function createBoatIcon(heading) {
return L.divIcon({
className: 'boat-marker-icon',
html: `<div class="boat-marker-inner" style="transform: rotate(${heading || 0}deg)">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200" width="29" height="29">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1200" width="38" height="38">
<path fill="#F5C518" stroke="#B8860B" stroke-width="30" stroke-linejoin="round"
d="m595.16 289.09c1.19.14 2.37.2 3.55.2 7.15 0 14.09-2.47 19.85-7.14 7.28-5.89 11.99-14.83 12.93-24.55 1.88-19.32-11.27-36.73-29.31-38.79-8.38-.96-16.68 1.5-23.4 6.93-7.28 5.89-11.99 14.84-12.93 24.55-1.87 19.33 11.28 36.73 29.31 38.79z"/>
<path fill="#F5C518" stroke="#B8860B" stroke-width="30" stroke-linejoin="round"
Expand All @@ -43,8 +43,8 @@ function createBoatIcon(heading) {
d="M600 400 L600 700"/>
</svg>
</div>`,
iconSize: [29, 29],
iconAnchor: [14, 14],
iconSize: [38, 38],
iconAnchor: [19, 19],
});
}

Expand Down
Loading