Articles for April 2nd, 2019

Figure and figcaption – extended alternate text for screen readers?

The usual way of making images accessible for people who can’t see them is to provide alternative text using the alt attribute of the element. However, in many websites, images are presented with caption text to explain to sighted users what the image is showing. This is effectively an alternative text for the image, but there’s no ‘programmatic’ linkage for screen readers to pick up. HTML5 introduced the <figure> element as a container that could be used for images, and <figcaption> for their alternative text. So could this be used as a good way of handling images with captions, for everyone?

Tags: , , ,

Using Gherkin To Write Accessibility Tests

Numerous accessibility automation tools, libraries and APIs are already available (including aXe, Pa11y, Google Accessibility Tools) which can be used to check whether code has been marked up to meet accessibility standards. But these don’t cover many of the tests you’d wish to make against WCAG success criteria, which aren’t about code, but about the how the page should respond to the user’s behaviour, such as tabbing. This blog discusses how the popular Gherkin language, which is often used for defining user acceptance test scenarios, and integrates easily with many automation frameworks including Ruby/Cucumber, PHP/Behat and .NET/SpecFlow (amongst others), can be used to write acceptance tests for these user behaviour tests…

Tags: , , ,