{"id":16732,"date":"2022-02-10T16:14:27","date_gmt":"2022-02-10T21:14:27","guid":{"rendered":"https:\/\/carleton.ca\/webservices\/?p=16732"},"modified":"2026-03-18T08:52:06","modified_gmt":"2026-03-18T12:52:06","slug":"alt-text-1-improving-your-image-with-web-services","status":"publish","type":"post","link":"https:\/\/carleton.ca\/webservices\/2022\/alt-text-1-improving-your-image-with-web-services\/","title":{"rendered":"Alt Text 1: Improving your Image with Web Services"},"content":{"rendered":"\n<section class=\"w-screen px-6 cu-section cu-section--white ml-offset-center md:px-8 lg:px-14\">\n    <div class=\"space-y-6 cu-max-w-child-5xl  md:space-y-10 cu-prose-first-last\">\n\n            <div class=\"cu-textmedia flex flex-col lg:flex-row mx-auto gap-6 md:gap-10 my-6 md:my-12 first:mt-0 max-w-5xl\">\n        <div class=\"justify-start cu-textmedia-content cu-prose-first-last\" style=\"flex: 0 0 100%;\">\n            <header class=\"font-light prose-xl cu-pageheader md:prose-2xl cu-component-updated cu-prose-first-last\">\n                                    <h1 class=\"cu-prose-first-last font-semibold !mt-2 mb-4 md:mb-6 relative after:absolute after:h-px after:bottom-0 after:bg-cu-red after:left-px text-3xl md:text-4xl lg:text-5xl lg:leading-[3.5rem] pb-5 after:w-10 text-cu-black-700 not-prose\">\n                        Alt Text 1: Improving your Image with Web Services\n                    <\/h1>\n                \n                                \n                            <\/header>\n\n                    <\/div>\n\n            <\/div>\n\n    <\/div>\n<\/section>\n\n\n\n<h2 id=\"lets-discuss-the-subtext\" class=\"wp-block-heading\">Let&#8217;s discuss the subtext<\/h2>\n\n\n\n<p>Before you get too excited this story isn\u2019t about how to run a great PR campaign or mend your reputation after those photos get leaked to the press. When we say improving your image, we mean we are going to look at how to improve the accessibility of images on your website using <strong>alt text<\/strong>.<\/p>\n\n\n\n<h2 id=\"the-five-ws-of-alt-text\" class=\"wp-block-heading\">The five Ws of Alt Text<\/h2>\n\n\n\n<p>First things first: it\u2019s pop quiz time &#8211; let\u2019s try the five Ws (What? Why? How? When? and Who?) about alt text. (Relax: I have provided the answers for you.)<\/p>\n\n\n\n<p><strong>What?<\/strong><\/p>\n\n\n\n<p>Alt text is the little description of a picture that you can hear read to you when browsing a web page using an assistive technology called a screenreader. (It also appears in place of an image when the image is missing or hasn&#8217;t loaded.)<\/p>\n\n\n\n<p><strong>Why?<\/strong><\/p>\n\n\n\n<p>To enable people with visual disabilities to hear what the content of a picture is.<\/p>\n\n\n\n<p><strong>How?<\/strong><\/p>\n\n\n\n<p>You can add the piece of text to the image in the media library of your website.<\/p>\n\n\n\n<p><strong>When?<\/strong><\/p>\n\n\n\n<p>When the image has something that warrants description.<\/p>\n\n\n\n<p><strong>Who?<\/strong><\/p>\n\n\n\n<p>You probably think the \u2018Who\u2019 is users who have visual disabilities \u2013 but, yes sorry, it was a trick question because everyone benefits from accessible images!<\/p>\n\n\n\n<p>Let\u2019s move on swiftly from the unfairness of that trick question, to see what we mean by &#8216;everyone benefits from alt text.&#8217;<\/p>\n\n\n\n<h2 id=\"we-put-the-text-into-context\" class=\"wp-block-heading\">We put the &#8216;text&#8217; into &#8216;context&#8217;<\/h2>\n\n\n\n<p>Alt text on images serves three functions:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>It allows users with visual disabilities to hear the content of the image described to them<\/li>\n\n\n\n<li>It allows other users to read something about the content of the image if the image fails to load with the rest of the page<\/li>\n\n\n\n<li>It allows search engines like Google to index pages in a much more efficient manner<\/li>\n<\/ol>\n\n\n\n<p>These functions make it even more important to make sure you have well-crafted alt text for your images.<\/p>\n\n\n\n<p>Let\u2019s look at the When? again<\/p>\n\n\n\n<p>What does it mean when we say the &#8216;When&#8217; of alt text is &#8220;when the image has something that warrants description&#8221;? A good practice to adopt with alt text is to always consider the context of the image. Let\u2019s take a look at this image:<\/p>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"512\" src=\"https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/cat2-512x512.png\" alt=\"\" class=\"wp-image-15852\" srcset=\"https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/cat2-512x512.png 512w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/cat2-320x320.png 320w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/cat2-200x200.png 200w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/cat2-360x360.png 360w, https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/cat2.png 590w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n\n\n\n<p>Now imagine this picture is used on a page that gives very general information about cats. This picture seems very relevant to the page content because it contains a picture of \u2013 spoiler alert \u2013 a cat. Alt text might be <em>a grey cat in front of a computer<\/em>.<\/p>\n\n\n\n<p>Let&#8217;s ask ourselves two questions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>How this will seem to a person using a screen reader? and<\/li>\n\n\n\n<li>Is their experience improved by knowing there is a picture of a grey cat on this page?<\/li>\n<\/ul>\n\n\n\n<p>They are listening to information about cats and that is interrupted for them to hear the words \u201cImage: <span class=\"TextRun BCX0 SCXW94764546\" lang=\"EN-CA\" xml:lang=\"EN-CA\" data-contrast=\"auto\"><span class=\"NormalTextRun BCX0 SCXW94764546\">a grey cat in front of a computer<\/span><\/span>.\u201d In reality, it adds nothing to their experience or education to know that. This is a decorative image and in this situation, we would be correct in not assigning it any alt text.<\/p>\n\n\n\n<p>But now imagine a different scenario wherein the picture is used on a different page, this time describing research into whether or not a cat can be convinced to look at a computer screen.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/cat2-240x240.png\" alt=\"A grey cats sits, looking at the screen of a laptop\" class=\"wp-image-15852\"\/><\/figure>\n\n\n\n<p>If the user reads &#8211; or has read to them &#8211; the proposition that a cat can be persuaded (possibly by convincing them they are helping science but more likely with the promise of treats) to look at a computer screen then the context becomes completely different. Now this image is illustrative \u2013 it is demonstrating something to the user, and the user should know what the picture shows whether they can see it clearly or not.<\/p>\n\n\n\n<p>These two examples, featuring the same image in different contexts, go a long way to show both the difficulties that accompany the use of alt text and the way to think about images to help solve these difficulties.<\/p>\n\n\n\n<p>You can check through your sites to see if you think your team has been employing alt text correctly, and consider whether where to add\/change\/delete alt text if required.<\/p>\n\n\n\n<p>If you want to read more we really recommend reading <a href=\"https:\/\/webaim.org\/techniques\/alttext\/\" target=\"_blank\" rel=\"noopener noreferrer\">this article about alt text<\/a> from some of the world leaders in the field, <a href=\"https:\/\/webaim.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Accessibility in Mind<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s discuss the subtext Before you get too excited this story isn\u2019t about how to run a great PR campaign or mend your reputation after those photos get leaked to the press. When we say improving your image, we mean we are going to look at how to improve the accessibility of images on your [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":16893,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[197,390,391],"tags":[],"class_list":["post-16732","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-accessibility","category-keep","category-rewrite"],"acf":{"cu_post_thumbnail":"student-computer"},"_links":{"self":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts\/16732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/comments?post=16732"}],"version-history":[{"count":2,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts\/16732\/revisions"}],"predecessor-version":[{"id":20604,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/posts\/16732\/revisions\/20604"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/media\/16893"}],"wp:attachment":[{"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/media?parent=16732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/categories?post=16732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carleton.ca\/webservices\/wp-json\/wp\/v2\/tags?post=16732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}