fix: improve StatCard accessibility (aria-hidden, role='status')
This commit is contained in:
@@ -9,16 +9,14 @@ interface StatCardProps {
|
|||||||
|
|
||||||
export default function StatCard({ label, value, icon: Icon }: StatCardProps) {
|
export default function StatCard({ label, value, icon: Icon }: StatCardProps) {
|
||||||
return (
|
return (
|
||||||
<div className="flex justify-between items-center gap-2 p-4 bg-slate-900 rounded-lg">
|
<div className="flex justify-between items-center gap-2 p-4 bg-slate-900 rounded-lg" role="status">
|
||||||
{/* Icon + Label Container */}
|
|
||||||
<div className="flex items-center gap-2 min-w-0">
|
<div className="flex items-center gap-2 min-w-0">
|
||||||
{Icon && <Icon className="w-5 h-5 text-primary flex-shrink-0" />}
|
{Icon && <Icon className="w-5 h-5 text-primary flex-shrink-0" aria-hidden="true" />}
|
||||||
<span className="text-sm md:text-base text-slate-400 truncate">
|
<span className="text-sm md:text-base text-slate-400 truncate">
|
||||||
{label}
|
{label}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Number (Right) */}
|
|
||||||
<span className="text-lg md:text-xl font-black text-white whitespace-nowrap">
|
<span className="text-lg md:text-xl font-black text-white whitespace-nowrap">
|
||||||
{value}
|
{value}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user