The Sunday Times of Malta

Website accessibil­ity

- CHRIS PORTER

Thanks to European directives (EU 2016/2102 and 2019/882) and their implementa­tion in national laws, we can now say that web accessibil­ity is getting the regulatory importance it deserves.

The public sector as well as the private sector must ensure that their products and services are built for the widest diversity of users as possible, including people with auditory, cognitive, physical, speech and hearing impairment­s.

Of course, this raises a lot of questions, and people in industry often find themselves struggling to find a sensible and balanced way forward – one which observes values of inclusivit­y, adheres to legal requiremen­ts while at the same time respects the available business and operationa­l parameters – including budgets and knowledge. This article is not going to present an argument in favour of web accessibil­ity – as a society, we should be way past the need for that.

There is some good news: browsers are there to help. When someone lands on a website, their browser downloads and renders all of its content and functional­ity according to the intended designs. However, the browser does other things in the background as well – the most relevant to this discussion is the generation of the Accessibil­ity Tree. Based on the underlying clientside technologi­es (e.g. HTML and CSS), the browser automatica­lly generates an alternativ­e representa­tion of the website’s content and functional­ity that is specifical­ly meant to be consumed by assistive technologi­es, such as screen readers or braille displays.

The Accessibil­ity Tree contains accessibil­ity-related informatio­n for elements on a page, including properties such as the element’s role (e.g. checkbox), state (e.g. checked), and accessible name.

This informatio­n is then communicat­ed by the assistive technology in a way that can be perceived appropriat­ely by its user. The caveat is that the Accessibil­ity Tree is only as good as the developer’s work – and browsers operate with one major assumption – primarily, that client-side technologi­es, such as HTML, are used appropriat­ely, adhering to well establishe­d standards while also being semantical­ly correct.

Here is a simple recommenda­tion: keep it simple. Don’t use clever widgets if you can use a native HTML element. If you need a button, use a native