Ensuring ESHOPMAN Accessibility: Making Storefront Toasts User-Friendly for All

At Move My Store, we champion the power of the ESHOPMAN platform for building dynamic, headless commerce experiences integrated seamlessly with HubSpot. A cornerstone of a truly exceptional user experience, both within the ESHOPMAN Admin Dashboard and on storefronts deployed via HubSpot CMS, is accessibility. Our vibrant ESHOPMAN community frequently shares insights that help us all build better, more inclusive digital commerce solutions.

The Challenge: Unnamed Dismiss Buttons in ESHOPMAN Toasts

A recent community discussion highlighted a critical accessibility concern related to dismissable toast notifications within ESHOPMAN's UI components. These toasts, commonly used for temporary messages like 'Payment failed' or 'Item added to cart', often include a small '✕' button to dismiss them. The issue identified was that this dismiss button, while visually present, lacked an accessible name.

For users relying on screen readers, an unnamed button is announced simply as 'button' without any context. This violates WCAG 2.1, 4.1.2 Name, Role, Value, making it difficult for these users to understand the button's purpose and interact with it effectively. This problem impacts any ESHOPMAN application utilizing these UI components, including the ESHOPMAN Admin Dashboard itself and custom storefronts built with ESHOPMAN's Node.js/TypeScript foundation.

Technical Breakdown of the Issue

The core of the problem lies in how the dismiss button is rendered. When a toast is configured as dismissable: true, the close button is typically an IconButton containing only an SVG icon (like an 'XMark') without any accompanying text or accessibility attributes. Here's a simplified representation of the problematic code structure:

{!!dismissable && (
size="2xsmall"
variant="transparent"
type="button"
=> toast.dismiss(id)}
>


)}

In the accessibility tree, this button appears as an unnamed button element with an img child (representing the SVG), providing no semantic meaning to assistive technologies:

- listitem:
- text: Payment failedRetry the payment from the orders page.
- button:
- img

The ESHOPMAN Community Solution: Ensuring Accessible Names

The solution proposed and adopted by the ESHOPMAN community is straightforward yet impactful: explicitly providing an accessible name for the dismiss button. This can be achieved by adding an aria-label attribute to the IconButton component. This attribute provides a descriptive text label that screen readers can announce, giving users clear context about the button's function.

Implementing the Fix

To resolve this, ESHOPMAN developers should ensure their IconButton components for toast dismiss actions include an aria-label, ideally with a translatable string for internationalization:

{!!dismissable && (
size="2xsmall"
variant="transparent"
type="button"
=> toast.dismiss(id)}
aria-label="Dismiss"
>


)}

By adding aria-label="Dismiss", the button will now be announced as 'Dismiss button' by screen readers, significantly improving usability for all ESHOPMAN users.

Why This Matters for ESHOPMAN Merchants and Developers

Prioritizing accessibility is not just about compliance; it's about expanding your merchant's reach and enhancing the overall user experience on their ESHOPMAN storefronts. An accessible ESHOPMAN store, powered by HubSpot CMS, ensures that every potential customer can navigate and interact with the site effectively, regardless of their abilities. For developers, adopting these best practices strengthens the quality and robustness of your ESHOPMAN implementations.

This insight underscores the commitment of the ESHOPMAN community to building a platform that is powerful, flexible, and inclusive. By addressing seemingly small details like an unnamed dismiss button, we collectively contribute to a more accessible headless commerce ecosystem.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools