Skip to content

Accessibility

By , Customer Success DirectorUpdated

Open this page in a new chat

Short answer

Sirv Media Viewer is built to meet WCAG 2.2, so people using screen readers, keyboards and other assistive technology can use your images, videos, 360 spins and 3D models. It adds ARIA labels by itself, which you can change or translate, and spins turn with the keyboard. Add alt text to images that need a description.

After reading this you will know

  • How Sirv Media Viewer meets WCAG 2.2
  • How to change and translate the ARIA labels
  • Which keys control a spin, and how to add alt text

Sirv Media Viewer is designed for accessibility, so that everyone can benefit from your content, including people using assistive technology.

The media player can be used for responsive images, videos, 360 spins or 3D models. It is designed to meet the recommendations of the Web Content Accessibility Guidelines (WCAG) 2.2.

All your media can be accessible, whether you are displaying a single item or a gallery of multiple items.

People using voiceover technology, braille tables, eyetracking software or other hardware devices will be able to navigate the items or get assistive help.

For example, users viewing a Sirv media gallery with voiceover technology will have text converted to speech and read out loud, with prompts for images, buttons and links.

ARIA labels are HTML attributes which provide descriptive text for web elements via the aria-label tag, making them more accessible to users.

Sirv Media Viewer automatically applies ARIA labels to your content. It also makes it easy for you to modify the labels, to suit your needs.

Inspired by the A11y Project, the options let you provide specific prompts and text for people using assistive technology.

OptionDefault valueDescription
galleryLabelProduct galleryLabel for the gallery
galleryRolecarouselRole description for the gallery
nextItemNext itemPrompt for the next item arrow
prevItemPrevious itemPrompt for the previous item arrow
enterFullscreenEnter fullscreenPrompt for the fullscreen icon
exitFullscreenExit fullscreenPrompt for the exit fullscreen icon
itemLabelItem %{index}Label for individual items in the gallery
itemRoleslideRole description for individual items
thumbnailLabelShow item %{index}Prompt for individual thumbnails
scrollForwardScroll thumbnails forwardPrompt for scrolling thumbnails forward
scrollBackwardScroll thumbnails backwardPrompt for scrolling thumbnails backward
showThumbnailsShow thumbnailsPrompt for showing thumbnails in fullscreen
hideThumbnailsHide thumbnailsPrompt for hiding thumbnails in fullscreen
zoomInZoom inPrompt for the zoom in button
zoomOutZoom outPrompt for the zoom out button

To customize the default values, you should reference Sirv.js on your web page:

<script src="https://scripts.sirv.com/sirvjs/v3/sirv.js"></script>

Next, use the data-options parameter to add whichever Ally options you wish to set. Each option should start with ally., for example ally.galleryLabel.

You can apply these options either inline in the div or via a script:

<div class="Sirv" data-options="a11y.nextItem: Show next slide; a11y.itemLabel: Slide %{index}; a11y.thumbnailLabel: Show slide %{index};">
<div data-src="https://demo.sirv.com/Examples/Gallery/brown-shoe.jpg" data-type="zoom"></div>
<div data-src="https://demo.sirv.com/Examples/Gallery/bag.jpg" data-type="zoom"></div>
<div data-src="https://demo.sirv.com/Examples/Gallery/sunglasses.jpg" data-type="zoom"></div>
<div data-src="https://demo.sirv.com/Examples/Gallery/blue-shoe.spin"></div>
<div data-src="https://demo.sirv.com/Examples/Gallery/video.mp4"></div>
</div>

Looks like this:

Accessibility prompts are not visible on a page. To test them, you should activate a voiceover program.

The video below demonstrates accessing the Sirv gallery using the JAWS screen reader. Click to watch this video example of a screen reader reading out loud:

Instead of controlling 360 spins by dragging with a mouse, the user can rotate it with keyboard navigation using the following keystrokes:

ShortcutFunction
TabMove focus to next item in gallery
Shift + TabMove focus to previous item in gallery
Enter or SpacebarActivate current item
EscapeExit fullscreen
Left / Right arrowsRotate 360 spin to the left or right

English language is used by default for the accessibility prompts. To customize them for different language versions of your web page, write a script that detects the users’ language.

The script can then add translated text into the data-options, using the Sirv Media Viewer JavaScript API.

It is important to add alt text to images that require a description alt=“Woman mowing lawn with hover mower”, so that they will be read out to users with visual impairments.

Depending on the context, some images should have empty alt tags alt="" for example if they have no value in helping the user understand or navigate the content on the page.

All images hosted on Sirv can have a meta description, which will be automatically applied as alt text.

You can add meta descriptions manually in your Sirv account or automatically via Sirv’s REST API. It is also possible to use AI to automatically generate alt text for your Sirv images.

Back to top