From f7f59aa6008b20baa69c1cea77c2aa0105c77c93 Mon Sep 17 00:00:00 2001 From: code-sharad Date: Thu, 17 Sep 2026 02:05:20 +0530 Subject: [PATCH] docs: improve a11y and usability for docs homepage - add semantic landmarks (header, main, section) for assistive tech - add alt text for Cloudinary App Gallery images - add visible focus-visible styles for keyboard navigation - increase CTA touch targets to 44px - honor prefers-reduced-motion - fix nested anchor in Visit App Gallery button Fixes #628 --- docs/components/Button/Button.js | 6 +++--- docs/pages/_app.mdx | 10 ++++++---- docs/pages/index.mdx | 18 +++++++++--------- docs/styles/global.scss | 14 +++++++++++++- 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/docs/components/Button/Button.js b/docs/components/Button/Button.js index 84b88ab2..22acd138 100644 --- a/docs/components/Button/Button.js +++ b/docs/components/Button/Button.js @@ -4,8 +4,8 @@ import { cn } from '../../lib/utils'; const Button = ({ children, className = '', href, onClick }) => { let buttonColor = 'text-white bg-primary hover:bg-blue-600'; - - const buttonStyles = cn('inline-block rounded py-2.5 px-6 text-lg font-bold uppercase', buttonColor, className); + + const buttonStyles = cn('inline-block rounded py-2.5 px-6 text-lg font-bold uppercase min-h-[44px]', buttonColor, className); if ( href ) { return ( @@ -22,4 +22,4 @@ const Button = ({ children, className = '', href, onClick }) => { ) } -export default Button; \ No newline at end of file +export default Button; diff --git a/docs/pages/_app.mdx b/docs/pages/_app.mdx index 55cc73e5..90eea1da 100644 --- a/docs/pages/_app.mdx +++ b/docs/pages/_app.mdx @@ -9,15 +9,17 @@ export default function Nextra({ Component, pageProps }) { return ( <> -
+

Next Cloudinary v6 now available! View Changelog

-
- + +
+ +
); -} \ No newline at end of file +} diff --git a/docs/pages/index.mdx b/docs/pages/index.mdx index 7e2ed4c8..b88fad06 100644 --- a/docs/pages/index.mdx +++ b/docs/pages/index.mdx @@ -19,7 +19,7 @@ import Button from '../components/Button'; twitterTitle="Next Cloudinary" /> -
+

Next Cloudinary

High-performance image and video delivery and uploading at scale in Next.js powered by Cloudinary.

@@ -71,9 +71,9 @@ import Button from '../components/Button'; />

-
+ -
+

What's Inside?

    @@ -146,7 +146,7 @@ import Button from '../components/Button'; height="600" src="https://res.cloudinary.com/nextjsnpm/image/upload/v1743523379/images/photo-crate.png" sizes="50w" - alt="" + alt="Photo Crate app screenshot" />

    Photo Crate

    @@ -159,7 +159,7 @@ import Button from '../components/Button'; height="600" src="https://res.cloudinary.com/nextjsnpm/image/upload/v1743523378/images/cloudy-cam.png" sizes="50w" - alt="" + alt="Cloudy Cam app screenshot" />

    Cloudy Cam

    @@ -172,7 +172,7 @@ import Button from '../components/Button'; height="600" src="https://res.cloudinary.com/nextjsnpm/image/upload/v1743523378/images/imgto-xyz.png" sizes="50w" - alt="" + alt="Imgto.xyz app screenshot" />

    Imgto.xyz

    @@ -185,14 +185,14 @@ import Button from '../components/Button'; height="600" src="https://res.cloudinary.com/nextjsnpm/image/upload/v1743523378/images/image-carbron.png" sizes="50w" - alt="" + alt="Image Carbon app screenshot" />

    Image Carbon

- -
+ +

Transform & Deliver at Scale with Next Cloudinary

diff --git a/docs/styles/global.scss b/docs/styles/global.scss index be979f6b..5d25762a 100644 --- a/docs/styles/global.scss +++ b/docs/styles/global.scss @@ -27,4 +27,16 @@ pre { .nextra-callout a { text-decoration: underline; -} \ No newline at end of file +} + +:focus-visible { + outline: 2px solid #0284c7; /* sky-600 */ + outline-offset: 2px; +} + +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { + animation-duration: 0.01ms !important; + transition-duration: 0.01ms !important; + } +}