Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(docs): improve accessibility and UI refinements

Sushmithamallesh266742e52f39
diff --git a/docs/app/global.css b/docs/app/global.css
index 9fac2712e..30aa35250 100644
--- a/docs/app/global.css
+++ b/docs/app/global.css
@@ -256,6 +256,17 @@ a:focus-visible {
padding: 0.375rem 0.5rem;
border-radius: 0.375rem;
color: var(--color-fd-foreground);
+ transition: background-color 0.15s ease;
+}
+
+#nd-sidebar [data-radix-scroll-area-viewport] a:hover,
+#nd-sidebar [data-radix-scroll-area-viewport] button:hover {
+ background-color: rgba(0, 0, 0, 0.05);
+}
+
+.dark #nd-sidebar [data-radix-scroll-area-viewport] a:hover,
+.dark #nd-sidebar [data-radix-scroll-area-viewport] button:hover {
+ background-color: rgba(255, 255, 255, 0.05);
}
#nd-sidebar [data-radix-scroll-area-viewport] a[data-active="true"] {
@@ -305,6 +316,19 @@ a:focus-visible {
Components
========================================================================== */
+/* Form inputs - remove default outline, rely on focus-visible styles */
+input:focus,
+select:focus,
+textarea:focus {
+ outline: none;
+}
+
+input:focus-visible,
+select:focus-visible,
+textarea:focus-visible {
+ outline: none;
+}
+
[data-card]:hover {
border-color: color-mix(in srgb, var(--composio-orange) 50%, transparent);
}
@@ -363,31 +387,24 @@ a:focus-visible {
outline-offset: 2px;
}
-/* Active nav link */
-#nd-nav a[data-active="true"] {
+/* Active nav link - orange indicator sits above the navbar border */
+#nd-nav nav > a[data-active="true"] {
color: var(--composio-orange);
position: relative;
}
-#nd-nav a[data-active="true"]:hover {
- background: transparent;
-}
-
-#nd-nav a[data-active="true"]::after {
+#nd-nav nav > a[data-active="true"]::after {
content: '';
position: absolute;
- bottom: -0.8rem;
- left: 0.25rem;
- right: 0.25rem;
+ bottom: 0;
+ left: 0;
+ right: 0;
height: 2px;
background: var(--composio-orange);
}
-/* Hide underline on mobile nav */
-@media (max-width: 767px) {
- #nd-nav a[data-active="true"]::after {
- display: none;
- }
+#nd-nav nav > a[data-active="true"]:hover {
+ background: transparent;
}
/* Right side items - consistent gaps */
diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx
index 8e566ce75..a39fcb3bc 100644
--- a/docs/app/layout.tsx
+++ b/docs/app/layout.tsx
@@ -18,6 +18,8 @@ export default function Layout({ children }: LayoutProps<'/'>) {
suppressHydrationWarning
>
<head>
+ <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)" />
+ <meta name="theme-color" content="#131211" media="(prefers-color-scheme: dark)" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
<link
diff --git a/docs/components/copy-link.tsx b/docs/components/copy-link.tsx
index c0e56ec36..07c2ea8c1 100644
--- a/docs/components/copy-link.tsx
+++ b/docs/components/copy-link.tsx
@@ -22,14 +22,14 @@ export function CopyLink({ href, children, className }: CopyLinkProps) {
return (
<button
onClick={handleCopy}
- className={`inline-flex items-center gap-1.5 group cursor-pointer whitespace-nowrap ${className}`}
- title="Copy link"
+ className={`inline-flex items-center gap-1.5 group cursor-pointer whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-orange-500 focus-visible:ring-offset-2 rounded ${className}`}
+ aria-label="Copy link to clipboard"
>
<span>{children}</span>
{copied ? (
- <Check className="w-3 h-3 text-green-500" />
+ <Check className="w-3 h-3 text-green-500" aria-hidden="true" />
) : (
- <Link className="w-3 h-3 opacity-0 group-hover:opacity-70 transition-opacity" />
+ <Link className="w-3 h-3 opacity-0 group-hover:opacity-70 transition-opacity" aria-hidden="true" />
)}
</button>
);
diff --git a/docs/components/figure.tsx b/docs/components/figure.tsx
index 77a114a76..1406e408d 100644
--- a/docs/components/figure.tsx
+++ b/docs/components/figure.tsx
@@ -12,6 +12,8 @@ interface FigureProps {
caption?: string;
size?: FigureSize;
className?: string;
+ width?: number;
+ height?: number;
}
const sizeClasses: Record<FigureSize, string> = {
@@ -21,7 +23,7 @@ const sizeClasses: Record<FigureSize, string> = {
full: 'max-w-full', // Full-width diagrams
};
-export function Figure({ src, alt, caption, size = 'full', className }: FigureProps) {
+export function Figure({ src, alt, caption, size = 'full', className, width, height }: FigureProps) {
const isConstrained = size !== 'full';
return (
@@ -30,6 +32,9 @@ export function Figure({ src, alt, caption, size = 'full', className }: FigurePr
<img
src={src}
alt={alt}
+ width={width}
+ height={height}
+ loading="lazy"
className={cn(
'rounded-lg border border-fd-border',
sizeClasses[size],
diff --git a/docs/components/nav-tabs.tsx b/docs/components/nav-tabs.tsx
index f4e79ff5f..f4aaefbe9 100644
--- a/docs/components/nav-tabs.tsx
+++ b/docs/components/nav-tabs.tsx
@@ -27,7 +27,7 @@ export function NavTabs() {
<Link
key={tab.href}
href={tab.href}
- className={`nav-tab ${isActive(tab.href, tab.exact) ? 'active' : ''}`}
+ className={`nav-tab focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-orange-500 focus-visible:ring-offset-2 rounded ${isActive(tab.href, tab.exact) ? 'active' : ''}`}
>
{tab.label}
</Link>
diff --git a/docs/components/provider-card.tsx b/docs/components/provider-card.tsx
index 163d50f66..e9ab4b1d0 100644
--- a/docs/components/provider-card.tsx
+++ b/docs/components/provider-card.tsx
@@ -16,7 +16,7 @@ export function ProviderCard({ name, href, logo, icon, languages }: ProviderCard
return (
<Link
href={href}
- className="flex items-center gap-5 rounded-lg border border-fd-border bg-fd-card p-5 transition-all hover:bg-fd-accent/50 hover:border-[color-mix(in_srgb,var(--composio-orange)_50%,transparent)]"
+ className="flex items-center gap-5 rounded-lg border border-fd-border bg-fd-card p-5 transition-all hover:bg-fd-accent/50 hover:border-[color-mix(in_srgb,var(--composio-orange)_50%,transparent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-orange-500 focus-visible:ring-offset-2"
>
<div className="flex h-12 w-12 shrink-0 items-center justify-center">
{logo ? (
diff --git a/docs/components/toolkits/toolkit-detail.tsx b/docs/components/toolkits/toolkit-detail.tsx
index 918d1f7f3..49bb672b7 100644
--- a/docs/components/toolkits/toolkit-detail.tsx
+++ b/docs/components/toolkits/toolkit-detail.tsx
@@ -78,8 +78,7 @@ export function ToolkitDetail({ toolkit, tools, triggers }: ToolkitDetailProps)
return tools.filter(
(tool) =>
tool.name.toLowerCase().includes(search) ||
- tool.slug.toLowerCase().includes(search) ||
- tool.description.toLowerCase().includes(search)
+ tool.slug.toLowerCase().includes(search)
);
}, [tools, toolSearch]);
@@ -89,8 +88,7 @@ export function ToolkitDetail({ toolkit, tools, triggers }: ToolkitDetailProps)
return triggers.filter(
(trigger) =>
trigger.name.toLowerCase().includes(search) ||
- trigger.slug.toLowerCase().includes(search) ||
- trigger.description.toLowerCase().includes(search)
+ trigger.slug.toLowerCase().includes(search)
);
}, [triggers, toolSearch]);
@@ -224,13 +222,16 @@ export function ToolkitDetail({ toolkit, tools, triggers }: ToolkitDetailProps)
{/* Search */}
<div className="relative">
- <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fd-muted-foreground" />
+ <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fd-muted-foreground" aria-hidden="true" />
<input
type="text"
- placeholder={`Search ${activeTab}...`}
+ name="tool-search"
+ aria-label={`Search ${activeTab}`}
+ placeholder={`Search ${activeTab}…`}
+ autoComplete="off"
value={toolSearch}
onChange={(e) => setToolSearch(e.target.value)}
- className="h-9 w-full rounded-md border border-fd-border bg-fd-background pl-9 pr-4 text-sm text-fd-foreground placeholder:text-fd-muted-foreground focus:border-fd-primary focus:outline-none focus:ring-1 focus:ring-fd-primary"
+ className="h-9 w-full rounded-md border border-fd-border bg-fd-background pl-9 pr-4 text-sm text-fd-foreground placeholder:text-fd-muted-foreground focus:outline-none focus-visible:border-orange-500/50 focus-visible:ring-2 focus-visible:ring-orange-500/20"
/>
</div>
diff --git a/docs/components/toolkits/toolkits-landing.tsx b/docs/components/toolkits/toolkits-landing.tsx
index e008cc9d2..ce394b3ab 100644
--- a/docs/components/toolkits/toolkits-landing.tsx
+++ b/docs/components/toolkits/toolkits-landing.tsx
@@ -53,10 +53,11 @@ function CopySlugButton({ slug }: { slug: string }) {
return (
<button
onClick={handleCopy}
- className="inline-flex items-center gap-1 rounded bg-fd-muted px-1.5 py-0.5 font-mono text-xs text-fd-muted-foreground transition-colors hover:text-fd-foreground"
+ aria-label={`Copy ${slug.toUpperCase()} to clipboard`}
+ className="inline-flex items-center gap-1 rounded bg-fd-muted px-1.5 py-0.5 font-mono text-xs text-fd-muted-foreground transition-colors hover:text-fd-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-orange-500"
>
<span className="max-w-[120px] truncate sm:max-w-none">{slug.toUpperCase()}</span>
- {copied ? <Check className="h-3 w-3 text-green-500" /> : <Copy className="h-3 w-3" />}
+ {copied ? <Check className="h-3 w-3 text-green-500" aria-hidden="true" /> : <Copy className="h-3 w-3" aria-hidden="true" />}
</button>
);
}
@@ -78,11 +79,11 @@ function ToolkitRow({ toolkit }: { toolkit: Toolkit }) {
{/* Right side: Counts */}
<div className="flex items-center gap-3 pl-12 text-xs text-fd-muted-foreground sm:pl-0">
<span className="flex items-center gap-1">
- <Wrench className="h-3.5 w-3.5" />
+ <Wrench className="h-3.5 w-3.5" aria-hidden="true" />
{toolkit.toolCount}
</span>
<span className="flex items-center gap-1">
- <Zap className="h-3.5 w-3.5" />
+ <Zap className="h-3.5 w-3.5" aria-hidden="true" />
{toolkit.triggerCount}
</span>
</div>
@@ -109,14 +110,13 @@ export function ToolkitsLanding() {
result = result.filter((t) => t.category === category);
}
- // Filter by search
+ // Filter by search (name and slug only)
if (search) {
const searchLower = search.toLowerCase();
result = result.filter(
(toolkit) =>
toolkit.name.toLowerCase().includes(searchLower) ||
- toolkit.slug.toLowerCase().includes(searchLower) ||
- toolkit.description.toLowerCase().includes(searchLower)
+ toolkit.slug.toLowerCase().includes(searchLower)
);
}
@@ -188,13 +188,16 @@ export function ToolkitsLanding() {
<div className="flex flex-col gap-3 sm:flex-row sm:items-center">
{/* Search */}
<div className="relative flex-1">
- <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fd-muted-foreground" />
+ <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fd-muted-foreground" aria-hidden="true" />
<input
type="text"
- placeholder="Search toolkits..."
+ name="toolkit-search"
+ aria-label="Search toolkits"
+ placeholder="Search toolkits…"
+ autoComplete="off"
value={search}
onChange={(e) => setSearch(e.target.value)}
- className="h-10 w-full rounded-lg border border-fd-border bg-fd-background pl-10 pr-4 text-sm text-fd-foreground placeholder:text-fd-muted-foreground focus:border-fd-primary focus:outline-none focus:ring-1 focus:ring-fd-primary"
+ className="h-10 w-full rounded-lg border border-fd-border bg-fd-background pl-10 pr-4 text-sm text-fd-foreground placeholder:text-fd-muted-foreground focus:outline-none focus-visible:border-orange-500/50 focus-visible:ring-2 focus-visible:ring-orange-500/20"
/>
</div>
@@ -203,7 +206,8 @@ export function ToolkitsLanding() {
<select
value={category}
onChange={(e) => setCategory(e.target.value)}
- className="h-10 w-full appearance-none rounded-lg border border-fd-border bg-fd-background pl-4 pr-10 text-sm text-fd-foreground focus:border-fd-primary focus:outline-none focus:ring-1 focus:ring-fd-primary sm:w-auto"
+ aria-label="Filter by category"
+ className="h-10 w-full appearance-none rounded-lg border border-fd-border bg-fd-background pl-4 pr-10 text-sm text-fd-foreground focus:outline-none focus-visible:border-orange-500/50 focus-visible:ring-2 focus-visible:ring-orange-500/20 sm:w-auto"
>
<option value="all">All categories</option>
{categories.map((cat) => (
diff --git a/docs/components/top-nav.tsx b/docs/components/top-nav.tsx
index 7510aa537..18b48b563 100644
--- a/docs/components/top-nav.tsx
+++ b/docs/components/top-nav.tsx
@@ -52,9 +52,9 @@ export function TopNav() {
<Link
key={item.href}
href={item.href}
- className={`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${
+ className={`px-3 py-1.5 text-sm font-medium rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-orange-500 focus-visible:ring-offset-2 ${
isActive(item.href)
- ? 'text-[var(--orange)]'
+ ? 'text-[var(--composio-orange)]'
: 'text-fd-muted-foreground hover:text-fd-foreground'
}`}
>
diff --git a/docs/components/youtube.tsx b/docs/components/youtube.tsx
index 11bcb85e3..2a5b9f0b1 100644
--- a/docs/components/youtube.tsx
+++ b/docs/components/youtube.tsx
@@ -10,6 +10,9 @@ export function YouTube({ id, title = 'YouTube video' }: YouTubeProps) {
className="h-full w-full border-0"
src={`https://www.youtube.com/embed/${id}`}
title={title}
+ width={560}
+ height={315}
+ loading="lazy"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowFullScreen
/>