mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-09 20:12:26 +10:00
fix(homepage): add accessible names to footer language button and theme toggle buttons
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { t } from "@lingui/macro";
|
||||
import { useLingui } from "@lingui/react";
|
||||
import { Translate } from "@phosphor-icons/react";
|
||||
import { Button, Popover, PopoverContent, PopoverTrigger } from "@reactive-resume/ui";
|
||||
@ -13,7 +14,7 @@ export const LocaleSwitch = () => {
|
||||
return (
|
||||
<Popover open={open} onOpenChange={setOpen}>
|
||||
<PopoverTrigger asChild>
|
||||
<Button size="icon" variant="ghost">
|
||||
<Button size="icon" variant="ghost" aria-label={t`Change Language`}>
|
||||
<Translate size={20} />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { t } from "@lingui/macro";
|
||||
import { CloudSun, Moon, Sun } from "@phosphor-icons/react";
|
||||
import { useTheme } from "@reactive-resume/hooks";
|
||||
import { Button } from "@reactive-resume/ui";
|
||||
@ -25,9 +26,9 @@ export const ThemeSwitch = ({ size = 20, className }: Props) => {
|
||||
<Button size="icon" variant="ghost" className={className} onClick={toggleTheme}>
|
||||
<div className="cursor-pointer overflow-hidden" style={{ width: size, height: size }}>
|
||||
<motion.div animate={theme} variants={variants} className="flex">
|
||||
<Sun size={size} className="shrink-0" />
|
||||
<CloudSun size={size} className="shrink-0" />
|
||||
<Moon size={size} className="shrink-0" />
|
||||
<Sun size={size} className="shrink-0" aria-label={t`Switch to Light Mode`} />
|
||||
<CloudSun size={size} className="shrink-0" aria-label={t`Use System Theme`} />
|
||||
<Moon size={size} className="shrink-0" aria-label={t`Switch to Dark Mode`} />
|
||||
</motion.div>
|
||||
</div>
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user