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
5 changes: 4 additions & 1 deletion static/js/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ const NotificationManager = {

// Only show once per day for each notification
if (now - lastShown > 24 * 60 * 60 * 1000) {
if (Notification.permission === 'granted') {
// Show browser notification if supported and permission granted
if ('Notification' in window && Notification.permission === 'granted') {
const notification = new Notification('Python Deadlines Reminder', {
body: `${matchedThreshold} day${matchedThreshold > 1 ? 's' : ''} until ${conf.name} CFP closes!`,
icon: '/static/img/python-deadlines-logo.png',
Expand All @@ -288,6 +289,8 @@ const NotificationManager = {
setTimeout(() => notification.close(), 10000);
}

// Record notification attempt regardless of browser support
// This prevents duplicate notifications on browsers that don't support the API
localStorage.setItem(notifyKey, now.toString());
}
}
Expand Down
7 changes: 6 additions & 1 deletion tests/e2e/specs/search-functionality.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,12 @@ test.describe('Search Functionality', () => {
});

test.describe('Search Accessibility', () => {
test('should be keyboard navigable', async ({ page }) => {
test('should be keyboard navigable', async ({ page }, testInfo) => {
// Skip on mobile browsers - Tab key navigation doesn't work the same way on mobile
// Mobile browsers are designed for touch input, not keyboard navigation
const isMobile = testInfo.project.name.includes('mobile');
test.skip(isMobile, 'Keyboard Tab navigation is not supported on mobile browsers');

// Get the visible search input to ensure we're interacting with the right element
const searchInput = await getVisibleSearchInput(page);

Expand Down
Loading