Accessible Carousel & Slider – WCAG AA Compliant Slideshow
WCAG AA compliant carousel, slider & slideshow blocks: keyboard & screen-reader friendly, pause control, no autoplay, plus a card scroller.
Install in
Accessible Carousel & Slider gives the WordPress block editor two accessibility-first blocks — a hero carousel / slider and a native card scroller — built to WCAG Level AA. Use it as an accessible carousel, slider, or slideshow that is fully keyboard-operable, screen-reader friendly, and responsive, with an always-visible pause control and no forced autoplay. Both are real Gutenberg blocks with ready-made patterns you can insert and edit, and nothing is hidden from assistive technology. If you run WooCommerce, a Featured Products block (and a matching [ananyoo_featured_products] shortcode) can pull the products you have marked Featured straight into either accessible layout — the card scroller or the hero carousel — with real titles, alt text, prices and a WCAG-safe category badge, no API key or configuration. The block adds per-element toggles, a description length limit, colour controls and a live in-editor contrast check.
Live demo: Try the accessible carousel & slider demo »
New in this version
- Slide height presets (new in 2.11.0): pick Short, Medium, Tall or Full screen from the block sidebar, with no CSS to write. Full screen really does fill the visitor’s screen on a phone, because the presets use
svhand notvh, and the background picture fills the space whether the photo is portrait or landscape. You can still type an exact height, andsvh,lvhanddvhare now accepted there as well. - Featured Products block (new in 2.9.0): show your WooCommerce Featured products in either accessible layout — the card scroller or the hero carousel — and choose exactly what appears. Toggle the image, category badge, title, short description, price and “View” link on or off; set the description length in words; pick the order and how many to show; and choose the badge colour as Auto (always WCAG-safe) or Custom with a live contrast check that verifies your colour on the spot (WCAG 1.4.3). A matching
[ananyoo_featured_products]shortcode is included for quick drop-in use. No API key, no configuration; existing blocks are unchanged. - An in-editor Accessibility check with a live WCAG colour-contrast pass/fail readout for every colour pair, plus alt-text, heading and button-text checks — so you catch problems while you build.
- Full keyboard control: Left/Right arrow keys change slides and Home/End jump to the first/last slide.
- Slide changes are announced by title to screen readers, not just “Item 2 of 5”.
- Choose dots or a titled tab list for slide navigation, a visible slide counter, and a “Skip carousel” link.
- Reading-time pacing for autoplay so a slide is never advanced before it can be read (autoplay stays off by default).
- Optional, off-by-default visitor modes: a “View as list” reading mode and a dyslexia-friendly reading toggle.
- Windows High Contrast (forced-colors) support throughout.
Hero carousel (built to the W3C/WAI Carousels tutorial): each slide has a background image and a solid “contrast box” holding a heading, a paragraph, and an optional button, placed left, right, or bottom. The solid box guarantees readable text contrast over any image. No autoplay by default; when enabled, a configurable pause/stop control is always shown.
Card scroller: a native CSS scroll-snap row of cards. Because it uses real browser scrolling, it works with the keyboard, touch, the scrollbar, and screen readers with no JavaScript — and nothing is hidden from assistive technology, avoiding the focusable-but-hidden trap common to multi-slide carousels. “Cards per view” is pure CSS (it steps down to 2 then 1 on smaller screens), and there is no autoplay.
Patterns: insert ready-made layouts (hero overlay, hero card, autoplay showcase, minimal, features row, services row) from the Accessible Carousel category, then edit freely. To save your own configured layout as a template, use WordPress’s built-in “Create pattern” on the block toolbar.
Carousel accessibility features
- Carousel is a labelled region containing a semantic list of slides; with JavaScript off it degrades to a readable list.
- Controls are real buttons, fully keyboard operable, with no keyboard trap.
- Keyboard focus is never moved by next/previous or by auto-advance.
- A polite live region announces the new slide by title (e.g. “Slide 2 of 5: …”) on user-initiated changes; auto-rotation stays silent so it does not interrupt screen reader users.
- Full keyboard control: Left/Right arrow keys change slides and Home/End jump to the first/last slide, in addition to the on-screen buttons.
- A visible “2 / 5” slide-position indicator, plus an in-editor Accessibility check that flags weak colour contrast, missing alt text and vague button text as you build.
- Choose dots or a titled tab-list for slide navigation, and a “Skip carousel” link (WCAG 2.4.1) for keyboard users.
- Optional, off-by-default visitor modes: a “View as list” reading mode and a dyslexia-friendly reading toggle.
- No autoplay by default; when enabled, a stop/start control is always provided (WCAG 2.2.2), rotation pauses on hover and focus, and reading-time pacing can give each slide enough time to be read.
- Transition animations (fade or slide) are disabled automatically under prefers-reduced-motion.
- Background images are decorative by default, with a real alt-text option when the image is meaningful.
- Solid contrast box, 44px control targets, and a high-visibility focus indicator.
Card scroller accessibility features
- Native CSS scroll-snap: keyboard, touch, scrollbar, and screen readers all work with no JavaScript.
- The scroll region is itself keyboard-focusable and labelled, so it can be scrolled with the arrow keys.
- Cards are a real list; nothing is set to aria-hidden, so there is no focusable-but-hidden content.
- Each card link carries hidden context (e.g. “Learn more – Design”) so repeated links have distinct names (WCAG 2.4.4).
- No autoplay. Optional previous/next buttons are added only when the cards overflow, so there are never dead controls.
- “Cards per view” is responsive by CSS (desktop value, capped at 2 on tablet and 1 on mobile).
Links
- Plugin home & documentation
- Live demo
- More accessibility plugins from Ananyoo — further WordPress accessibility plugins are in active development.
- Support & contact
Privacy
This plugin collects no data, contacts no external services, and adds no front-end links.
Written by Joobi from the project's own listing. See the source page
2.11.8
- Code quality (Plugin Check). The carousel template no longer writes to
the $content variable that WordPress passes to it. The slide markup
with fetchpriority=”low” on later slides is kept in a prefixed
variable of its own ($anacb_slides_html), as the rule
WordPress.NamingConventions.PrefixAllGlobals asks. The page output is
the same as in 2.11.7.
2.11.7
- Slide images print all their attributes on one line, with one space
before each. WordPress looks for ” srcset=”, ” width=” and ” height=”
with a space in front; with each attribute on its own line (2.11.6)
it did not see them and added a second copy of each, which is
invalid HTML (duplicate attributes). The page looked and worked the
same, because browsers use the first copy.
2.11.6
- No more page jump while the page loads. Until now every slide showed
one under the other until the carousel script ran; then the carousel
folded to one slide and all the content below it jumped up the page.
PageSpeed counted this as a full-screen layout shift (Cumulative
Layout Shift 0.8 to 1.0, the biggest loss in the Performance score).
Now the first paint already looks like the finished carousel: slide 1
shows, the other slides wait hidden in the same place, and the height
of the control bar is kept free. Visitors with JavaScript turned off
still get every slide as a readable list. - Responsive slide images. When a slide image is in the Media Library,
the slide now prints srcset, sizes, width and height, so a phone
downloads a 768px copy instead of the full 1920px original. Older
slides that only stored the image URL are matched to their Media
Library image automatically. - Slides after the first load their images with fetchpriority=”low”,
so they no longer compete with the first slide while the page loads.
2.11.5
- Featured products cards in the card scroller: the dark band now sits
only at the bottom of the card, behind the title and price, so the
cover image shows in full brightness again. Before this fix the band
stretched over the whole cover, which made the covers look dark and
moved the title to the top of the card, where white text could fall
on a bright cover (WCAG 1.4.3). The title and price are back on the
dark band at the bottom.
2.11.4
- Featured products carousel: the price is printed in a
<
div> instead of a
<
p>, so a short bold price is no longer reported as a possible heading.
It looks the same.
2.11.3
- Skip carousel link is fixed to the top-left of the screen while it has
focus, above any sticky or see-through site header, so its contrast is
never reduced by a header laid over the carousel (WCAG 1.4.3).
2.11.2
- Slide buttons add the slide heading for screen readers, so “See more”
is announced as “See more: {heading}” (WCAG 2.4.4). - Pause / Play now announces “Carousel paused” or “Carousel playing”
through a polite status region (WCAG 4.1.3). - Skip carousel link keeps white on navy on focus and uses a two-tone
focus ring that holds 3:1 over any slide image (WCAG 1.4.11, 2.4.7).
2.11.1
- Hidden link context now uses a colon, not an en dash. Card and WooCommerce
featured links add the item name for screen readers, so “View case study”
is announced as “View case study: Anandodhara”. The separator was an en
dash, which some screen readers read aloud as “en dash” and which broke a
plain-hyphen house style on the page. The visible text still starts the
accessible name, so WCAG 2.5.3 Label in Name is unchanged.
2.11.0
- New: Slide height presets on the Accessible Carousel block. Short, Medium,
Tall and Full screen are one choice in the sidebar, so a full height hero
no longer needs any CSS. - Fixed: the Slide height field silently dropped svh, lvh and dvh values.
Only vh was on the allowed list, so a perfectly good value like 100svh was
thrown away without a word and the slide kept its default height. All three
units are accepted now, for Maximum width as well. - The presets use svh rather than vh on purpose. On a phone, 100vh is taller
than the part of the screen the visitor can see, so the foot of a full
height slide hides behind the browser bar. svh is the honest visible
height. - Nothing changes for an existing carousel. A block that has no slide height
set keeps the height it has today.
2.10.0
- New: a Patterns screen under Accessible Carousel, where an administrator
ticks which of the six bundled patterns are offered in the editor. Asked
for on the support forum by @room34alt, who wanted patterns his clients do
not need kept out of their way. -
New: an anacb_patterns filter for developers, carrying the whole pattern
list before registration:add_filter( 'anacb_patterns', function ( $patterns ) { unset( $patterns['ananyoo/hero-soft'] ); return $patterns; } );The filter runs after the screen, so code has the final say and can also
put back a pattern the screen switched off. - Nothing is removed and nothing changes on an existing site. The setting
records the patterns switched OFF, so every pattern stays available until
somebody unticks it, and a pattern added in a later release will arrive
switched on rather than silently missing. A page already built with a
pattern is never affected, because its blocks live in the page content. - The Settings link on the Plugins screen now opens the new screen, and the
How to use link opens the About page, which is what each one always said. - Added uninstall.php. Deleting the plugin now removes the one option it
stores, on every site of a multisite network as well.
2.9.6
- Removes role=”presentation” from decorative slide and card images. An img
with an empty alt is already presentational, so the HTML specification does
not allow a role attribute on it at all. The W3C Nu checker reported one
error for every decorative image on the page. Nothing changes for screen
reader users, because the empty alt was already doing that work. - Same correction in the WooCommerce featured slider template.
- The featured products scroller card body is a div again instead of a span.
A span may only hold phrasing content, so the heading inside it was not
valid. The class already sets display flex, so the card looks exactly the
same, to the pixel.
2.9.5
- Compatibility: “Tested up to” raised to WordPress 7.1. Reviewed against the 7.1 changes — the carousel, slider, card and scroller blocks already use Block API version 3 (iframe-native) and the plugin ships as plain vanilla JavaScript with no jQuery UI, so the fully iframed editor and the jQuery UI 1.14.2 update in 7.1 need no code change.
2.9.4
- Fix: on the Featured Products full-cover cards the WHOLE card now really is clickable, not just the title. The previous version used a stretched pseudo-element on the title link, but because the title sits inside the (positioned) dark band, that invisible click layer only covered the band — so the cursor showed “clickable” over the cover image while a click there did nothing. Each card is now a single real anchor wrapping the cover and the text, so every pixel follows the link. Accessibility is unchanged/cleaner: the cover image is decorative (alt=””) and the category chip is aria-hidden, so the link’s accessible name is the product title; one link per card, no nested interactive elements.
2.9.3
- Fix: Featured Products cards could collapse to zero height (the section looked empty) because the full-cover cover image is positioned absolutely and left the card with no height of its own. Cards now use a fixed 3:4 portrait ratio, so every book / magazine cover shows at a consistent height.
- Fix: a full-bleed section using “width: 100vw” includes the vertical scrollbar’s width, which pushed the page ~15px wider and showed an unwanted horizontal scrollbar at the bottom of the window. The root element is now clipped on the X axis, removing that phantom scrollbar without affecting vertical scroll or sticky headers.
2.9.2
- Featured Products: new full-cover card design — the product cover fills the card and the title (now a clickable link to the product) and price sit over a WCAG-safe dark band at the bottom. The whole card is clickable; only the title is the link, so screen readers announce a clean product name. Covers show from the top so book/magazine titles stay visible.
2.9.1
- Fix: the card scroller could push a page-level horizontal scrollbar in some full-site-editing / flow layouts when many cards were shown. The scroller now contains its horizontal overflow to the component (
overflow-x: clipon.aac-scroller); the viewport still scrolls on its own axis and the previous/next controls are unaffected.
2.9.0
- New: Featured Products block (
anacb/featured-products). Show your WooCommerce Featured products in EITHER accessible layout — the card scroller or the hero carousel — chosen per instance. Reuses the same keyboard operation, roving focus, forced-colors support and (for the carousel) skip link, live region and dots as the other blocks; only the source of the cards is WooCommerce. - New: full per-instance control — toggle the image, category badge, title, short description, price and “View” link on or off; set the description length in words; choose how many products, the order and a category filter; and pick the “View” control as a link or a button.
- New: badge colour is Auto (always at least 4.5:1 with the badge text) or Custom, with a live in-editor contrast readout that verifies a custom colour against WCAG 1.4.3 on the spot — the same checker the other blocks use.
- New: an optional section heading (text, level H2–H4 and intro), with the products region labelled by that heading for screen readers.
- The
[ananyoo_featured_products]shortcode gains the same options (display,style, per-elementshow_*,subtitle_words,orderby,cta_style,badge_color,heading, …) and now shares one renderer with the block, so both always produce identical markup. - Fix: product/scroller images now always crop to their card ratio (added
height:autoso an image’s own width/height attributes no longer override the CSSaspect-ratio), keeping every card the same height. - No breaking changes; all existing blocks and the 2.8.0 shortcode render exactly as before.
2.8.0
- New: WooCommerce “Featured products” source. The shortcode
[ananyoo_featured_products]renders the products you have marked Featured as cards inside the accessible card scroller — reusing the same keyboard operation, roving focus, focus-moves-to-the-revealed-card behaviour and forced-colors support as the block. Nothing about the WCAG guarantees changes; only the source of the cards is WooCommerce. - Each product card carries a real title, the product image with the product name as alt text, an optional short description, the price, and a “View” link with hidden context so repeated links have distinct names (WCAG 2.4.4).
- Category badge colours are chosen to always meet at least 4.5:1 contrast with white text (WCAG 1.4.3).
- Attributes:
count(default 8),per_view(1–6, default 3),category(optional slug filter),subtitle(“excerpt” | “category” | “none”),show_price(“yes” | “no”),label,cta. Safe no-op when WooCommerce is not active or no products are featured. - No breaking changes; all existing blocks render exactly as before.
2.7.5
- New: a “Pause on mouse hover” toggle in the Autoplay settings (on by default, so nothing changes for existing carousels). Turn it off for full-width or full-height hero carousels, where the mouse is nearly always over the slides and hover-pause would keep the rotation stopped. Requested by @tonfarbe.
- Keyboard focus-pause and the always-visible Pause/Play control are never affected by this option, so WCAG 2.2.2 (Pause, Stop, Hide) stays satisfied either way, and autoplay still never runs for visitors who prefer reduced motion.
- No breaking changes; existing carousels render exactly as before.
2.7.4
- Fix: with autoplay on, the stop/start control now reads “Pause” from the moment the carousel loads. Earlier it wrongly read “Play” until the first hover, even though the slideshow was already rotating. Props @tonfarbe for the report.
- Fix: moving the mouse over the carousel (arrows, dots or the slide itself) no longer flips the Pause/Play control. Hovering still quietly pauses the rotation (WCAG 2.2.2), but the control now shows only the state the visitor chose and changes only when the visitor acts on a control.
- Fix: clicking “Pause” while the mouse was inside the carousel could restart the slideshow instead of stopping it (same root cause). The control now toggles the visitor’s chosen state reliably.
- Improvement: auto-rotation no longer resumes on mouse-leave while keyboard focus is still inside the carousel.
- No breaking changes; existing carousels render exactly as before.
2.7.3
- Fix: mobile control layout. On narrow screens the titled-tab navigation now gets its own full-width row beneath the arrows and counter instead of being squeezed into a cramped column, and the control bar reflows gracefully instead of letting the counter, dots and play button collide.
- No breaking changes; existing carousels render exactly as before.
2.7.2
- Fix: the “Skip carousel” link is now hidden off-screen instead of with opacity, so its full white-on-navy contrast is reported correctly by automated tools (it was a false “low contrast” flag; the link was always readable on focus). Behaviour for keyboard and screen-reader users is unchanged.
- No breaking changes; existing carousels render exactly as before.
2.7.1
- Fix: the visible “2 / 5” slide counter now sits in its own solid navy pill, so it passes WCAG 1.4.3 contrast on any background, including the overlay layout where it previously relied on white text over a light page (WCAG 1.4.3).
- Fix: the counter now stays visible under Windows High Contrast / forced-colors, using the system Canvas and CanvasText colours with a border.
- No breaking changes; existing carousels render exactly as before.
2.7.0
- New: full keyboard navigation for the carousel — Left/Right arrow keys move between slides and Home/End jump to the first and last slide (WAI-ARIA Authoring Practices). Typing in a field is never hijacked.
- New: slide-change announcements now speak the slide’s own title (for example “Slide 2 of 5: Designed to WCAG 2.2 AA”) instead of just a number, so the change is meaningful (WCAG 4.1.3).
- New: choose your slide navigation — keep the compact dots, or switch to a titled tab list that shows each slide’s heading (easier to recognise). Dots stay the default.
- New: reading-time pacing for autoplay — when autoplay is on, each slide can stay long enough to read its own text (about 200 words a minute) instead of a fixed interval, so nothing advances too soon (WCAG 2.2.2). Autoplay itself stays off by default.
- New (opt-in): a visitor “View as list” reading mode that unfolds the carousel into a plain vertical list for people who prefer to read everything at once.
- New (opt-in): a visitor “Easier reading” toggle that increases letter, word and line spacing and left-aligns the carousel text for dyslexia-friendly reading.
- The two visitor modes are off by default and their small extra script/styles apply only when a site owner switches them on, so the default carousel stays lean.
- No breaking changes; existing carousels render exactly as before.
2.6.0
- New: a live “Accessibility check” panel in the editor for the Hero Slide and Scroller Card blocks. It checks, as you edit, the WCAG colour contrast of every colour pair (text on box/card background, heading on background, and button text on its button), whether the image has alt text or is marked decorative, whether the heading is filled in, and whether the button/link text is meaningful (WCAG 2.4.4). Each result is shown with an icon, wording and colour, so it never relies on colour alone (WCAG 1.4.1).
- New: the colour-contrast check uses the correct WCAG 1.4.3 threshold automatically — 3:1 for large or bold headings, 4.5:1 for body text.
- New: a visible “2 / 5” slide-position indicator on the carousel, alongside the existing screen-reader announcement (helps low-vision and cognitive users). It is aria-hidden to avoid a double announcement.
- New: a “Skip carousel” link (hidden until focused) so keyboard users can jump past the carousel (WCAG 2.4.1 Bypass Blocks).
- New: Windows High Contrast / forced-colors support for the carousel, card scroller and the admin page — focus rings, the active dot and controls stay visible when the OS overrides colours.
- Backend: the plugin’s “How to use” admin page no longer adds a second banner landmark, and every link that opens a new tab now says so to screen-reader users (WCAG G201).
- No breaking changes; existing carousels and cards render exactly as before.
2.5.6
- New: added a “Settings” link on the Plugins screen that opens the plugin’s Accessible Carousel dashboard, next to the existing “How to use” link.
- Readme: the description now reads “WCAG AA” instead of “WCAG 2.2 AA”, so the conformance wording does not need editing when a newer WCAG version is published. Specific success-criterion numbers are unchanged.
- Internal: synced the four block.json versions to the plugin version (they had lagged at 2.4.3).
2.5.5
- Previous/next arrows are now crisp inline SVG chevrons (using currentColor, so they follow the theme colour and Windows High Contrast mode) instead of thin text glyphs.
- Pause/Play button has a fixed minimum width, so the label swap no longer shifts the dot navigation (better stability for screen-magnifier users).
Follow this listing's changes (Atom feed)