# Accessibility (a11y) in templates

URL: https://shoptet.dev/templates/accessibility

Accessibility (often abbreviated as a11y) means creating websites and applications that everyone can use, including people with disabilities. For digital businesses, and e-shops in particular, accessibility is not only a matter of inclusivity and a better user experience, but also a legal requirement.

## Why accessibility matters

- **Reach a broader audience** : By considering users with disabilities, businesses open their services to millions of potential customers.
- **Improve usability** : Improvements made for accessibility often benefit all users.
- **Stay legally compliant** : European law requires accessibility, especially for public and commercial services.

## Benefits for e-commerce

- **Better SEO** : Accessible sites tend to have a better structure, which improves their visibility in search engines.
- **Higher conversions** : A better user experience leads to more completed purchases.
- **Prevention of legal risks** : Non-compliance can lead to lawsuits and fines.

## Legal framework and key standards

- **[EU Directive 2016/2102](https://eur-lex.europa.eu/eli/dir/2016/2102/oj)** (Web Accessibility Directive): Requires public sector websites and mobile apps to be accessible. Compliance can be demonstrated with EN 301 549 (based on WCAG 2.1).
- **[EU Directive 2019/882](https://eur-lex.europa.eu/eli/dir/2019/882/oj)** (European Accessibility Act, EAA): Extends accessibility obligations to a wide range of products and services, including e-commerce services such as e-shops. It applies from **June 28, 2025** .
- **[Czech Act No. 424/2023 Coll.](https://www.zakonyprolidi.cz/cs/2023-424)** (zákon č. 424/2023 Sb.): Implements the EAA in Czech law.
- **EN 301 549** : The harmonized European standard for the accessibility of ICT products and services; it incorporates WCAG 2.1.
- **[WCAG 2.1](https://www.w3.org/TR/WCAG21/) / [WCAG 2.2](https://www.w3.org/TR/WCAG22/)** : International guidelines that define three conformance levels (A, AA, AAA) based on four principles: perceivable, operable, understandable and robust.
- **EN 17161 and EN 17210** : Standards focused on inclusive ("design for all") design processes and on the accessibility of the built environment.

## Shared responsibility on the Shoptet platform

Accessibility is a joint effort of everyone who contributes to an e-shop.

### Shoptet (platform owner)

Shoptet is responsible for the core structure and functionality of the e-shop platform. This includes:

- A semantic and accessible DOM structure
- Default color schemes with sufficient contrast
- Robust keyboard navigation
- Accessible forms with proper labels and error messages

### Template creators (partners)

Template creators are responsible for:

- Following a semantic HTML structure
- Keeping sufficient contrast and clarity in their visual styles
- Respecting keyboard operability and focus behavior
- Avoiding accessibility regressions when overriding the default styles or layout

### Widget and add-on creators

Add-ons cannot change the template's own HTML. They can only add their code — JavaScript, CSS and HTML snippets — to predefined places on the page (see [Code placement, review and deployment for addons](/templates/getting-started/#code-placement-review-and-deployment-for-addons) ). Add-on creators must:

- Make sure that all dynamic widgets (for example pop-ups, modals and carousels) meet WCAG 2.1 level AA
- Support full keyboard navigation within their widgets
- Manage focus, ARIA roles and the correct tab order
- Document the accessibility behavior and the expected interaction of their widgets

### E-shop owners

E-shop owners manage the content and are responsible for:

- Writing accessible text content (headings, alternative texts, link texts)
- Keeping the content readable and well-structured
- Adding accessible multimedia content (captions, transcripts, alternative texts)
note
Full accessibility cannot be guaranteed without the collaboration of all parties.

## What Shoptet templates already provide

Since 2025, Shoptet has been improving the accessibility of the 3rd generation (3G) templates step by step. Your template modifications and add-ons should build on these features, not break them:

- **Skip links** : Every page of the 3G templates starts with a "Skip to content" link ( `<a href="#content" class="skip-link sr-only">` ) that leads to the main content ( `<main id="content">` ). The category menu in the sidebar has its own pair of skip links ( `.js-skip-link--start` , `.js-skip-link--end` ). The links are visually hidden until they receive keyboard focus.
- **The `sr-only` class** : Hides content visually while keeping it available to screen readers. The templates use it for hidden headings (for example in the footer, sidebar and above product listings) and for the accessible names of icon-only buttons, inputs and links. If you override `.sr-only` in your own CSS, never use `display: none` or `visibility: hidden` — both remove the content from the accessibility tree and from the tab order.
- **Screen reader announcements** : An ARIA live region `<div id="screen-reader-announcer" class="sr-only" aria-live="polite" aria-atomic="true">` is rendered at the end of every page. Use `shoptet.screenReader.announceToScreenReader(message, liveType)` to announce a message ( `liveType` is `'polite'` by default, or `'assertive'` ). The older `shoptet.helpers.announceToScreenReader()` is deprecated.
- **Focus styles** : A unified, clearly visible focus ring for keyboard users.
The changes are announced in the [Frontend News](/news/frontend/) , marked with the ♿️ icon. Many of them change the HTML structure and are rolled out through [Deferred template updates](/templates/deferred-template-updates/) , so check them whenever you maintain a template modification or an add-on. Examples include accessible login dialogs, keyboard-accessible product sorting and listing controls, accessible rating stars, labelled variant selects and color filters, and default color schemes with compliant contrast.

## Requirements for templates and add-ons

All code deployed on the platform (templates or widgets) must meet WCAG 2.1 level AA:

- **Semantic HTML**
- **WAI-ARIA** only where necessary
- **Keyboard navigation** and a logical focus order
- **Color contrast and alternative texts**
- **Responsive design**
- **Accessible forms**
- **Predictable UI behavior**
- **Accessibility documentation and testing**

## Testing accessibility

Effective testing combines automated and manual checks.

### Automated tools

- [W3C Markup Validation Service](https://validator.w3.org/)
- [axe accessibility checker (Deque)](https://www.deque.com/axe/)
- [Lighthouse (Chrome DevTools)](https://developer.chrome.com/docs/lighthouse/accessibility/scoring)
- [WAVE Web Accessibility Evaluation Tool](https://wave.webaim.org/)

### Manual testing

- Tab through all interactive elements
- Test with screen readers (NVDA, VoiceOver)
- Check modals, dropdowns and dynamic content

### Device and browser testing

- Responsive behavior across devices
- Zoom up to 200%
- Compatibility with major browsers

## Developer recommendations

- **Start early** : Build accessibility into your design process from the beginning.
- **Design simply** : Avoid overly complex UI elements.
- **Stick to WCAG 2.1 level AA.**
- **Collect feedback** from real users.
- **Update regularly.**
- **Train your team.**

## Accessible component libraries

- [ARIA Authoring Practices Guide (APG)](https://www.w3.org/WAI/ARIA/apg/)
- [A Complete Guide To Accessible Front-End Components (Smashing Magazine)](https://www.smashingmagazine.com/2021/03/complete-guide-accessible-front-end-components/)
- [Inclusive Components](https://inclusive-components.design/)
- [Inaccessible Components (Actum Digital)](https://accessibility.actumdigital.com/docs/inaccessible-components/intro)

## Resources

- [WCAG 2.1](https://www.w3.org/TR/WCAG21/)
- [W3C Web Accessibility Initiative – Introduction to Web Accessibility](https://www.w3.org/WAI/fundamentals/accessibility-intro/)
- [MDN Web Docs – Accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility)
- [Přístupné stránky](https://pristupne-stranky.cz/) (in Czech)
- [Blind Friendly Web](https://www.centrumpronevidome.cz/blindfriendly/uvod) (in Czech)
- [Poslepu blog](https://poslepu.blogspot.com/) (in Czech)
- [Accessibility Support (a11ysupport.io)](https://a11ysupport.io/)

## FAQ

What standard should I follow when building accessible templates or add-ons? WCAG 2.1, level AA. For legal compliance (especially under the EAA), follow EN 301 549 as well.

Do I always need to use ARIA roles? Only when native HTML elements do not provide the semantics you need. Prefer semantic HTML over ARIA whenever possible.

Is automated testing enough? No. Automated tools are great for spotting basic issues, but manual testing (keyboard, screen reader) is essential.

Who is responsible for accessibility on Shoptet e-shops? It is a shared responsibility of Shoptet (platform), partners (templates and widgets) and e-shop owners (content). See Shared responsibility on the Shoptet platform .

What limitations do add-ons have in affecting accessibility? Add-ons cannot change the template's own HTML structure; they can only add JavaScript, CSS and HTML snippets to predefined places. They must therefore ensure the accessibility of every custom widget or UI behavior they introduce.

When did the accessibility requirements become mandatory? The European Accessibility Act has applied since June 28, 2025, so e-shops are expected to comply now.
