fix: react-doctor prefer-tag-over-role 25→18 (remove redundant role=status, aria-live provides semantics)
This commit is contained in:
@@ -97,7 +97,7 @@ function EmptyState({ hasFilters }: { hasFilters: boolean }) {
|
||||
// Loading skeleton (rendered as a div so it doesn't get parsed as table rows)
|
||||
function ContactSkeleton() {
|
||||
return (
|
||||
<div role="status" aria-live="polite" aria-busy="true" aria-label="Loading contacts" className="overflow-hidden rounded-xl border border-[var(--admin-border)] bg-white">
|
||||
<div aria-live="polite" aria-busy="true" aria-label="Loading contacts" className="overflow-hidden rounded-xl border border-[var(--admin-border)] bg-white">
|
||||
{[1, 2, 3, 4, 5].map((i) => (
|
||||
<div key={i} className="flex items-center gap-4 border-b border-[var(--admin-border)] px-4 py-3 last:border-b-0">
|
||||
<div className="h-4 w-24 bg-stone-200 rounded animate-pulse" />
|
||||
|
||||
@@ -29,7 +29,7 @@ export default function LoadingState({
|
||||
<div
|
||||
className={`flex flex-col items-stretch ${className}`.trim()}
|
||||
style={{ padding: "1.5rem 1rem" }}
|
||||
role="status"
|
||||
|
||||
aria-live="polite"
|
||||
aria-busy="true"
|
||||
>
|
||||
|
||||
@@ -127,7 +127,7 @@ function LogsEmptyState({ hasFilters }: { hasFilters: boolean }) {
|
||||
// Loading skeleton (rendered as a div so it doesn't get parsed as table rows)
|
||||
function LogSkeleton() {
|
||||
return (
|
||||
<div role="status" aria-live="polite" aria-busy="true" aria-label="Loading messages" className="overflow-hidden rounded-xl border border-[var(--admin-border)] bg-white">
|
||||
<div aria-live="polite" aria-busy="true" aria-label="Loading messages" className="overflow-hidden rounded-xl border border-[var(--admin-border)] bg-white">
|
||||
{[1, 2, 3, 4, 5].map((i) => (
|
||||
<div key={i} className="flex items-center gap-4 border-b border-[var(--admin-border)] px-4 py-3 last:border-b-0">
|
||||
<div className="h-3 w-20 bg-stone-200 rounded animate-pulse" />
|
||||
|
||||
@@ -43,7 +43,7 @@ export function OfflineBanner() {
|
||||
|
||||
return (
|
||||
<div
|
||||
role="status"
|
||||
|
||||
aria-live="polite"
|
||||
className="sticky top-0 z-40 w-full px-4 py-2 text-sm font-semibold"
|
||||
style={{
|
||||
|
||||
@@ -921,7 +921,7 @@ export default function WaterLogAdminPanel({
|
||||
{/* Toast */}
|
||||
{toast && (
|
||||
<div
|
||||
role="status"
|
||||
|
||||
aria-live="polite"
|
||||
className={`fixed bottom-6 right-6 z-50 rounded-xl px-4 py-3 font-medium shadow-lg transition-all ${
|
||||
toast.kind === "ok"
|
||||
|
||||
Reference in New Issue
Block a user