@liquidcommerce/elements-sdk 2.6.0-beta.13 → 2.6.0-beta.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -2518
- package/dist/index.checkout.esm.js +22267 -0
- package/dist/index.esm.js +30400 -20620
- package/dist/ssr-stub.checkout.esm.js +17 -0
- package/dist/ssr-stub.esm.js +281 -0
- package/dist/types/auto-initialize/checkout.d.ts +2 -0
- package/dist/types/auto-initialize/shared-utils.d.ts +51 -0
- package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +16 -2
- package/dist/types/clients/builder.d.ts +3 -0
- package/dist/types/clients/checkout.d.ts +6 -0
- package/dist/types/clients/helpers.d.ts +8 -0
- package/dist/types/clients/main.d.ts +3 -0
- package/dist/types/constants/core.constant.d.ts +13 -18
- package/dist/types/constants/index.d.ts +1 -0
- package/dist/types/constants/prop65.constant.d.ts +8 -0
- package/dist/types/core/a11y/announcer.service.d.ts +16 -0
- package/dist/types/core/a11y/focus-manager.service.d.ts +21 -0
- package/dist/types/core/a11y/focusable.d.ts +5 -0
- package/dist/types/core/a11y/glyph-button.d.ts +8 -0
- package/dist/types/core/a11y/index.d.ts +6 -0
- package/dist/types/core/a11y/required.d.ts +1 -0
- package/dist/types/core/a11y/single-select.d.ts +20 -0
- package/dist/types/core/api/api-client.service.d.ts +23 -18
- package/dist/types/core/api/api-result.d.ts +19 -0
- package/dist/types/core/api/auth-client.service.d.ts +37 -13
- package/dist/types/core/api/http-client.service.d.ts +0 -8
- package/dist/types/core/base-component.service.d.ts +4 -1
- package/dist/types/core/client/actions/base-action.service.d.ts +22 -0
- package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
- package/dist/types/core/client/actions/client-analytics-action.service.d.ts +35 -0
- package/dist/types/core/client/actions/client-cart-action.service.d.ts +38 -0
- package/dist/types/core/client/actions/client-checkout-action.service.d.ts +81 -0
- package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
- package/dist/types/core/client/client-action.service.d.ts +7 -74
- package/dist/types/core/client/client-config.service.d.ts +12 -5
- package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -1
- package/dist/types/core/google-tag-manager.service.d.ts +13 -3
- package/dist/types/core/logger/logger.service.d.ts +1 -1
- package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -0
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +6 -1
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +54 -48
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +18 -7
- package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
- package/dist/types/core/singleton-manager.service.d.ts +12 -8
- package/dist/types/core/store/interfaces/cart.interface.d.ts +2 -3
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +39 -107
- package/dist/types/core/store/interfaces/core.interface.d.ts +12 -2
- package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
- package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
- package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
- package/dist/types/core/store/store.constant.d.ts +5 -0
- package/dist/types/core/store/store.service.d.ts +1 -0
- package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
- package/dist/types/enums/core.enum.d.ts +51 -2
- package/dist/types/enums/index.d.ts +0 -1
- package/dist/types/index.checkout.d.ts +11 -0
- package/dist/types/index.checkout.umd.d.ts +4 -0
- package/dist/types/index.d.ts +9 -3
- package/dist/types/interfaces/analytics.interface.d.ts +41 -0
- package/dist/types/interfaces/api/cart.interface.d.ts +12 -7
- package/dist/types/interfaces/api/checkout.interface.d.ts +275 -0
- package/dist/types/interfaces/api/delivery.interface.d.ts +24 -0
- package/dist/types/interfaces/api/index.d.ts +6 -0
- package/dist/types/interfaces/api/product-list.interface.d.ts +15 -6
- package/dist/types/interfaces/api/product.interface.d.ts +10 -4
- package/dist/types/interfaces/client.interface.d.ts +79 -0
- package/dist/types/interfaces/component.interface.d.ts +7 -0
- package/dist/types/interfaces/config.interface.d.ts +45 -0
- package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/cart.interface.d.ts +2 -1
- package/dist/types/interfaces/configs/checkout.interface.d.ts +3 -1
- package/dist/types/interfaces/configs/global.interface.d.ts +9 -3
- package/dist/types/interfaces/configs/index.d.ts +1 -0
- package/dist/types/interfaces/configs/product-list.interface.d.ts +49 -0
- package/dist/types/interfaces/configs/product.interface.d.ts +7 -1
- package/dist/types/interfaces/injection.interface.d.ts +56 -0
- package/dist/types/modules/address/address-display.component.d.ts +3 -1
- package/dist/types/modules/address/address-input.component.d.ts +11 -1
- package/dist/types/modules/address/address.command.d.ts +3 -2
- package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/cart/cart.commands.d.ts +11 -5
- package/dist/types/modules/cart/components/cart-body.component.d.ts +1 -0
- package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +1 -1
- package/dist/types/modules/cart/components/cart-item-quantity-price.component.d.ts +5 -0
- package/dist/types/modules/cart/components/cart-item.component.d.ts +6 -0
- package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/checkout/checkout.commands.d.ts +128 -12
- package/dist/types/modules/checkout/checkout.component.d.ts +7 -1
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +5 -2
- package/dist/types/modules/checkout/components/checkout-buyer.component.d.ts +1 -0
- package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/checkout-deliver-to.component.d.ts +1 -0
- package/dist/types/modules/checkout/components/checkout-delivery-method.component.d.ts +22 -0
- package/dist/types/modules/checkout/components/checkout-delivery-scheduling.component.d.ts +51 -0
- package/dist/types/modules/checkout/components/checkout-express-checkout.component.d.ts +63 -0
- package/dist/types/modules/checkout/components/checkout-express-completion.component.d.ts +21 -0
- package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
- package/dist/types/modules/checkout/components/checkout-item-quantity.component.d.ts +4 -0
- package/dist/types/modules/checkout/components/checkout-item.component.d.ts +2 -0
- package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
- package/dist/types/modules/checkout/components/checkout-order-summary.component.d.ts +3 -0
- package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +8 -1
- package/dist/types/modules/checkout/components/checkout-place-order-button.component.d.ts +1 -5
- package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +15 -1
- package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
- package/dist/types/modules/checkout/components/checkout-prop65-warning.component.d.ts +8 -0
- package/dist/types/modules/checkout/components/checkout-send-as-gift.component.d.ts +3 -0
- package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +7 -3
- package/dist/types/modules/checkout/components/checkout-stripe-handler.component.d.ts +4 -0
- package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +4 -2
- package/dist/types/modules/checkout/components/index.d.ts +5 -0
- package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
- package/dist/types/modules/checkout/components/required-fields-legend.d.ts +1 -0
- package/dist/types/modules/checkout/constant.d.ts +15 -0
- package/dist/types/modules/checkout/customer-prefill.d.ts +5 -0
- package/dist/types/modules/checkout/express-wallet.d.ts +12 -0
- package/dist/types/modules/checkout/payment-session-error.d.ts +4 -0
- package/dist/types/modules/checkout/stripe-js.d.ts +2 -0
- package/dist/types/modules/checkout/styles/delivery-method.style.d.ts +1 -0
- package/dist/types/modules/checkout/styles/express-checkout.style.d.ts +1 -0
- package/dist/types/modules/checkout/styles/express-completion.style.d.ts +1 -0
- package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/product/components/components.d.ts +26 -2
- package/dist/types/modules/product/components/index.d.ts +1 -0
- package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +8 -1
- package/dist/types/modules/product/components/product-delivery-estimate.component.d.ts +11 -0
- package/dist/types/modules/product/components/product-description.component.d.ts +1 -0
- package/dist/types/modules/product/components/product-drawer.component.d.ts +6 -0
- package/dist/types/modules/product/components/product-image-carousel.component.d.ts +5 -0
- package/dist/types/modules/product/components/product-options.component.d.ts +2 -1
- package/dist/types/modules/product/components/product-prop65-warning.d.ts +1 -0
- package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +6 -0
- package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +12 -2
- package/dist/types/modules/product/components/product-retailers-popup.component.d.ts +1 -0
- package/dist/types/modules/product/components/product-retailers.component.d.ts +1 -0
- package/dist/types/modules/product/product.commands.d.ts +5 -5
- package/dist/types/modules/product/product.component.d.ts +3 -0
- package/dist/types/modules/product/styles/prop65-warning.style.d.ts +1 -0
- package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/product-list/components/card-components/index.d.ts +6 -0
- package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
- package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
- package/dist/types/modules/product-list/components/card-components/product-fulfillment-text.d.ts +2 -0
- package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +14 -0
- package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +11 -0
- package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +14 -0
- package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
- package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts → filter-components/product-list-checkbox-filter.d.ts} +1 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +15 -0
- package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-price-filter.components.d.ts → filter-components/product-list-price-filter.d.ts} +2 -1
- package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
- package/dist/types/modules/product-list/components/index.d.ts +6 -2
- package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +3 -1
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +39 -31
- package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +58 -36
- package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
- package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +54 -0
- package/dist/types/modules/product-list/components/product-list-search.component.d.ts +25 -0
- package/dist/types/modules/product-list/product-list-filter.registry.d.ts +42 -0
- package/dist/types/modules/product-list/product-list-filter.utils.d.ts +7 -0
- package/dist/types/modules/product-list/product-list-order.utils.d.ts +3 -0
- package/dist/types/modules/product-list/product-list-query-params.utils.d.ts +3 -0
- package/dist/types/modules/product-list/product-list.commands.d.ts +27 -7
- package/dist/types/modules/product-list/product-list.component.d.ts +23 -47
- package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
- package/dist/types/modules/product-list/product-list.interface.d.ts +17 -28
- package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
- package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
- package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
- package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
- package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
- package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
- package/dist/types/modules/ui-components/alert/alert.component.d.ts +10 -10
- package/dist/types/modules/ui-components/buttons/buttons-open-cart.component.d.ts +5 -0
- package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +15 -0
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +9 -1
- package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +7 -1
- package/dist/types/modules/ui-components/input/index.d.ts +0 -1
- package/dist/types/modules/ui-components/input/input.component.d.ts +15 -2
- package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
- package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
- package/dist/types/modules/ui-components/ui.commands.d.ts +7 -1
- package/dist/types/ssr/stub.checkout.d.ts +8 -0
- package/dist/types/ssr/stub.d.ts +12 -0
- package/dist/types/static/icon/arrow-right.icon.d.ts +1 -1
- package/dist/types/static/icon/bag.icon.d.ts +1 -1
- package/dist/types/static/icon/check.icon.d.ts +2 -0
- package/dist/types/static/icon/checkbox.icon.d.ts +1 -1
- package/dist/types/static/icon/chevron-down.icon.d.ts +1 -1
- package/dist/types/static/icon/chevron-left.icon.d.ts +1 -1
- package/dist/types/static/icon/chevron-up.icon.d.ts +1 -1
- package/dist/types/static/icon/close.icon.d.ts +1 -1
- package/dist/types/static/icon/error-info.icon.d.ts +1 -1
- package/dist/types/static/icon/filter.icon.d.ts +1 -1
- package/dist/types/static/icon/icon.a11y.d.ts +1 -0
- package/dist/types/static/icon/icon.types.d.ts +1 -0
- package/dist/types/static/icon/index.d.ts +2 -0
- package/dist/types/static/icon/info.icon.d.ts +1 -1
- package/dist/types/static/icon/loading-spinner.icon.d.ts +1 -1
- package/dist/types/static/icon/search.icon.d.ts +1 -1
- package/dist/types/static/icon/success.icon.d.ts +1 -1
- package/dist/types/static/icon/trash.icon.d.ts +1 -1
- package/dist/types/static/icon/warning.icon.d.ts +1 -1
- package/dist/types/utils/delivery-scheduling.d.ts +43 -0
- package/dist/types/utils/dom-compat.d.ts +2 -0
- package/dist/types/utils/format.d.ts +9 -14
- package/dist/types/utils/image-bg-removal.d.ts +3 -0
- package/dist/types/utils/places-session-token.d.ts +1 -0
- package/dist/types/utils/product-selection.d.ts +16 -0
- package/dist/types/utils/product.d.ts +21 -0
- package/dist/types/utils/timezone.d.ts +6 -0
- package/docs/v1/README.md +214 -0
- package/docs/v1/api/actions/address-actions.md +290 -0
- package/docs/v1/api/actions/analytics-actions.md +326 -0
- package/docs/v1/api/actions/cart-actions.md +364 -0
- package/docs/v1/api/actions/checkout-actions.md +629 -0
- package/docs/v1/api/actions/product-actions.md +204 -0
- package/docs/v1/api/client.md +671 -0
- package/docs/v1/api/configuration.md +587 -0
- package/docs/v1/api/injection-methods.md +331 -0
- package/docs/v1/api/typescript-types.md +610 -0
- package/docs/v1/api/ui-helpers.md +200 -0
- package/docs/v1/examples/advanced-patterns.md +199 -0
- package/docs/v1/examples/checkout-flow.md +90 -0
- package/docs/v1/examples/custom-theming.md +76 -0
- package/docs/v1/examples/multi-product-page.md +90 -0
- package/docs/v1/examples/simple-product-page.md +89 -0
- package/docs/v1/getting-started/concepts.md +521 -0
- package/docs/v1/getting-started/installation.md +351 -0
- package/docs/v1/getting-started/quick-start.md +410 -0
- package/docs/v1/guides/accessibility.md +295 -0
- package/docs/v1/guides/address-component.md +441 -0
- package/docs/v1/guides/best-practices.md +365 -0
- package/docs/v1/guides/cart-component.md +800 -0
- package/docs/v1/guides/checkout-component.md +916 -0
- package/docs/v1/guides/events.md +1061 -0
- package/docs/v1/guides/product-component.md +761 -0
- package/docs/v1/guides/product-list-component.md +730 -0
- package/docs/v1/guides/theming.md +243 -0
- package/docs/v1/integration/angular.md +39 -0
- package/docs/v1/integration/laravel.md +41 -0
- package/docs/v1/integration/nextjs.md +69 -0
- package/docs/v1/integration/proxy-setup.md +106 -0
- package/docs/v1/integration/react.md +64 -0
- package/docs/v1/integration/vanilla-js.md +84 -0
- package/docs/v1/integration/vue.md +58 -0
- package/docs/v1/reference/analytics.md +176 -0
- package/docs/v1/reference/browser-support.md +47 -0
- package/docs/v1/reference/error-handling.md +83 -0
- package/docs/v1/reference/performance.md +52 -0
- package/docs/v1/reference/telemetry.md +85 -0
- package/docs/v1/reference/troubleshooting.md +135 -0
- package/package.json +75 -45
- package/dist/types/elements-builder-client.d.ts +0 -2
- package/dist/types/elements-client-helper.d.ts +0 -4
- package/dist/types/elements-client.d.ts +0 -2
- package/dist/types/enums/cloud.enum.d.ts +0 -97
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -218
- package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
- package/dist/types/interfaces/cloud/index.d.ts +0 -3
- package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
- package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
- package/dist/types/interfaces/core.interface.d.ts +0 -111
- package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
- package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
- package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
- package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
- package/dist/types/utils/helper.d.ts +0 -28
- package/docs/ACTIONS.md +0 -1300
- package/docs/BROWSER_SUPPORT.md +0 -279
- package/docs/CONFIGURATION.md +0 -853
- package/docs/DOCUMENTATION_INDEX.md +0 -311
- package/docs/EVENTS.md +0 -798
- package/docs/PROXY.md +0 -228
- package/docs/THEMING.md +0 -592
- package/docs/TROUBLESHOOTING.md +0 -793
- package/umd/elements.js +0 -1
- /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
- /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# Accessibility Guide
|
|
2
|
+
|
|
3
|
+
What the Elements SDK does for accessibility, what it needs from your page, and how to verify it.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Elements target **WCAG 2.1 Level AA**. Every element ships with keyboard support, screen-reader
|
|
8
|
+
announcements and managed focus — there is nothing to switch on. Colour contrast is the exception:
|
|
9
|
+
the SDK renders your theme's colours exactly as given, so that part is yours — see
|
|
10
|
+
[Colour and contrast](#colour-and-contrast).
|
|
11
|
+
|
|
12
|
+
Accessibility is shared between the SDK and the host page:
|
|
13
|
+
|
|
14
|
+
| The SDK owns | Your page owns |
|
|
15
|
+
|---|---|
|
|
16
|
+
| Roles, names and states of everything inside an element | Page structure: landmarks, `<html lang>` |
|
|
17
|
+
| Keyboard operation of every control it renders | Contrast of your own content, and the surface you place elements on |
|
|
18
|
+
| Focus movement into and out of its overlays | A theme whose colours meet the WCAG contrast minimums (the SDK renders your colours as given) |
|
|
19
|
+
| Announcing its own content changes | Not hiding or `inert`-ing the element container |
|
|
20
|
+
| Reflow down to a 320px viewport | Layout around the element at 400% zoom |
|
|
21
|
+
|
|
22
|
+
## Keyboard navigation
|
|
23
|
+
|
|
24
|
+
Every control is reachable and operable with a keyboard alone. Related controls are grouped into
|
|
25
|
+
a **single tab stop** with arrow keys inside it, so a long list of retailers or sizes is not a
|
|
26
|
+
tab-through slog.
|
|
27
|
+
|
|
28
|
+
| Widget | Keys |
|
|
29
|
+
|---|---|
|
|
30
|
+
| Size selector (product) | `Tab` to the group, `←` `→` to move, `Enter` / `Space` to choose, `Home` / `End` for the ends |
|
|
31
|
+
| Size dropdown (product list) | `Enter` / `Space` / `↓` opens, `↑` `↓` moves, `Enter` chooses, `Esc` closes |
|
|
32
|
+
| Delivery method tabs (Shipping / Same-Day) | `←` `→` switches method immediately; unavailable methods are skipped, `Home` / `End` for the ends |
|
|
33
|
+
| Retailer / delivery-option lists | `↑` `↓` moves, `Enter` / `Space` chooses, `Home` / `End` for the ends |
|
|
34
|
+
| Retailer carousel | `←` `→` moves, `Enter` / `Space` chooses |
|
|
35
|
+
| Product image thumbnails | `←` `→` moves, `Enter` / `Space` shows the image |
|
|
36
|
+
| Tip amount | `Tab` to the group, `←` `→` to move, `Enter` / `Space` to choose, `Home` / `End` for the ends |
|
|
37
|
+
| Quantity steppers | `Tab` to each button, `Enter` / `Space` to step |
|
|
38
|
+
| Address field | Type to search, `↑` `↓` through suggestions, `Enter` selects, `Esc` dismisses |
|
|
39
|
+
| Cart / checkout drawer, modals | `Tab` cycles inside the panel only, `Esc` closes |
|
|
40
|
+
|
|
41
|
+
Arrow keys change the selection immediately only where that is cheap and reversible (the delivery
|
|
42
|
+
method tabs). Where choosing has a side effect the user cannot navigate back out of — picking a
|
|
43
|
+
retailer closes the panel — arrow keys move focus and `Enter` commits.
|
|
44
|
+
|
|
45
|
+
### Focus management
|
|
46
|
+
|
|
47
|
+
- **Opening an overlay** moves focus onto the first control inside it — the panel's close
|
|
48
|
+
button, the address field — and remembers the control that opened it. Focus lands on a
|
|
49
|
+
control rather than on the panel itself so the focus ring shows a sighted keyboard user
|
|
50
|
+
where they now are; the dialog's role and name are announced either way as focus crosses
|
|
51
|
+
into it. Views whose point is the text at the top of them (the order confirmation) focus
|
|
52
|
+
that heading instead.
|
|
53
|
+
- **Closing** returns focus to that control, even when a re-render has replaced it.
|
|
54
|
+
- **While an overlay is open** focus is trapped inside it and the rest of the page is `inert` and
|
|
55
|
+
`aria-hidden`, so a screen reader cannot wander behind the dialog.
|
|
56
|
+
- **In-place content swaps** (Buy Now → address form, Add to Cart → personalize) re-seat focus on
|
|
57
|
+
the new view's heading; nothing is left focused on a destroyed node.
|
|
58
|
+
- **After a re-render** focus returns to the control that caused it — the quantity stepper you
|
|
59
|
+
pressed, the delivery-method tab you switched to.
|
|
60
|
+
- **Nothing hidden is focusable.** Collapsed panels are removed from the tab order and the
|
|
61
|
+
accessibility tree, and closed overlays have their content torn down.
|
|
62
|
+
|
|
63
|
+
### Retailer shopping from the cart
|
|
64
|
+
|
|
65
|
+
The opt-in `cart.layout.showShopRetailerButton` uses a native **Shop {retailer}** button with
|
|
66
|
+
normal Tab, Enter and Space behavior, a 44px minimum target height and a visible focus ring.
|
|
67
|
+
It appears beside the unmet-minimum warning on desktop and below it on mobile. Warning updates
|
|
68
|
+
retain the button node and its focus; if it disappears because the minimum is met or eligibility
|
|
69
|
+
changes, focus moves to the containing fulfillment before its item controls. The host handles
|
|
70
|
+
focus after closing the drawer and navigating in response to `cart_shop_retailer`.
|
|
71
|
+
|
|
72
|
+
The button text, border and focus ring use `global.theme.primaryColor`; check that color against
|
|
73
|
+
the cart background as part of your theme contrast review.
|
|
74
|
+
|
|
75
|
+
### Focus indicator
|
|
76
|
+
|
|
77
|
+
A 2px ring in `--focus-ring-color`, offset 2px from the control. Controls that span their
|
|
78
|
+
container's full width use an inset ring instead, because an outward ring on those is clipped by
|
|
79
|
+
the scrolling panel around them. On primary-coloured fills the ring switches to
|
|
80
|
+
`--selected-text-color`, the token already used for text on that fill — so setting the pair
|
|
81
|
+
`primaryColor` / `selectedTextColor` to a combination that clears 3:1 covers the ring too.
|
|
82
|
+
|
|
83
|
+
The ring targets `:focus` as well as `:focus-visible`, so browsers without `:focus-visible`
|
|
84
|
+
support still show it.
|
|
85
|
+
|
|
86
|
+
## Screen reader support
|
|
87
|
+
|
|
88
|
+
Elements are Web Components inside a shadow root, which is fully visible to assistive technology.
|
|
89
|
+
|
|
90
|
+
### Announcements
|
|
91
|
+
|
|
92
|
+
Content that appears or changes without navigation is announced through a shared live region
|
|
93
|
+
(`role="status"`, `aria-live="polite"`; `role="alert"` for errors) that lives at the end of
|
|
94
|
+
`document.body` and survives re-renders.
|
|
95
|
+
|
|
96
|
+
| What happened | What is announced |
|
|
97
|
+
|---|---|
|
|
98
|
+
| Buy Now pressed | "Enter delivery address" |
|
|
99
|
+
| Address saved | "Delivery address updated. Now delivering to …" |
|
|
100
|
+
| Delivery option chosen | "Delivery option updated. Shipping from …, $…, Ships in 2-3 days, delivery $…" |
|
|
101
|
+
| Delivery method switched | "Shipping selected. 5 options available. Shipping from …, $…, Ships in 2-3 days, delivery $…" |
|
|
102
|
+
| Size chosen | "Size 750 ML selected" |
|
|
103
|
+
| Quantity stepped | "Tito's Handmade Vodka, quantity 4" |
|
|
104
|
+
| Personalization saved / removed | "Personalization saved" / "Personalization removed" |
|
|
105
|
+
| Cart or checkout opened / closed | "Shopping cart opened" / "Shopping cart closed" |
|
|
106
|
+
| Panel closed (product) | "Closed. Back to product options." |
|
|
107
|
+
| Item added / removed, promo applied, totals changed | The new state, e.g. "Promo code SPRING applied, $5.00 off" |
|
|
108
|
+
| Express checkout payment failed | "Express checkout failed. …" |
|
|
109
|
+
| Card form could not load Stripe.js | The reason and what to do, e.g. "Your cookie settings are blocking our secure payment form. …" (assertive) |
|
|
110
|
+
| Product list filtered or searched | "12 products found, showing 12" |
|
|
111
|
+
| Validation failed | The field name and the error, interrupting (assertive) |
|
|
112
|
+
| Carousel image changed | "Image 2 of 4" |
|
|
113
|
+
|
|
114
|
+
Live regions are never written into a component template: components replace their whole subtree
|
|
115
|
+
on render, and a live region recreated with its text already in place is not announced. Use
|
|
116
|
+
`this.announcer.announce(message)` from a component instead.
|
|
117
|
+
|
|
118
|
+
### Names, roles and states
|
|
119
|
+
|
|
120
|
+
- Dialogs carry `role="dialog"`, an accessible name, and `aria-modal` when they cover the page.
|
|
121
|
+
- Single-select groups are `listbox` / `radiogroup` with `option` / `radio` children carrying
|
|
122
|
+
`aria-selected` / `aria-checked` — not toggle buttons with `aria-pressed`, which would describe
|
|
123
|
+
each choice as an independent on/off switch. Product sizes are a `listbox`; the delivery options
|
|
124
|
+
under each method are a `radiogroup`.
|
|
125
|
+
- Checkout's **Delivery Method** section is an accordion whose header is a real `button` carrying
|
|
126
|
+
`aria-expanded`, and whose two methods are a `radiogroup` of `radio` cards. Choosing one re-prices
|
|
127
|
+
the order, so selection does not follow focus here either: arrow keys move between the methods and
|
|
128
|
+
`Enter` / `Space` commits, rather than committing a switch the shopper was only passing through.
|
|
129
|
+
A method that cannot fulfil is `aria-disabled` and not activatable, but the **Change Location**
|
|
130
|
+
button inside it stays reachable — it is the way out of that state, so it must not be sealed in
|
|
131
|
+
with the option it sits under. Each card names the method, its fee and its timing, or, when it
|
|
132
|
+
cannot fulfil, the reason why.
|
|
133
|
+
- The delivery-method controls are a `tablist` of `tab`s. Only one method's options are rendered at
|
|
134
|
+
a time, so the selected tab carries `aria-controls` and the region it swaps in is the matching
|
|
135
|
+
`tabpanel`, labelled by that tab; the inactive tab points at nothing, because there is nothing
|
|
136
|
+
there to point at. A method switched off by configuration renders no tab at all, and the region
|
|
137
|
+
then falls back to its own label rather than naming a tab that does not exist. Choosing an option
|
|
138
|
+
closes the panel, so arrow keys move without choosing and `Enter` / `Space` commits — a
|
|
139
|
+
deliberate departure from the radio-group model, which would otherwise select a neighbour and
|
|
140
|
+
end the interaction before the shopper reached the option they wanted.
|
|
141
|
+
- Unavailable controls are `aria-disabled` **and** genuinely inert: they cannot be activated.
|
|
142
|
+
- Icon-only buttons take their name from the button's `aria-label`.
|
|
143
|
+
- Visible label text is always contained in the accessible name (2.5.3 Label in Name), so speech
|
|
144
|
+
input works: saying "click See Delivery Options" activates the button that reads that way.
|
|
145
|
+
- Fields whose design has no room for a visible label (promo code, gift card) get an
|
|
146
|
+
`aria-label` instead — no rendered label, no layout change. A field that has a visible `<label>`
|
|
147
|
+
is never *also* given an `aria-label`, which would replace the label's text rather than add to
|
|
148
|
+
it.
|
|
149
|
+
- **Required fields** carry `aria-required="true"`, so they announce as required. The visible `*`
|
|
150
|
+
is reinforcement and is `aria-hidden`, since the state is already spoken; each form section
|
|
151
|
+
explains the glyph with a "Fields marked * are required." line above its fields (3.3.2).
|
|
152
|
+
- An option in a single-select group carries its **whole** visible content in its accessible name.
|
|
153
|
+
`option` and `radio` have presentational children, so the name is the only channel: a delivery
|
|
154
|
+
option names the retailer, the price, the timing, the delivery fee and — for same-day — the
|
|
155
|
+
store address and whether it is currently closed.
|
|
156
|
+
- The California Proposition 65 warning on the product is a native `<details>` / `<summary>`
|
|
157
|
+
disclosure: the summary is a button that exposes its expanded state, and `Enter` / `Space` toggle
|
|
158
|
+
it with no scripting involved. Its `+` / `−` indicator is decorative and hidden. In checkout it is
|
|
159
|
+
a plain link whose accessible name ends "(opens in a new tab)", since following it leaves the
|
|
160
|
+
purchase mid-flow; the `·` separator is hidden.
|
|
161
|
+
|
|
162
|
+
### Headings
|
|
163
|
+
|
|
164
|
+
The product element emits a level-1 title, and every section caption below it sits at level 2 —
|
|
165
|
+
`Size`, `Delivers to:`, `Shipping From:` and `About this product:` — so the whole element is
|
|
166
|
+
reachable by heading navigation with no level skipped. An overlay supplies its own heading at the
|
|
167
|
+
top of its content, because the page behind it is out of the accessibility tree while it is open.
|
|
168
|
+
|
|
169
|
+
A caption can do both jobs at once: `Shipping From:` is a heading *and* names the retailer card
|
|
170
|
+
beneath it through `aria-labelledby`. Heading ids are scoped to the product, so each product
|
|
171
|
+
element on a page labels its own sections.
|
|
172
|
+
|
|
173
|
+
The checkout element has its own outline and is not covered by the above. Where any element's
|
|
174
|
+
top-level heading sits in **your** page's outline is yours to place.
|
|
175
|
+
|
|
176
|
+
### Express checkout
|
|
177
|
+
|
|
178
|
+
The Apple Pay and Google Pay buttons are rendered by Stripe inside an iframe, so their own labels
|
|
179
|
+
and keyboard behaviour are Stripe's. What the SDK owns around them:
|
|
180
|
+
|
|
181
|
+
- The **"Express Checkout" heading** is an `h3`, matching the other checkout section headings. It is
|
|
182
|
+
rendered only by the `section` variant; injected on their own the buttons carry no heading, and the
|
|
183
|
+
host page's own outline supplies it.
|
|
184
|
+
- The **`OR` divider** is decorative and carries `aria-hidden="true"`, so "OR" is not announced as
|
|
185
|
+
content between the buttons and the section below.
|
|
186
|
+
- When the shopper's device offers **no wallet**, the heading and the divider are removed from the
|
|
187
|
+
accessibility tree along with the buttons, so no orphan rule or empty heading is left behind. The block is also removed on a gift order, which express cannot place, and where a
|
|
188
|
+
payment method is already bound to the checkout. It is offered to every shopper otherwise.
|
|
189
|
+
- The **wallet sheet is browser UI**, not an SDK overlay: the browser owns focus while it is open and
|
|
190
|
+
returns it to the button that opened it. Dismissing the sheet changes nothing in the page, so
|
|
191
|
+
nothing is announced.
|
|
192
|
+
- Failures are announced assertively, because the shopper has just authorised a payment and the sheet
|
|
193
|
+
that showed the error has already closed. Confirming the sheet places the order outright, so there
|
|
194
|
+
is nothing to announce on the success path beyond the order confirmation itself.
|
|
195
|
+
|
|
196
|
+
### Images and icons
|
|
197
|
+
|
|
198
|
+
- Product photos use the product name as their alt text; a photo painted as a CSS background is
|
|
199
|
+
exposed with `role="img"` and the same name.
|
|
200
|
+
- Decorative images inside a named control use `alt=""` so the control is not announced twice.
|
|
201
|
+
- Every inline SVG icon renders `aria-hidden="true" focusable="false"`. Icons that carry meaning
|
|
202
|
+
on their own opt in to a name: `CloseIcon({ label: 'Close' })`.
|
|
203
|
+
|
|
204
|
+
## Colour and contrast
|
|
205
|
+
|
|
206
|
+
Element colours come from your theme, and a brand palette chosen to look right often does not
|
|
207
|
+
clear WCAG: white on a mid-tone brand fill is around 3:1, well under the 4.5:1 body text needs.
|
|
208
|
+
|
|
209
|
+
**The SDK renders the colours you supply exactly as given — it does not adjust them.** Contrast is
|
|
210
|
+
therefore yours to get right: check each foreground token against the surface the Element sits on
|
|
211
|
+
and make sure it reaches 4.5:1 for text (WCAG 1.4.3) and 3:1 for borders, icons and the focus ring
|
|
212
|
+
(WCAG 1.4.11).
|
|
213
|
+
|
|
214
|
+
The tokens worth checking are `defaultTextColor`, `linkTextColor`, `warningColor`, `errorColor` and
|
|
215
|
+
`successColor` against `drawerBackgroundColor` (or whatever your page puts behind the Element), plus
|
|
216
|
+
`selectedTextColor` against `primaryColor` for text on brand-filled buttons and badges.
|
|
217
|
+
|
|
218
|
+
`defaultTextColor` also colours the product's California Proposition 65 warning, which is legally
|
|
219
|
+
required copy, so it always uses the full-strength token, never a lighter variant — make sure it
|
|
220
|
+
reaches 4.5:1 on your product background. The checkout's warning panel does not use it: it is a
|
|
221
|
+
fixed colour pair chosen by `global.layout.poweredByMode` (over 13:1 in both `light` and `dark`), so
|
|
222
|
+
set that to `dark` if your checkout is dark.
|
|
223
|
+
|
|
224
|
+
Every token ships with a default that already passes on a light surface. Two are easy to forget
|
|
225
|
+
because they are optional — leave them out to keep the compliant defaults, or set them explicitly to
|
|
226
|
+
keep those details on-brand:
|
|
227
|
+
|
|
228
|
+
```javascript
|
|
229
|
+
customTheme: {
|
|
230
|
+
global: {
|
|
231
|
+
theme: {
|
|
232
|
+
inputBorderColor: '#767C85', // form field boundaries, needs 3:1 on your surface
|
|
233
|
+
focusRingColor: '#1D4ED8' // keyboard focus ring, needs 3:1 on your surface
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Zoom, reflow and text spacing
|
|
240
|
+
|
|
241
|
+
Elements reflow down to a 320px CSS viewport (400% zoom on a 1280px screen) without horizontal
|
|
242
|
+
scrolling. Labels wrap instead of truncating, so they survive user text-spacing overrides.
|
|
243
|
+
|
|
244
|
+
## Verifying it
|
|
245
|
+
|
|
246
|
+
**Keyboard:** unplug the mouse and complete a purchase. Every control must be reachable, every
|
|
247
|
+
focus ring visible, and focus must never land on `<body>`.
|
|
248
|
+
|
|
249
|
+
**Announcements** without a screen reader — the live regions are plain DOM:
|
|
250
|
+
|
|
251
|
+
```javascript
|
|
252
|
+
for (const region of document.querySelectorAll('[data-lce-live-region]')) {
|
|
253
|
+
new MutationObserver(() => console.log('[SR]', region.textContent)).observe(region, {
|
|
254
|
+
childList: true, subtree: true, characterData: true,
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Screen readers:** verify with VoiceOver (Safari/macOS), NVDA (Firefox/Windows) or TalkBack
|
|
260
|
+
(Chrome/Android) — the pairings that matter most for a storefront.
|
|
261
|
+
|
|
262
|
+
## See Also
|
|
263
|
+
|
|
264
|
+
- [Theming Guide](./theming.md) — the colour tokens to check for contrast
|
|
265
|
+
- [Best Practices](./best-practices.md)
|
|
266
|
+
- [Browser Support](../reference/browser-support.md)
|
|
267
|
+
|
|
268
|
+
## Checkout initialization and payment recovery
|
|
269
|
+
|
|
270
|
+
Checkout announces loading or initialization failure in a status region. If initialization fails, payment fields are withheld and a keyboard-operable **Retry checkout** button retries the same checkout. The button is disabled while loading.
|
|
271
|
+
|
|
272
|
+
If the card form cannot load Stripe.js — a consent tool holding the script back, a blocker, or a failed request — the reason and a keyboard-operable **Try again** button take the card form's place, and the message is announced assertively. While a retry runs the button stays focusable (`aria-disabled`, not `disabled`), so focus is not lost; if the retry fails, focus moves to the new **Try again** button, and if it succeeds, to the card form's container.
|
|
273
|
+
|
|
274
|
+
Save Payment Information remains disabled until checkout initializes. During payment save it stays busy until the server responds. Recoverable billing/prepare errors are announced while the mounted card fields and billing input remain available for correction and retry.
|
|
275
|
+
|
|
276
|
+
### Wallet payment actions
|
|
277
|
+
|
|
278
|
+
The payment action's accessible name matches its visible label, including the
|
|
279
|
+
selected Apple Pay or Google Pay wallet and retry/processing states. Adjacent
|
|
280
|
+
instructions explain whether the action opens the wallet or retries saving already
|
|
281
|
+
authorized details. These actions save the payment method; order placement is a
|
|
282
|
+
separate step.
|
|
283
|
+
|
|
284
|
+
### Recorded marketing choices
|
|
285
|
+
|
|
286
|
+
Checkout suppresses each email/SMS consent checkbox only after the corresponding
|
|
287
|
+
recorded account choice is confirmed. Suppressed controls are hidden visually and
|
|
288
|
+
from the accessibility tree; unknown choices retain their named, keyboard-operable
|
|
289
|
+
checkboxes. Clearing account preferences reveals the controls and synchronizes
|
|
290
|
+
`aria-checked` with the current guest defaults. A shopper's explicit checkbox edit
|
|
291
|
+
keeps that channel visible when account data arrives later.
|
|
292
|
+
|
|
293
|
+
### Delivery date and arrival windows
|
|
294
|
+
|
|
295
|
+
The delivery picker is a named native modal dialog opened from each delivery's Schedule delivery or Edit control. Dates and arrival windows are radio groups with one tab stop each and arrow-key selection; the date strip scrolls inside the dialog and unavailable dates are disabled. While windows load, the dialog is marked busy and shows a loading line; Cancel and Close stay available. Changes are drafts until Save; Cancel, Close and Escape discard them, and closing returns focus to the opening control. The dialog stays the same modal while it is open: a date or window change updates its contents in place, so it is not announced again. Save errors keep the dialog open and move focus to the error. Success is announced politely; errors and an expired or unavailable window are announced assertively, each with its own message. The time zone is named once above the windows ("Times in Eastern Time"); the first window's accessible name also carries its "Order by" time. The window list scrolls inside the dialog, and the chosen or focused window is kept in view as the picker opens, the date changes and arrow keys move.
|