creativecommons / creativecommons/search

[Feature] Custom Notification for Empty Search Field Instead of Browser's Native Modal

Open
#302 4 comments 0 reactions 0 assignees View on GitHub
✨ goal: improvement 💻 aspect: code 🟩 priority: low 🧹 status: ticket work required
Dominant language
CSS
Stars
27
Forks
112
PR merge metrics
No merged PRs in 30d

Description

## Problem

Currently, when the search field is empty and the search button is clicked, the browser shows a default native modal with the message: "search.creativecommons.org says please enter a value." This behavior feels inconsistent with the overall user experience and design of the site. The native modal can be abrupt and less user-friendly, especially since it doesn’t match the site's visual style.

## Description

I propose introducing a custom notification or prompt system for situations where a required input field is left empty (like the search field). Instead of relying on the browser’s default modal, we could display a properly styled and branded message within the page itself. This could be a subtle popup, a toast notification, or an inline error message that aligns with the overall UI design, improving user experience.

## Alternatives

An alternative solution could be to use a small, inline error message directly below the input field. This would avoid popups and keep the user interface clean and accessible. However, a custom notification or toast would be more visible and engaging, especially on larger screens.

## Additional context

This feature would improve the consistency and usability of the search functionality, making error handling smoother and more intuitive. It could also reduce the dependence on browser-specific error handling, which may behave differently across various browsers.

## Implementation

- [x] I would be interested in implementing this feature.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.