Thursday, June 13, 2019

Sitecore SXA Web Accessibility Testing: Fix for Sitecore SXA Gallery Video component

Sitecore Experience Accelerator (SXA) Web Accessibility Testing: Fix for Sitecore SXA Gallery Video component

The Web Accessibility of a website is very important NFR and needs to be taken care before going LIVE and best approach is to take care this activity during the development phase, it means developer (HTML mockup and Backend Developer) should include this activity during the development.

There are some web content accessibility guidelines (WCAG) needs to be taken care:
WCAG 1.0
WCAG 2.0

Web accessibility guidelines will help in creating the website so that public content of the website accessible to all types of people including people with disabilities via correctly designed, developed and edited website.

In order to make Web Content Accessibility Guidelines (WCAG) compliant website we have to do the Web accessibility testing of website. We can select the web accessibility testing tool as per client need from the available list at Web Accessibility Evaluation Tools List.

 You can also use the Google Chrome browser add-on WAVE Evaluation Tool.

After installation of above add-on restart the Google Chrome browser and access the required web-site and click on the WAVE Evaluation Tool icon beside browser or right click on the page and select WAVE this page

In the above screen show, the output of Web accessibility test using the WAVE Evaluation Tool are displaying, which depict: Errors, Alerts, etc….

I have used WAVE Evaluation Tool in the Sitecore XP 9.0 (9.0 rev. 180604 Update-2, SXA 1.7 rev. 180604) Experience Accelerator (SXA) website and some of the error details are:

If you click on the Contrast Option, then it will show you the Contrast related errors:

If you click on the Styles Option, then it will show you the Styling related errors:

With the help of above findings, we can resolve Web accessibility related errors and make site Web Content Accessibility Guidelines (WCAG) compliance.

While doing the Web accessibility testing I found Web accessibility bug in the Sitecore SXA Gallery Video component.

Issue Details: Thumbnail Image for SXA Gallery Video does not contain "alt" attribute in the generated HTML markup.

* In Gallery Component > Gallery Video item added
* In Gallery Video item added the image for "Custom local thumbnail" attribute which having the ALT text also.
But after rendering of image, its not showing the ALT Text for image:

<img width="1000" height="40" style="left: 0px; top: 0px; width: 1000px; height: 40px; display: block; position: absolute; min-height: 0px; max-height: none; min-width: 0px; max-width: none; opacity: 1; transform: translate3d(0px, 0px, 0px);" src="/-/media/Project/Site1/shared/Img1.png">

Fix: The alternate text not showing for the Gallery Video item image is a BUG and for that Sitecore support team provided the fix

1. Backup the /sitecore/media library/Base Themes/Core Libraries/Galleria/galleria-classic-min media attachment;
2. Download the attached galleria-classic-min-fixed.js file:

3. Attach it to the /sitecore/media library/Base Themes/Core Libraries/Galleria/galleria-classic-min item;
On the related Video item, please fill the "Description" field. It will be used for the "alt" attribute of the related Custom Thumbnail image:

Output after applying the fix:

Sitecore Stack Exchange query: Sitecore SXA Gallery Video item Thumbnail Image

Thanks to Peter Prochazka a.k.a chorpo (@Chorpo) for SXA Logo 

Issue Listing:
  • what is web accessibility initiative
  • how to use web accessibility toolbar
  • what is web accessibility and why is it important
  • what are web accessibility guidelines
  • what is web accessibility and usability
  • what is web content accessibility guidelines (wcag) 2.0
  • who benefits from web accessibility
  • what is web accessibility testing
  • web accessibility in html5



Sitecore® Technology MVP 2019

Featured Post

Sitecore-Front-end performance tuning points

In the previous Sitecore Performance Tuning article, i tried to explain about that Sitecore website performance depends upon Front-end ...

Total Pageviews

State Counter


About Me

My photo
Based in Bangalore, INDIA, Amit is a Sitecore MVP and MCC. He has an MCA from the U.P.T.U., INDIA and holds certifications including Sitecore and SharePoint 2007/2010. He is an contributor to Sitecore/MSDN communities and Amit have experience in Sitecore, ASP.Net with C#, MVC, SharePoint, Classic ASP, VB,Macros,HTML,JavaScript,JSON,BootStrap and AngularJS.


Follow me on Twitter