Skip to content

Commit

Permalink
refactor(web): [Task in Team] Enhance accessibility and styling consi…
Browse files Browse the repository at this point in the history
…stency for assign-user
  • Loading branch information
NdekoCode committed Nov 6, 2024
1 parent ccaef5b commit f59b88e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/web/components/pages/team/tasks/AssigneeUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ import { FC } from 'react';
const AssigneeUser: FC<{ users: IEmployee[] }> = ({ users }) => {
const employee = users && users.length > 0 ? users.at(0) : null;
return (
<div className="flex items-center gap-1.5 h-full">
<div className="flex items-center gap-1.5 h-full" role="group" aria-label="Task assignee">
{employee ? (
<div className="flex items-center gap-2.5">
<Avatar className="h-6 w-6 rounded-full">
<Avatar className="w-6 h-6 rounded-full" aria-label={`${employee.fullName}'s avatar`}>
{employee?.user?.imageUrl && (
<AvatarImage src={employee?.user?.imageUrl} alt={`${employee.fullName}'s avatar`} />
)}

<AvatarFallback>{employee.fullName.substring(0, 2)}</AvatarFallback>
<AvatarFallback aria-hidden="true">
{employee.fullName.substring(0, 2).toUpperCase()}
</AvatarFallback>
</Avatar>

<span className="text-xs font-medium text-indigo-950 dark:text-gray-200">{employee.fullName}</span>
Expand Down

0 comments on commit f59b88e

Please sign in to comment.