ES Before & After Compare documentation Accessibility, Keyboard & Touch | ES Before After

ES Before & After Compare uses an interactive slider with keyboard support and descriptive text for assistive technology. Content editors should still provide useful descriptions and verify the result in their own template.

Keyboard interaction

  1. Open the frontend page containing the comparison.
  2. Press Tab until the comparison control receives focus.
  3. Use the Left and Right arrow keys to adjust the native slider. In Top / bottom mode, Up and Down also change the reveal position.

The visible handle follows the value, and the control reports the percentage of the Before image that is visible. A focus outline helps indicate when the slider is active.

Mouse and touchscreen

  • Desktop pointer: click or drag across the image to move the separator.
  • Left / right on touch: drag horizontally across the comparison.
  • Top / bottom on touch: drag using the center handle; vertical swipes elsewhere on the image are left available for normal page scrolling.

Text descriptions for assistive technology

The image pair is represented to screen-reader users by a comparison description, the two image alternative-text fields, and a slider value that updates while the user interacts.

Enter meaningful values in Before image alternative text and After image alternative text. A good description identifies what is different, for example:

  • Before image alternative text: “Unrestored stone facade with dark staining around the windows.”
  • After image alternative text: “Same facade after cleaning, with the stone color restored.”

These are examples for writing descriptions, not sample fields that are automatically populated.

Readability and motion

Use the Divider and handle color setting to maintain a visible separator against your images. The High contrast style may be helpful for certain image/background combinations. The module also respects the browser's reduced-motion preference for nonessential animations.

Check the final comparison with keyboard alone and on a real phone, particularly if your site template adds overlays or unusual CSS.