Implement Custom Inline Error Message for Empty Search Field#314
Implement Custom Inline Error Message for Empty Search Field#314SylviaUzoh1 wants to merge 5 commits intocreativecommons:mainfrom
Conversation
✅ Deploy Preview for cc-search-portal ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
@SylviaUzoh1 this is looking good so far! the message itself should display for the input on all screen sizes, not just smaller sizes. Was there a reason you only included it on smaller screen sizes? |
@possumbilities, the initial implementation targeted smaller screens to keep the error message close to the input field. I've now updated it to display across all screen sizes for consistency and a better user experience. Let me know if there's anything else you'd like me to adjust! |
Fixes
Description
This pull request addresses the issue where an empty search field caused the browser to display a native modal message that was inconsistent with the site's user experience. Instead of relying on the browser's default behavior, this PR introduces a custom inline error message to guide users to enter a search term in a more visually consistent and user-friendly manner.
Technical details
Tests
Screenshots
Before:


After:


Checklist
Update index.md).mainormaster).visible errors.
Developer Certificate of Origin
For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."
Developer Certificate of Origin