  {"id":21206,"date":"2025-03-28T15:35:28","date_gmt":"2025-03-28T19:35:28","guid":{"rendered":"https:\/\/carleton.ca\/webaccessibility\/?page_id=21206"},"modified":"2025-06-09T07:52:34","modified_gmt":"2025-06-09T11:52:34","slug":"alt-text-on-a-linked-image-describes-the-action","status":"publish","type":"page","link":"https:\/\/carleton.ca\/webaccessibility\/alt-text-on-a-linked-image-describes-the-action\/","title":{"rendered":"Alt text on a linked image describes the action"},"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 on a linked image describes the action\n                    <\/h1>\n                \n                                \n                            <\/header>\n\n                    <\/div>\n\n            <\/div>\n\n    <\/div>\n<\/section>\n\n\n\n<h2 id=\"accessibility\" class=\"wp-block-heading\">Accessibility<\/h2>\n\n\n\n<p>Alt text must always appear on an image which is being used as a link.<\/p>\n\n\n\n<h2 id=\"reason\" class=\"wp-block-heading\">Reason<\/h2>\n\n\n\n<p>Although not every image needs to have alt text, if the image is being to link to something, it <strong class=\"myprefix-text-bold\">must<\/strong> have alt text which describes the effect of clicking on the link. This is so a user with a screen reader doesn&#8217;t have a &#8220;wasted journey&#8221;.<\/p>\n\n\n\n<h2 id=\"best-practice\" class=\"wp-block-heading\">Best practice<\/h2>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/carleton.ca\/library\" target=\"_blank\" rel=\" noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/carleton.ca\/webservices\/wp-content\/uploads\/sites\/3\/2024\/11\/Screenshot-2024-11-11-at-2.19.37%E2%80%AFPM.png\" alt=\"Discover more information about the Library.\" class=\"wp-image-20834\" style=\"width:400px\"\/><\/a><\/figure>\n\n\n\n<p>This image is a link to the MacOdrum Library. This means that the image must have alt text to outline what will happen if the user clicks on the image. In this instance it reads:<\/p>\n\n\n\n<p><em class=\"myprefix-text-italic\">Discover more information about the MacOdrum<\/em> <em class=\"myprefix-text-italic\">Library.<\/em><\/p>\n\n\n\n<h2 id=\"example-of-less-accessible-practices\" class=\"wp-block-heading\">Example of less accessible practices<\/h2>\n\n\n\n<p>This image has no alt text. (Worse still: it conveys the message in text on the image.)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"200\" src=\"https:\/\/carleton.ca\/webaccessibility\/wp-content\/uploads\/sites\/96\/2025\/03\/To-the-library.png\" alt=\"\" class=\"wp-image-21208\" srcset=\"https:\/\/carleton.ca\/webaccessibility\/wp-content\/uploads\/sites\/96\/2025\/03\/To-the-library.png 400w, https:\/\/carleton.ca\/webaccessibility\/wp-content\/uploads\/sites\/96\/2025\/03\/To-the-library-320x160.png 320w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/figure>\n\n\n\n<p>This means the user with a screen reader does not know what the link will do, and that entire URL will be read out to them. <\/p>\n\n\n\n<h2 id=\"additional-benefits\" class=\"wp-block-heading\">Additional benefits<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong class=\"myprefix-text-bold\">Usability<\/strong>: If there is no alt text then if an image doesn&#8217;t render then the user is uncertain as to what will happen if the link is clicked. <\/li>\n\n\n\n<li><strong class=\"myprefix-text-bold\">SEO<\/strong>: Alt text improves SEO.<\/li>\n\n\n\n<li><strong class=\"myprefix-text-bold\">Marketing<\/strong>: Features that improve the usability of a site make it easy to navigate and lead to users staying longer.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"what-wcag-says\" class=\"wp-block-heading\">What WCAG says<\/h2>\n\n\n\n<p>(Be sure to <a href=\"https:\/\/app.pope.tech\/result-documentation\">learn more about errors and alerts<\/a>.)<\/p>\n\n\n\n<p><a href=\"https:\/\/www.w3.org\/WAI\/WCAG21\/Understanding\/section-headings\">Learn more about WCAG says about this issue<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Accessibility Alt text must always appear on an image which is being used as a link. Reason Although not every image needs to have alt text, if the image is being to link to something, it must have alt text which describes the effect of clicking on the link. This is so a user with [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_cu_dining_location_slug":"","footnotes":"","_links_to":"","_links_to_target":""},"cu_page_type":[18,20,14],"class_list":["post-21206","page","type-page","status-publish","hentry","cu_page_type-accessibility","cu_page_type-alt-text","cu_page_type-general"],"acf":{"cu_post_thumbnail":""},"_links":{"self":[{"href":"https:\/\/carleton.ca\/webaccessibility\/wp-json\/wp\/v2\/pages\/21206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carleton.ca\/webaccessibility\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/carleton.ca\/webaccessibility\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webaccessibility\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/carleton.ca\/webaccessibility\/wp-json\/wp\/v2\/comments?post=21206"}],"version-history":[{"count":5,"href":"https:\/\/carleton.ca\/webaccessibility\/wp-json\/wp\/v2\/pages\/21206\/revisions"}],"predecessor-version":[{"id":21303,"href":"https:\/\/carleton.ca\/webaccessibility\/wp-json\/wp\/v2\/pages\/21206\/revisions\/21303"}],"wp:attachment":[{"href":"https:\/\/carleton.ca\/webaccessibility\/wp-json\/wp\/v2\/media?parent=21206"}],"wp:term":[{"taxonomy":"cu_page_type","embeddable":true,"href":"https:\/\/carleton.ca\/webaccessibility\/wp-json\/wp\/v2\/cu_page_type?post=21206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}