header-logo
Learn how to use Wix to build your site and business.
Design and manage your site using intuitive Wix features.
Manage subscriptions, plans and invoices.
Run your business and connect with members.
Learn to purchase, connect or transfer a domain to your site.
Get tools to grow your business and web presence.
Boost your visibility with SEO and marketing tools.
Get advanced features to help you work more efficiently.
Find solutions, learn about known issues or contact us.
placeholder-preview-image
Improve your skills with our courses and tutorials.
Get tips for web design, marketing and more.
Learn to increase organic site traffic from search engines.
Build a custom site using our full-stack platform.
Get matched with a specialist to help you reach your goals.
placeholder-preview-image

Accessibility: Best Practices for the CMS

11 min
In this article
  • CMS alt text best practices
  • For non-decorative images
  • For decorative images
  • For images that serve as clickable buttons
  • For galleries connected to 'Image' field types
  • For galleries connected to 'Media gallery' field types
  • (Studio Editor only) Attaching elements to separate sections when using 'Load More' buttons
  • (Static pages only) Attaching 'Next/Previous item' buttons to containers
  • Attaching 'item count' text to a container
  • Making input elements accessible
  • Making pagination bars accessible
  • FAQs
Implementing accessibility best practices in your CMS (Content Management System) ensures that your site is usable for everyone, including those who rely on assistive technologies. These practices include adding accessible names to elements, using effective alt text for images and galleries, and placing elements in sections or containers with ARIA attributes. 

By following these guidelines, you can create a more inclusive website that caters to all users, making it easier for them to navigate and interact with your content.

CMS alt text best practices

Alt text is essential for providing context to images and galleries. When writing alt text, you should focus on describing the image as if AI is interpreting it. Keep it concise (under 125 characters) and avoid phrases like "image of". For more detailed guidance on writing effective alt text, see Accessibility: Preparing Your Images and Galleries.

In general, we recommend creating a collection field to use as the alt text for the CMS-connected images and galleries. To keep your collection organized, you can place the alt text field next to the image or gallery it represents and name it "Alt text [image/gallery name]". Keep in mind that decorative images do not necessarily need alt text. See the decorative images section below for more info. 
Screenshot of an alt text field next to the image field it represents.

For non-decorative images

When adding non-decorative images to your CMS, it’s crucial to provide descriptive alt text. We recommend adding a separate 'Text' field type in your CMS collection that represents the alt text of the images. Focus on using specific and descriptive language in your alt text. For example, instead of writing the alt text as "a woman", use "a woman planting daisies in a garden". 

When you connect the image in your editor to the dataset, click the Alt text connects to field and select the alt text field you created. This allows screen readers to describe the image and its purpose, making your site more inclusive. 
Screenshot of connecting an image's alt text to a collection field.

For decorative images

Decorative images typically do not convey meaningful content and do not require alt text. If an image serves a purely decorative purpose, you can leave the alt text disconnected in the dataset. This helps screen readers skip over the image, preventing unnecessary distractions.

For images that serve as clickable buttons

If an image link connects to a dataset action, such opening the dynamic item page, its alt text should describe the action, rather than just the image itself. For example, if clicking an image takes visitors to a profile page, the alt text could be "Read more about Willis McSmoot". 

With expressions, you can combine static text (e.g. "Read more about") with dynamic collection field values (e.g. "Willis McSmoot") to ensure the alt text varies per image. This way, visitors can understand the purpose of the image when using assistive technologies. 
To use expressions to create custom alt text: 
  1. Connect the relevant image to the dataset that connects to your collection. 
  2. Click the Alt text connects to drop-down in the Connect image panel and select Expression
A screenshot of connecting the 'Alt text connects to' drop-down to expressions.
  1. Click the Expression field and enter a function that creates the alt text you need. For example, you could enter the following function to combine "Read more about" with a 'title' field that contains the names:
1CONCAT("Read more about ",title)

For galleries connected to 'Image' field types

For galleries that connect to 'Image' field types, it is important to provide alt text for each image. Create a separate 'Text' field type in your CMS collection specifically for alt text of the images. When connecting the gallery to your dataset, connect the Alt texts connect to drop-down to the corresponding alt text field. This ensures that screen readers can provide descriptions of the images within the gallery, enhancing accessibility.
Connecting a gallery to the 'Media gallery' field is a great way to display numerous images or videos about an item on a dynamic item page. When doing so, add alt text for each media file directly within the 'Media gallery' field in your collection. Click the 'Media gallery' field next to the relevant item in your collection to add alt text to each media file. There, you can also enter the title and description of each file. This allows screen readers to convey context for both images and videos, ensuring that all media content in your gallery is accessible.

(Studio Editor only) Attaching elements to separate sections when using 'Load More' buttons

When adding a 'Load More' button in the Studio Editor, keep everything that's placed below the repeater or gallery in a separate section. If you place any elements in the same section as the repeater or gallery, and directly below the repeater or gallery, the elements will overlap when the 'Load More' button is clicked. This overlap can cause confusion for visitors as it hinders visibility and accessibility.

To avoid this issue, always ensure that any elements you want to place below the repeater or gallery, including the 'Load More' button, are attached to a separate section. This way, when users click the 'Load More' button, the gallery or repeater expands appropriately without any overlap, providing a clearer and more user-friendly experience.
Screenshot of attaching elements to a separate section from a repeater that has a 'Load More' button.
Learn more about adding a 'Load More' button:

(Static pages only) Attaching 'Next/Previous item' buttons to containers

On static pages, if visitors can click 'Next/Previous item' buttons that cause CMS-connected elements to change content, attach the displaying elements to a single container. Then set the container's ARIA (Accessible Rich Internet Applications) attributes so screen readers can announce the changed content when visitors click the buttons.

You only need to attach the elements that display the changing content. The 'Next/Previous item' buttons do not need to be attached to a container.
Wix Editor
Studio Editor
  1. Go to your editor.
  2. Add a container
  3. Click CMS  on the left side of the editor.
  4. Click Your Collections.
  5. Click and drag the elements that display CMS content onto the container to attach them.  
Screenshot of attaching elements to a container.
  1. Enable coding if you haven't already:
    1. Click Dev Mode at the top.
    2. Click Turn on Dev Mode
  2. Enable accessibility dev tools:
    1. Click Settings at the top of your editor. 
    2. Select Accessibility Wizard
    3. Click Accessibility dev tools in the panel on the right.
    4. Enable the toggle next to Expose advanced accessibility settings in the Editor
  3. Right-click on the container with attached elements that display CMS collection content.
  4. Select Accessibility.
Screenshot of right-clicking a container and selecting Accessibility.
  1. Click Add Attribute.
  2. Click the Attribute drop-down and select aria-live.
  3. Click the Attribute value drop-down and select polite
  4. Click Add.
  5. Publish your site when you're ready for the changes to go live. 

Attaching 'item count' text to a container

If you display the dataset item count in a text element, and visitors can click an input element to change the item count, attach the text to a container. Then set the container's ARIA (Accessible Rich Internet Applications) attributes so screen readers can announce the item count when it changes.

This can be relevant when visitors click inputs that filter content or inputs that collect content. Whenever visitors have the potential to alter the displayed item count, attach the text that shows the item count to a container so screen readers can announce the change.
Wix Editor
Studio Editor
  1. Go to your editor.
  2. Add a container
  3. Click and drag the text element that displays the dataset item count onto the container to attach it. If you have another text element that explains what the item count represents, attach it to the container as well (e.g. "Results"). 
  4. Enable coding if you haven't already:
    1. Click Dev Mode at the top.
    2. Click Turn on Dev Mode
  5. Enable accessibility dev tools:
    1. Click Settings at the top of your editor. 
    2. Select Accessibility Wizard
    3. Click Accessibility dev tools in the panel on the right.
    4. Enable the toggle next to Expose advanced accessibility settings in the Editor
  6. Right-click on the container with the attached text element(s).
  7. Select Accessibility.
Screenshot of right-clicking a container and selecting Accessibility.
  1. Add the first attribute: 
    1. Click Add Attribute.
    2. Click the Attribute drop-down and select aria-atomic.
    3. Click the Attribute value drop-down and select true
    4. Click Add.
  2. Add the second attribute:
    1. Click Add Attribute.
    2. Click the Attribute drop-down and select aria-live.
    3. Click the Attribute value drop-down and select polite
    4. Click Add.
  3. Publish your site when you're ready for the changes to go live. 

Making input elements accessible

When you have input elements that are set to filter content, the filters are applied as soon as a visitor makes a selection by default. You can change this behavior by adding an 'Apply filters' button

For accessibility, it’s better to add an ‘Apply filters’ button. With this button, the content is not filtered until visitors click it. This creates a better experience, especially if users want to set multiple filters before applying them all at once. 
Screenshot of an 'Apply filters' button in the Studio Editor.
When displaying the dataset item count:
If visitors can click inputs that change the item count, make sure to attach the text that displays the item count to a container. See the section above this one for more info

Making pagination bars accessible

To make pagination bars more accessible, add accessible names to both the bar itself and its buttons. These names are not visible on the screen but are essential for screen readers, helping users understand how to navigate through pages. For example, you can name the pagination bar "Page navigation" and assign clear names to buttons like "Next page", "Previous page", or customize them based on your content (e.g. "Next story" or "Previous product").
Screenshot of the accessible names in the pagination bar settings.
Tip:
In the Studio Editor, if you have a 'Load More' button, make sure to place your pagination bar and anything else that's displayed below the repeater or gallery in a separate section

FAQs

Click below for answers to common accessibility questions.