2 hours ago · Tech · 0 comments

Everything should be accessible. Or should it? Charts and graphs are a great example of where you can make something accessible, but maybe you shouldn’t. Bear with me here. Pie charts, line graphs, bar and column charts (let’s just call them all ‘charts’ for ease) are really useful, visual ways to present data, and we’d include one on a webpage using an image, like a PNG or SVG. Accessible PNGs I say ‘PNGs’, but these could be any other image format, like WebP, AVIF, or even JPG. The mechanism we’d use to embed them on our page would be the <img /> element: <img src="my-great-chart.png" alt="A description of the information the chart conveys" /> Depending on the complexity of the chart, our alt text could be doing a lot of work here. In principle, that’s fine, as the alt attribute can contain as many characters as you need, but the problem is that there’s no way of introducing any meaning to the content in alt text; it’s just a wall of unstructured text. Here’s an example with some…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.