@devries-cameron20 / composio Mirror · read-only / commits / 266742e52
Fork 0

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

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 14:30 UTC

fix(docs): improve accessibility and UI refinements

- Add aria-labels, aria-hidden to icons and form controls - Add focus-visible states with subtle orange highlight - Fix CSS variable (--orange → --composio-orange) - Add meta theme-color for light/dark modes - Add loading="lazy" and dimensions to images/iframes - Add sidebar hover states for light/dark modes - Simplify search to name/slug only (remove description) - Fix nav active indicator positioning Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Sushmithamallesh committed Jan 18, 2026 at 23:38 UTC 266742e52f398fd64c06981de862ae0117f29f90
10 files changed +74 -42
docs/app/global.css
+32 -15
@@ -256,6 +256,17 @@ a:focus-visible {
256 padding: 0.375rem 0.5rem;
257 border-radius: 0.375rem;
258 color: var(--color-fd-foreground);
259 + transition: background-color 0.15s ease;
260 +}
261 +
262 +#nd-sidebar [data-radix-scroll-area-viewport] a:hover,
263 +#nd-sidebar [data-radix-scroll-area-viewport] button:hover {
264 + background-color: rgba(0, 0, 0, 0.05);
265 +}
266 +
267 +.dark #nd-sidebar [data-radix-scroll-area-viewport] a:hover,
268 +.dark #nd-sidebar [data-radix-scroll-area-viewport] button:hover {
269 + background-color: rgba(255, 255, 255, 0.05);
270 }
271
272 #nd-sidebar [data-radix-scroll-area-viewport] a[data-active="true"] {
@@ -305,6 +316,19 @@ a:focus-visible {
316 Components
317 ========================================================================== */
318
319 +/* Form inputs - remove default outline, rely on focus-visible styles */
320 +input:focus,
321 +select:focus,
322 +textarea:focus {
323 + outline: none;
324 +}
325 +
326 +input:focus-visible,
327 +select:focus-visible,
328 +textarea:focus-visible {
329 + outline: none;
330 +}
331 +
332 [data-card]:hover {
333 border-color: color-mix(in srgb, var(--composio-orange) 50%, transparent);
334 }
@@ -363,31 +387,24 @@ a:focus-visible {
387 outline-offset: 2px;
388 }
389
366 -/* Active nav link */
367 -#nd-nav a[data-active="true"] {
390 +/* Active nav link - orange indicator sits above the navbar border */
391 +#nd-nav nav > a[data-active="true"] {
392 color: var(--composio-orange);
393 position: relative;
394 }
395
372 -#nd-nav a[data-active="true"]:hover {
373 - background: transparent;
374 -}
375 -
376 -#nd-nav a[data-active="true"]::after {
396 +#nd-nav nav > a[data-active="true"]::after {
397 content: '';
398 position: absolute;
379 - bottom: -0.8rem;
380 - left: 0.25rem;
381 - right: 0.25rem;
399 + bottom: 0;
400 + left: 0;
401 + right: 0;
402 height: 2px;
403 background: var(--composio-orange);
404 }
405
386 -/* Hide underline on mobile nav */
387 -@media (max-width: 767px) {
388 - #nd-nav a[data-active="true"]::after {
389 - display: none;
390 - }
406 +#nd-nav nav > a[data-active="true"]:hover {
407 + background: transparent;
408 }
409
410 /* Right side items - consistent gaps */
docs/app/layout.tsx
+2
@@ -18,6 +18,8 @@ export default function Layout({ children }: LayoutProps<'/'>) {
18 suppressHydrationWarning
19 >
20 <head>
21 + <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)" />
22 + <meta name="theme-color" content="#131211" media="(prefers-color-scheme: dark)" />
23 <link rel="preconnect" href="https://fonts.googleapis.com" />
24 <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
25 <link
docs/components/copy-link.tsx
+4 -4
@@ -22,14 +22,14 @@ export function CopyLink({ href, children, className }: CopyLinkProps) {
22 return (
23 <button
24 onClick={handleCopy}
25 - className={`inline-flex items-center gap-1.5 group cursor-pointer whitespace-nowrap ${className}`}
26 - title="Copy link"
25 + 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}`}
26 + aria-label="Copy link to clipboard"
27 >
28 <span>{children}</span>
29 {copied ? (
30 - <Check className="w-3 h-3 text-green-500" />
30 + <Check className="w-3 h-3 text-green-500" aria-hidden="true" />
31 ) : (
32 - <Link className="w-3 h-3 opacity-0 group-hover:opacity-70 transition-opacity" />
32 + <Link className="w-3 h-3 opacity-0 group-hover:opacity-70 transition-opacity" aria-hidden="true" />
33 )}
34 </button>
35 );
docs/components/figure.tsx
+6 -1
@@ -12,6 +12,8 @@ interface FigureProps {
12 caption?: string;
13 size?: FigureSize;
14 className?: string;
15 + width?: number;
16 + height?: number;
17 }
18
19 const sizeClasses: Record<FigureSize, string> = {
@@ -21,7 +23,7 @@ const sizeClasses: Record<FigureSize, string> = {
23 full: 'max-w-full', // Full-width diagrams
24 };
25
24 -export function Figure({ src, alt, caption, size = 'full', className }: FigureProps) {
26 +export function Figure({ src, alt, caption, size = 'full', className, width, height }: FigureProps) {
27 const isConstrained = size !== 'full';
28
29 return (
@@ -30,6 +32,9 @@ export function Figure({ src, alt, caption, size = 'full', className }: FigurePr
32 <img
33 src={src}
34 alt={alt}
35 + width={width}
36 + height={height}
37 + loading="lazy"
38 className={cn(
39 'rounded-lg border border-fd-border',
40 sizeClasses[size],
docs/components/nav-tabs.tsx
+1 -1
@@ -27,7 +27,7 @@ export function NavTabs() {
27 <Link
28 key={tab.href}
29 href={tab.href}
30 - className={`nav-tab ${isActive(tab.href, tab.exact) ? 'active' : ''}`}
30 + 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' : ''}`}
31 >
32 {tab.label}
33 </Link>
docs/components/provider-card.tsx
+1 -1
@@ -16,7 +16,7 @@ export function ProviderCard({ name, href, logo, icon, languages }: ProviderCard
16 return (
17 <Link
18 href={href}
19 - 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)]"
19 + 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"
20 >
21 <div className="flex h-12 w-12 shrink-0 items-center justify-center">
22 {logo ? (
docs/components/toolkits/toolkit-detail.tsx
+8 -7
@@ -78,8 +78,7 @@ export function ToolkitDetail({ toolkit, tools, triggers }: ToolkitDetailProps)
78 return tools.filter(
79 (tool) =>
80 tool.name.toLowerCase().includes(search) ||
81 - tool.slug.toLowerCase().includes(search) ||
82 - tool.description.toLowerCase().includes(search)
81 + tool.slug.toLowerCase().includes(search)
82 );
83 }, [tools, toolSearch]);
84
@@ -89,8 +88,7 @@ export function ToolkitDetail({ toolkit, tools, triggers }: ToolkitDetailProps)
88 return triggers.filter(
89 (trigger) =>
90 trigger.name.toLowerCase().includes(search) ||
92 - trigger.slug.toLowerCase().includes(search) ||
93 - trigger.description.toLowerCase().includes(search)
91 + trigger.slug.toLowerCase().includes(search)
92 );
93 }, [triggers, toolSearch]);
94
@@ -224,13 +222,16 @@ export function ToolkitDetail({ toolkit, tools, triggers }: ToolkitDetailProps)
222
223 {/* Search */}
224 <div className="relative">
227 - <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fd-muted-foreground" />
225 + <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fd-muted-foreground" aria-hidden="true" />
226 <input
227 type="text"
230 - placeholder={`Search ${activeTab}...`}
228 + name="tool-search"
229 + aria-label={`Search ${activeTab}`}
230 + placeholder={`Search ${activeTab}…`}
231 + autoComplete="off"
232 value={toolSearch}
233 onChange={(e) => setToolSearch(e.target.value)}
233 - 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"
234 + 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"
235 />
236 </div>
237
docs/components/toolkits/toolkits-landing.tsx
+15 -11
@@ -53,10 +53,11 @@ function CopySlugButton({ slug }: { slug: string }) {
53 return (
54 <button
55 onClick={handleCopy}
56 - 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"
56 + aria-label={`Copy ${slug.toUpperCase()} to clipboard`}
57 + 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"
58 >
59 <span className="max-w-[120px] truncate sm:max-w-none">{slug.toUpperCase()}</span>
59 - {copied ? <Check className="h-3 w-3 text-green-500" /> : <Copy className="h-3 w-3" />}
60 + {copied ? <Check className="h-3 w-3 text-green-500" aria-hidden="true" /> : <Copy className="h-3 w-3" aria-hidden="true" />}
61 </button>
62 );
63 }
@@ -78,11 +79,11 @@ function ToolkitRow({ toolkit }: { toolkit: Toolkit }) {
79 {/* Right side: Counts */}
80 <div className="flex items-center gap-3 pl-12 text-xs text-fd-muted-foreground sm:pl-0">
81 <span className="flex items-center gap-1">
81 - <Wrench className="h-3.5 w-3.5" />
82 + <Wrench className="h-3.5 w-3.5" aria-hidden="true" />
83 {toolkit.toolCount}
84 </span>
85 <span className="flex items-center gap-1">
85 - <Zap className="h-3.5 w-3.5" />
86 + <Zap className="h-3.5 w-3.5" aria-hidden="true" />
87 {toolkit.triggerCount}
88 </span>
89 </div>
@@ -109,14 +110,13 @@ export function ToolkitsLanding() {
110 result = result.filter((t) => t.category === category);
111 }
112
112 - // Filter by search
113 + // Filter by search (name and slug only)
114 if (search) {
115 const searchLower = search.toLowerCase();
116 result = result.filter(
117 (toolkit) =>
118 toolkit.name.toLowerCase().includes(searchLower) ||
118 - toolkit.slug.toLowerCase().includes(searchLower) ||
119 - toolkit.description.toLowerCase().includes(searchLower)
119 + toolkit.slug.toLowerCase().includes(searchLower)
120 );
121 }
122
@@ -188,13 +188,16 @@ export function ToolkitsLanding() {
188 <div className="flex flex-col gap-3 sm:flex-row sm:items-center">
189 {/* Search */}
190 <div className="relative flex-1">
191 - <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fd-muted-foreground" />
191 + <Search className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fd-muted-foreground" aria-hidden="true" />
192 <input
193 type="text"
194 - placeholder="Search toolkits..."
194 + name="toolkit-search"
195 + aria-label="Search toolkits"
196 + placeholder="Search toolkits…"
197 + autoComplete="off"
198 value={search}
199 onChange={(e) => setSearch(e.target.value)}
197 - 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"
200 + 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"
201 />
202 </div>
203
@@ -203,7 +206,8 @@ export function ToolkitsLanding() {
206 <select
207 value={category}
208 onChange={(e) => setCategory(e.target.value)}
206 - 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"
209 + aria-label="Filter by category"
210 + 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"
211 >
212 <option value="all">All categories</option>
213 {categories.map((cat) => (
docs/components/top-nav.tsx
+2 -2
@@ -52,9 +52,9 @@ export function TopNav() {
52 <Link
53 key={item.href}
54 href={item.href}
55 - className={`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${
55 + 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 ${
56 isActive(item.href)
57 - ? 'text-[var(--orange)]'
57 + ? 'text-[var(--composio-orange)]'
58 : 'text-fd-muted-foreground hover:text-fd-foreground'
59 }`}
60 >
docs/components/youtube.tsx
+3
@@ -10,6 +10,9 @@ export function YouTube({ id, title = 'YouTube video' }: YouTubeProps) {
10 className="h-full w-full border-0"
11 src={`https://www.youtube.com/embed/${id}`}
12 title={title}
13 + width={560}
14 + height={315}
15 + loading="lazy"
16 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
17 allowFullScreen
18 />