Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#199 Improve accessibility and usability for search input #200

Merged
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
1 change: 1 addition & 0 deletions src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function Navbar({ searchInputValue, setSearchInputValue }) {
<div className="text-2xl text-black px-6 bg-white flex content-center py-1 items-center rounded-full">
<Icon icon="bx:bx-search-alt-2" className="text-black" />
<div className="px-2"></div>
<div className="visually-hidden">Search</div>
<input
type="text"
id="search-input"
Expand Down
4 changes: 3 additions & 1 deletion src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ export default function Home() {
<div className="lg:w-2/5 md:w-3/5 sm:w-4/5 xs:w-4/5">
<div className="text-2xl text-black px-6 bg-white flex content-center py-2 items-center rounded-full">
<Icon icon="bx:bx-search-alt-2" className="text-black" />
<div className="px-2 invisible">Search</div>
<div className="px-2"></div>
<div className="visually-hidden">Search</div>
<input
type="text"
id="search-input"
name="search-input"
aria-label="ค้นหาคำภายในร่างบทบัญญัติ เลขมาตรา หรือผู้อภิปราย"
className="flex-auto focus:outline-none w-full"
autocomplete="off"
onChange={ evt => window.location.hash = '#/search' }
></input>
</div>
</div>
Expand Down
Loading