{"id":58026,"date":"2023-08-23T17:37:56","date_gmt":"2023-08-23T12:07:56","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=58026"},"modified":"2024-06-10T15:37:41","modified_gmt":"2024-06-10T10:07:41","slug":"part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/","title":{"rendered":"Part 5 &#8211; Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader"},"content":{"rendered":"<p>This is the third example for the web aria accessibility implementation where we will understand a<span style=\"font-weight: 400;\">nnouncing the <strong>checkbox label<\/strong> and <strong>checkbox checked\/unchecked state<\/strong> correctly on the <\/span><b>spacebar<\/b><span style=\"font-weight: 400;\"> key-down and <\/span><b>click<\/b><span style=\"font-weight: 400;\">. This is the working solution below on how to make this checkbox announce label and state.<\/span><\/p>\n<h2><b>\u21d2 Code SNIPPET 3 &#8211;<\/b><\/h2>\n<pre>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"&gt;\r\n&lt;style&gt;\r\n* {\r\nbox-sizing: border-box;\r\n}\r\n\r\nul {\r\nlist-style-type: none;\r\npadding: 0;\r\nmargin: 0;\r\n}\r\n\r\nli {\r\nposition: relative;\r\ndisplay: inline-block;\r\n}\r\n\r\n.checkbox-custom {\r\nopacity: 0;\r\nposition: absolute;\r\n}\r\n\r\n.checkbox-custom-label {\r\nposition: relative;\r\ncursor: pointer;\r\ntext-decoration: none;\r\ndisplay: inline-block;\r\nvertical-align: middle;\r\n}\r\n\r\n.checkbox-custom-label::before {\r\ncontent: '';\r\nbackground: #fff;\r\nborder: 1px solid #ddd;\r\nwidth: 20px;\r\nheight: 20px;\r\npadding: 2px;\r\nmargin-right: 10px;\r\nmargin-bottom: 3px;\r\ndisplay: inline-block;\r\nvertical-align: middle;\r\n}\r\n\r\n.checkbox-custom-label:focus {\r\noutline: 5px auto -webkit-focus-ring-color;\r\noutline-offset: -2px;\r\n}\r\n\r\n.checkbox-custom-label[aria-checked=\"true\"]::before {\r\ncontent: '';\r\nbackground: url(.\/assets\/images\/icon-tick.svg) #000 no-repeat;\r\nbackground-position: center;\r\nbackground-size: 13px;\r\ncolor: #fff;\r\n}\r\n\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;header&gt;&lt;\/header&gt;\r\n\r\n&lt;main&gt;\r\n&lt;div class=\"container\"&gt;\r\n&lt;h2&gt;Checkbox Check and Uncheck status and label announce&lt;\/h2&gt;\r\n\r\n&lt;ul role=\"list\"&gt;\r\n&lt;li class=\"filter-checkbox\" role=\"listitem\"&gt;\r\n&lt;input tabindex=\"-1\" type=\"checkbox\" id=\"analyst-citations\" autocomplete=\"off\" class=\"checkbox-custom\"&gt;\r\n&lt;a tabindex=\"0\" for=\"analyst-citations\" onclick=\"changeCheckbox()\" onkeydown=\"changeCheckbox(event.keyCode)\" role=\"checkbox\" aria-checked=\"false\" aria-label=\"Analyst citations\" class=\"checkbox-custom-label\" id=\"checkbox-custom-label\"&gt;Analyst citations&lt;\/a&gt;\r\n&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/div&gt;\r\n&lt;\/main&gt;\r\n\r\n&lt;footer&gt;&lt;\/footer&gt;\r\n\r\n&lt;script&gt;\r\nfunction changeCheckbox(keyCode) {\r\nconst spacebarKeyCode = 32;\r\nconst item = document.getElementById(\"checkbox-custom-label\");\r\nconst checked = item.getAttribute(\"aria-checked\");\r\n\r\nif (keyCode &amp;&amp; keyCode !== spacebarKeyCode) {\r\nreturn;\r\n} else if (checked === \"true\") {\r\nitem.setAttribute(\"aria-checked\", \"false\");\r\n} else {\r\nitem.setAttribute(\"aria-checked\", \"true\");\r\n}\r\n}\r\n&lt;\/script&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>Here, on using the <strong>NVDA screen reader<\/strong> tool and by using the <strong>keyboard navigation TAB key,<\/strong> when you reach the checkbox initially, it will say as &#8211; <strong>checkbox not checked Analyst citations<\/strong>.<\/p>\n<p>Here, the screen reader reads out the state of the checkbox as well as the label of the checkbox, which here is Analyst citations.<\/p>\n<p>Once you press the <strong>spacebar key<\/strong> from the keyboard, the tick mark becomes visible inside the checkbox, and it will announce it as &#8211; <strong>checked; now,<\/strong> if you press this again, it will announce it as &#8211; <strong>not checked<\/strong>.<\/p>\n<p>You can see this same thing in action if you use the <strong>mouse<\/strong> instead of a <strong>keyboard,<\/strong> where it will announce the text on hover, and on clicking the checkbox, it will announce the same state as above.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-58025\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/08\/Part5-Img1.gif\" alt=\"checkbox gif\" width=\"600\" height=\"323\" \/><\/p>\n<p>In the next blog, you will see the last example for implementing web aria accessibility.<\/p>\n<p>Link to <b><a href=\"https:\/\/www.tothenew.com\/blog\/part-6-web-accessibility-focusing-on-visual-representation-of-navigation-links\/\">Part 6 &#8211; Web Accessibility: Focusing on Visual Representation of navigation links<\/a>.<\/b><\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>This is the third example for the web aria accessibility implementation where we will understand announcing the checkbox label and checkbox checked\/unchecked state correctly on the spacebar key-down and click. This is the working solution below on how to make this checkbox announce label and state. \u21d2 Code SNIPPET 3 &#8211; &lt;!DOCTYPE html&gt; &lt;html lang=&#8221;en&#8221;&gt; [&hellip;]<\/p>\n","protected":false},"author":1622,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":263,"footnotes":""},"categories":[5868,3429],"tags":[5340,5343,5344,5341,5339],"class_list":["post-58026","post","type-post","status-publish","format-standard","hentry","category-adobe","category-front-end-development","tag-aria-accessibility","tag-implementing-aria-accessibility","tag-screen-reader","tag-web-accessibility","tag-web-development"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"This is the third example for the web aria accessibility implementation where we will understand announcing the checkbox label and checkbox checked\/unchecked state correctly on the spacebar key-down and click. This is the working solution below on how to make this checkbox announce label and state. \u21d2 Code SNIPPET 3 -\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Nikhil Saxena\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Part 5 \u2013 Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"This is the third example for the web aria accessibility implementation where we will understand announcing the checkbox label and checkbox checked\/unchecked state correctly on the spacebar key-down and click. This is the working solution below on how to make this checkbox announce label and state. \u21d2 Code SNIPPET 3 -\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Part 5 \u2013 Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This is the third example for the web aria accessibility implementation where we will understand announcing the checkbox label and checkbox checked\/unchecked state correctly on the spacebar key-down and click. This is the working solution below on how to make this checkbox announce label and state. \u21d2 Code SNIPPET 3 -\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#article\",\"name\":\"Part 5 \\u2013 Web Accessibility: Fixing Checkbox to announce the \\u201cchecked\\u201d \\\/ \\u201cunchecked\\u201d state while using screen reader | TO THE NEW Blog\",\"headline\":\"Part 5 &#8211; Web Accessibility: Fixing Checkbox to announce the \\u201cchecked\\u201d \\\/ \\u201cunchecked\\u201d state while using screen reader\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/nikhil-saxena\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2023\\\/08\\\/Part5-Img1.gif\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#articleImage\"},\"datePublished\":\"2023-08-23T17:37:56+05:30\",\"dateModified\":\"2024-06-10T15:37:41+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#webpage\"},\"articleSection\":\"Adobe, Front End Development, Aria Accessibility, Implementing Aria Accessibility, Screen Reader, Web Accessibility, Web Development\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/front-end-development\\\/#listItem\",\"name\":\"Front End Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/front-end-development\\\/#listItem\",\"position\":2,\"name\":\"Front End Development\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/front-end-development\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#listItem\",\"name\":\"Part 5 &#8211; Web Accessibility: Fixing Checkbox to announce the \\u201cchecked\\u201d \\\/ \\u201cunchecked\\u201d state while using screen reader\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#listItem\",\"position\":3,\"name\":\"Part 5 &#8211; Web Accessibility: Fixing Checkbox to announce the \\u201cchecked\\u201d \\\/ \\u201cunchecked\\u201d state while using screen reader\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/front-end-development\\\/#listItem\",\"name\":\"Front End Development\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/nikhil-saxena\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/nikhil-saxena\\\/\",\"name\":\"Nikhil Saxena\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/498e150d-e7f9-4b91-b68d-20bfff1f27cb_Nikhil-Saxena-Profile-Pitcure.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Nikhil Saxena\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/\",\"name\":\"Part 5 \\u2013 Web Accessibility: Fixing Checkbox to announce the \\u201cchecked\\u201d \\\/ \\u201cunchecked\\u201d state while using screen reader | TO THE NEW Blog\",\"description\":\"This is the third example for the web aria accessibility implementation where we will understand announcing the checkbox label and checkbox checked\\\/unchecked state correctly on the spacebar key-down and click. This is the working solution below on how to make this checkbox announce label and state. \\u21d2 Code SNIPPET 3 -\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/nikhil-saxena\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/nikhil-saxena\\\/#author\"},\"datePublished\":\"2023-08-23T17:37:56+05:30\",\"dateModified\":\"2024-06-10T15:37:41+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Part 5 \u2013 Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader | TO THE NEW Blog","description":"This is the third example for the web aria accessibility implementation where we will understand announcing the checkbox label and checkbox checked\/unchecked state correctly on the spacebar key-down and click. This is the working solution below on how to make this checkbox announce label and state. \u21d2 Code SNIPPET 3 -","canonical_url":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#article","name":"Part 5 \u2013 Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader | TO THE NEW Blog","headline":"Part 5 &#8211; Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/nikhil-saxena\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2023\/08\/Part5-Img1.gif","@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#articleImage"},"datePublished":"2023-08-23T17:37:56+05:30","dateModified":"2024-06-10T15:37:41+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#webpage"},"articleSection":"Adobe, Front End Development, Aria Accessibility, Implementing Aria Accessibility, Screen Reader, Web Accessibility, Web Development"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/front-end-development\/#listItem","name":"Front End Development"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/front-end-development\/#listItem","position":2,"name":"Front End Development","item":"https:\/\/www.tothenew.com\/blog\/category\/front-end-development\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#listItem","name":"Part 5 &#8211; Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#listItem","position":3,"name":"Part 5 &#8211; Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/front-end-development\/#listItem","name":"Front End Development"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/nikhil-saxena\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/nikhil-saxena\/","name":"Nikhil Saxena","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/498e150d-e7f9-4b91-b68d-20bfff1f27cb_Nikhil-Saxena-Profile-Pitcure.jpeg","width":96,"height":96,"caption":"Nikhil Saxena"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/","name":"Part 5 \u2013 Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader | TO THE NEW Blog","description":"This is the third example for the web aria accessibility implementation where we will understand announcing the checkbox label and checkbox checked\/unchecked state correctly on the spacebar key-down and click. This is the working solution below on how to make this checkbox announce label and state. \u21d2 Code SNIPPET 3 -","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/nikhil-saxena\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/nikhil-saxena\/#author"},"datePublished":"2023-08-23T17:37:56+05:30","dateModified":"2024-06-10T15:37:41+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Part 5 \u2013 Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader | TO THE NEW Blog","og:description":"This is the third example for the web aria accessibility implementation where we will understand announcing the checkbox label and checkbox checked\/unchecked state correctly on the spacebar key-down and click. This is the working solution below on how to make this checkbox announce label and state. \u21d2 Code SNIPPET 3 -","og:url":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Part 5 \u2013 Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader | TO THE NEW Blog","twitter:description":"This is the third example for the web aria accessibility implementation where we will understand announcing the checkbox label and checkbox checked\/unchecked state correctly on the spacebar key-down and click. This is the working solution below on how to make this checkbox announce label and state. \u21d2 Code SNIPPET 3 -","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"58026","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"#aioseo-article-65e065658d3bf","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2023-08-31 12:07:56","updated":"2024-02-29 11:07:17","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/front-end-development\/\" title=\"Front End Development\">Front End Development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPart 5 \u2013 Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Front End Development","link":"https:\/\/www.tothenew.com\/blog\/category\/front-end-development\/"},{"label":"Part 5 &#8211; Web Accessibility: Fixing Checkbox to announce the \u201cchecked\u201d \/ \u201cunchecked\u201d state while using screen reader","link":"https:\/\/www.tothenew.com\/blog\/part-5-web-accessibility-fixing-checkbox-to-announce-the-checked-unchecked-state-while-using-screen-reader\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/58026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1622"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=58026"}],"version-history":[{"count":3,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/58026\/revisions"}],"predecessor-version":[{"id":58247,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/58026\/revisions\/58247"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=58026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=58026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=58026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}