summaryrefslogtreecommitdiff
path: root/apps/web/src/components/ui/visually-hidden.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/components/ui/visually-hidden.tsx')
-rw-r--r--apps/web/src/components/ui/visually-hidden.tsx32
1 files changed, 0 insertions, 32 deletions
diff --git a/apps/web/src/components/ui/visually-hidden.tsx b/apps/web/src/components/ui/visually-hidden.tsx
deleted file mode 100644
index 7d6fc435..00000000
--- a/apps/web/src/components/ui/visually-hidden.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-"use client";
-
-import * as React from "react";
-import { cn } from "../../lib/utils";
-
-/**
- * VisuallyHidden component provides content that is accessible to screen readers
- * but visually hidden from sighted users. This is useful for providing context
- * or labels that are necessary for accessibility but would be redundant visually.
- *
- * Based on the Radix UI VisuallyHidden primitive pattern.
- */
-const VisuallyHidden = React.forwardRef<
- HTMLSpanElement,
- React.ComponentPropsWithoutRef<"span">
->(({ className, ...props }, ref) => (
- <span
- ref={ref}
- className={cn(
- // Screen reader only styles - visually hidden but accessible
- "absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0",
- // Alternative approach using sr-only if preferred
- // "sr-only",
- className
- )}
- {...props}
- />
-));
-
-VisuallyHidden.displayName = "VisuallyHidden";
-
-export { VisuallyHidden };