Skip to content

Commit

Permalink
add arialabel
Browse files Browse the repository at this point in the history
  • Loading branch information
zizdlp committed Oct 1, 2024
1 parent adee173 commit ab61315
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 9 deletions.
6 changes: 3 additions & 3 deletions zbook_frontend/src/app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ export default async function Home() {
<h1 className="max-w-2xl block">{t("SimpleDocumentation")}</h1>
<h1 className="max-w-2xl block">{t("VisuallyAppealing")}</h1>
</div>
<div className="mt-3.5 flex justify-center">
<h3 className="max-w-sm">{t("DocumentationForTeam")}</h3>
</div>
<p className="mt-4 max-w-[26rem] mx-auto md:max-w-xl text-primary dark:text-primary-light/80 md:leading-loose">
{t("DocumentationForTeam")}
</p>
</div>
<div className="px-12 mt-8 flex justify-center items-center flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-10">
<Link
Expand Down
5 changes: 4 additions & 1 deletion zbook_frontend/src/components/navbars/NavLang.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export default function NavLink() {
return (
<Listbox value={selected} onChange={setSelected}>
<div className="relative">
<Listbox.Button className="relative flex w-full cursor-pointer rounded-lg text-left focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white/75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm">
<Listbox.Button
aria-label="Select language"
className="relative flex w-full cursor-pointer rounded-lg text-left focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white/75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm"
>
<svg
stroke="currentColor"
fill="currentColor"
Expand Down
5 changes: 4 additions & 1 deletion zbook_frontend/src/components/navbars/NavNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ export default function NavNotification({
}}
>
<Badge count={unReadCount} className="text-slate-700 dark:text-slate-200">
<MdOutlineNotificationsNone className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer" />
<MdOutlineNotificationsNone
aria-label="notifications"
className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer"
/>
</Badge>
</div>
);
Expand Down
5 changes: 4 additions & 1 deletion zbook_frontend/src/components/navbars/NavTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ export default function NavLang() {
return (
<Listbox value={theme} onChange={setTheme}>
<div className="relative">
<Listbox.Button className="relative flex w-full cursor-pointer rounded-lg text-left focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white/75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm">
<Listbox.Button
aria-label="Select Theme(e.g. dark)"
className="relative flex w-full cursor-pointer rounded-lg text-left focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white/75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm"
>
<NavBarIcon
Icon={
theme == "dark"
Expand Down
15 changes: 12 additions & 3 deletions zbook_frontend/src/components/navbars/NavUserState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,29 @@ export default async function UserState() {
}}
>
<button type="submit">
<RiLogoutBoxLine className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer" />
<RiLogoutBoxLine
aria-label="Logout"
className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer"
/>
</button>
</form>
<GlobalSearchButton />
<Link href={`/workspace/${session.username}`}>
<AiOutlineUser className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer" />
<AiOutlineUser
aria-label="User Center"
className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer"
/>
</Link>
</>
);
} else {
return (
<>
<Link href={`/auth/login`}>
<RiLoginBoxLine className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer" />
<RiLoginBoxLine
aria-label="Login"
className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer"
/>
</Link>
</>
);
Expand Down
1 change: 1 addition & 0 deletions zbook_frontend/src/components/navbars/SideBarToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default function SideBarToggle() {
setSideBarOpen(!sideBarOpen);
localStorage.setItem("sidebarValue", JSON.stringify(!sideBarOpen));
}}
aria-label="sidebar toggle"
mounted={true}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function GlobalSearchButton() {
setSearchType(SearchType.DOCUMENT);
setSearchDialogOpen(true);
}}
aria-label="search"
className="block w-6 h-6 hover:text-sky-600 dark:hover:text-sky-400 cursor-pointer"
/>
);
Expand Down

0 comments on commit ab61315

Please sign in to comment.