Skip to content

Commit

Permalink
feat/127-add-alt (#132)
Browse files Browse the repository at this point in the history
* feat: add action hover tip on each button

* fix: use a single alt attribute

---------

Co-authored-by: Victor Wildner <[email protected]>
  • Loading branch information
iaurg and vcwild committed Nov 30, 2023
1 parent e7593b2 commit c9ff948
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 5 deletions.
4 changes: 4 additions & 0 deletions frontend/src/app/(private)/game/play/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,22 @@ export default function PlayPage() {
<button
className="w-4 h-4 sm:w-8 sm:h-8 rounded-full bg-purple42-400 hover:bg-purple42-500"
onClick={() => setGameLayout("default")}
title="Trocar tema"
/>
<button
className="w-4 h-4 sm:w-8 sm:h-8 rounded-full bg-yellow-400 hover:bg-yellow-500"
onClick={() => setGameLayout("sunlight")}
title="Trocar tema"
/>
<button
className="w-4 h-4 sm:w-8 sm:h-8 rounded-full bg-blue-400 hover:bg-blue-500"
onClick={() => setGameLayout("moonlight")}
title="Trocar tema"
/>
<button
className="w-4 h-4 sm:w-8 sm:h-8 rounded-full bg-gray-800 hover:bg-gray-900"
onClick={() => setGameLayout("dark")}
title="Trocar tema"
/>
</div>
<div
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/components/Chat/ChannelCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ export default function ChannelCard({ chat }: ChannelCardProps) {
return (
<div className="bg-black42-200 flex justify-between rounded-lg items-center p-3 my-1">
<div className="flex space-x-2 items-center">
<span className="cursor-pointer" onClick={() => handleOpenChannel()}>
<span
className="cursor-pointer"
onClick={() => handleOpenChannel()}
title="Acessar chat"
>
{chat.name}
</span>
<div className="flex ml-1 space-x-1">
Expand All @@ -38,15 +42,15 @@ export default function ChannelCard({ chat }: ChannelCardProps) {
<TrashSimple
className="text-red-400 cursor-pointer"
size={18}
alt="Delete channel"
onClick={() => handleDeleteChannel()}
alt="Deletar chat"
/>
)}
<ArrowRight
className="text-purple42-200 cursor-pointer"
size={18}
alt="Open channel"
onClick={() => handleOpenChannel()}
alt="Acessar chat"
/>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Chat/ListChannels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function ListChannels({ handleShowCreateChannel }: ListChannelsProps) {
flex items-center justify-center w-9 h-9 p-2 cursor-pointer"
size={14}
onClick={handleShowCreateChannel}
alt="Criar novo canal"
/>
</div>
{isLoading ? (
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/Chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ export default function Chat() {
color="white"
onClick={() => setShowElement("showChannels")}
className="cursor-pointer"
alt="Canais"
/>
<Users
size={25}
color="white"
onClick={() => setShowElement("showFriends")}
className="cursor-pointer"
alt="Amigos"
/>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/EditUserModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default function EditUserModal() {
className="cursor-pointer"
color="white"
size={24}
alt="Editar perfil"
/>

<Transition appear show={isOpen} as={Fragment}>
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,23 @@ export default function Header() {
href="/game/play"
className="text-white font-bold rounded-full transition-all hover:bg-purple42-200
flex items-center justify-center w-12 h-12"
title="Iniciar um jogo"
>
<Play color="white" size={32} />
</Link>
<Link
href="/game"
className="text-white font-bold rounded-full transition-all hover:bg-purple42-200
flex items-center justify-center w-12 h-12"
title="Ver ranking"
>
<Trophy color="white" size={32} />
</Link>
<Link
href="/"
className="text-white font-bold rounded-full transition-all hover:bg-purple42-200
flex items-center justify-center w-12 h-12"
title="Sair"
>
<SignOut color="white" size={32} />
</Link>
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/LeaderBoardCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ export function LeaderBoardCard({
</div>
<div>
{isFriend && (
<UserPlus className="text-purple42-200 cursor-pointer" size={24} />
<UserPlus
className="text-purple42-200 cursor-pointer"
size={24}
alt="Adicionar amigo"
/>
)}
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/MFAModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default function MFAModal() {
className="cursor-pointer"
color="white"
size={24}
alt="Autenticação de dois fatores"
/>

<Transition appear show={isOpen} as={Fragment}>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ProfilePopOver/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function ProfilePopOver({
};

return (
<Popover className="relative">
<Popover className="relative" title="Ver perfil">
<Popover.Button ref={setReferenceElement} className="outline-none">
{children}
</Popover.Button>
Expand Down

0 comments on commit c9ff948

Please sign in to comment.