{"id":319,"date":"2018-12-10T16:16:34","date_gmt":"2018-12-10T16:16:34","guid":{"rendered":"https:\/\/pressbooks.library.ryerson.ca\/wafd\/?post_type=chapter&#038;p=319"},"modified":"2019-10-23T19:33:35","modified_gmt":"2019-10-23T19:33:35","slug":"activity-4-wai-aria-landmarks-and-alerts","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/chapter\/activity-4-wai-aria-landmarks-and-alerts\/","title":{"raw":"Activity 4: WAI-ARIA Landmarks and Alerts","rendered":"Activity 4: WAI-ARIA Landmarks and Alerts"},"content":{"raw":"<h2>WAI-ARIA Landmarks and Alerts<\/h2>\r\n<img src=\"http:\/\/pressbooks.library.ryerson.ca\/wafd\/wp-content\/uploads\/sites\/57\/2018\/12\/activity_sm.png\" alt=\"\" class=\"alignright size-full wp-image-152\" width=\"150\" height=\"158\" \/>Landmarks were added to the WAI-ARIA specification as a way of providing easy navigation within a web page for assistive technology users. Prior to landmarks, bypass links were often used (and still are) that would allow a screen reader user to jump from the top of a page, typically, to an anchor strategically placed further down the page. In the first part of this activity you will add a set of landmark roles to a website user interface (UI).\r\n\r\nLive regions were introduced in WAI-ARIA as a way to present changing content to assistive technology users. Feedback messages are good candidates for a live region, so the content of a feedback message is read to the user automatically when it appears without the need to search the page to determine whether an action completed successfully or, alternately, if an action produced an error message. The WAI-ARIA \u201calert\u201d role is a type of live region ideal for presenting error or success feedback messages. In Part 2 of this activity, you\u2019ll add <code>role=\"alert\"<\/code> to the error messages when the form in the landmarks.html file is submitted with missing or invalid required fields, and when it is submitted successfully.\r\n\r\nIn your copy of the activity files, open and edit the <a href=\"https:\/\/github.com\/learnaria\/learnaria.github.io\/blob\/master\/landmarks.html\">landmarks.html<\/a> file. When you have completed both parts of the activity, commit the file back to your GitHub Pages repository, or upload it to the location you have chosen to post your activity files for marking or submit a <a href=\"https:\/\/raw.githack.com\">GitHack<\/a> URL.\r\n<h2>Requirements<\/h2>\r\n<h3>Part 1: Landmarks<\/h3>\r\nAdd the appropriate landmark roles to elements within the page. Be sure all content within the page is contained within a landmarked region and, depending on the type of content on the page, apply the correct landmark for that type of content.\r\n\r\nWhen you have added all the appropriate landmarks, test the file with ChromeVox (keys: Cvox + L + semicolon) to be sure they are all functioning properly.\r\n<h3>Part 2: Live Error and Feedback Messages<\/h3>\r\nThe form on the page has three required fields. If you submit the form without valid input for these fields, an error message is generated below each field that has invalid input. Add <code>role=\"alert\"<\/code> to the first error message, so, when it appears, it is automatically read by ChromeVox along with sending focus to the first field in error so it can be corrected. Do the same for the feedback message that appears when the form is submitted without errors.\r\n\r\n<strong>HINT<\/strong>: look in <a href=\"https:\/\/github.com\/learnaria\/learnaria.github.io\/blob\/master\/join.lib.js\">join.lib.js<\/a> in the activity files.\r\n<h2>Grading Rubric<\/h2>\r\n<div>\r\n<table class=\"addborder\" style=\"width: 100%;\" border=\"1\" width=\"100%\">\r\n<thead>\r\n<tr>\r\n<th style=\"width: 89.3911%;\">Criteria<\/th>\r\n<th style=\"width: 10.5166%;\">Points<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 89.3911%;\">Content Contained:\r\nAll content is contained within a landmarked region.<\/td>\r\n<td style=\"width: 10.5166%;\">2.0 pts<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 89.3911%;\">Correct Landmarks:\r\nAppropriate landmarks have been used for each region.<\/td>\r\n<td style=\"width: 10.5166%;\">3.0 pts<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 89.3911%;\">Messages Announced:\r\nThe first Error\/Feedback message is announced when the form is submitted with and without invalid input. When the first required field is corrected, the next Error\/Feedback message is announced, and so on, so any field with invalid content is read aloud.<\/td>\r\n<td style=\"width: 10.5166%;\">4.0 pts<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 89.3911%;\">Landmarks Distinguishable:\r\nLandmark regions with the same role are distinguishable from each other.<\/td>\r\n<td style=\"width: 10.5166%;\">1.0 pts<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 89.3911%;\">Total Points:<\/td>\r\n<td style=\"width: 10.5166%;\">10.0<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>","rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69df378553d00\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69df378553d00\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/pressbooks.library.torontomu.ca\/wafd\/chapter\/activity-4-wai-aria-landmarks-and-alerts\/#WAI-ARIA_Landmarks_and_Alerts\" >WAI-ARIA Landmarks and Alerts<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/pressbooks.library.torontomu.ca\/wafd\/chapter\/activity-4-wai-aria-landmarks-and-alerts\/#Requirements\" >Requirements<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/pressbooks.library.torontomu.ca\/wafd\/chapter\/activity-4-wai-aria-landmarks-and-alerts\/#Part_1_Landmarks\" >Part 1: Landmarks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/pressbooks.library.torontomu.ca\/wafd\/chapter\/activity-4-wai-aria-landmarks-and-alerts\/#Part_2_Live_Error_and_Feedback_Messages\" >Part 2: Live Error and Feedback Messages<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/pressbooks.library.torontomu.ca\/wafd\/chapter\/activity-4-wai-aria-landmarks-and-alerts\/#Grading_Rubric\" >Grading Rubric<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"WAI-ARIA_Landmarks_and_Alerts\"><\/span>WAI-ARIA Landmarks and Alerts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/wafd\/wp-content\/uploads\/sites\/57\/2018\/12\/activity_sm.png\" alt=\"\" class=\"alignright size-full wp-image-152\" width=\"150\" height=\"158\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-content\/uploads\/sites\/57\/2018\/12\/activity_sm.png 150w, https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-content\/uploads\/sites\/57\/2018\/12\/activity_sm-65x68.png 65w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/>Landmarks were added to the WAI-ARIA specification as a way of providing easy navigation within a web page for assistive technology users. Prior to landmarks, bypass links were often used (and still are) that would allow a screen reader user to jump from the top of a page, typically, to an anchor strategically placed further down the page. In the first part of this activity you will add a set of landmark roles to a website user interface (UI).<\/p>\n<p>Live regions were introduced in WAI-ARIA as a way to present changing content to assistive technology users. Feedback messages are good candidates for a live region, so the content of a feedback message is read to the user automatically when it appears without the need to search the page to determine whether an action completed successfully or, alternately, if an action produced an error message. The WAI-ARIA \u201calert\u201d role is a type of live region ideal for presenting error or success feedback messages. In Part 2 of this activity, you\u2019ll add <code>role=\"alert\"<\/code> to the error messages when the form in the landmarks.html file is submitted with missing or invalid required fields, and when it is submitted successfully.<\/p>\n<p>In your copy of the activity files, open and edit the <a href=\"https:\/\/github.com\/learnaria\/learnaria.github.io\/blob\/master\/landmarks.html\">landmarks.html<\/a> file. When you have completed both parts of the activity, commit the file back to your GitHub Pages repository, or upload it to the location you have chosen to post your activity files for marking or submit a <a href=\"https:\/\/raw.githack.com\">GitHack<\/a> URL.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Requirements\"><\/span>Requirements<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Part_1_Landmarks\"><\/span>Part 1: Landmarks<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Add the appropriate landmark roles to elements within the page. Be sure all content within the page is contained within a landmarked region and, depending on the type of content on the page, apply the correct landmark for that type of content.<\/p>\n<p>When you have added all the appropriate landmarks, test the file with ChromeVox (keys: Cvox + L + semicolon) to be sure they are all functioning properly.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Part_2_Live_Error_and_Feedback_Messages\"><\/span>Part 2: Live Error and Feedback Messages<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The form on the page has three required fields. If you submit the form without valid input for these fields, an error message is generated below each field that has invalid input. Add <code>role=\"alert\"<\/code> to the first error message, so, when it appears, it is automatically read by ChromeVox along with sending focus to the first field in error so it can be corrected. Do the same for the feedback message that appears when the form is submitted without errors.<\/p>\n<p><strong>HINT<\/strong>: look in <a href=\"https:\/\/github.com\/learnaria\/learnaria.github.io\/blob\/master\/join.lib.js\">join.lib.js<\/a> in the activity files.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Grading_Rubric\"><\/span>Grading Rubric<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div>\n<table class=\"addborder\" style=\"width: 100%; width: 100%;\">\n<thead>\n<tr>\n<th style=\"width: 89.3911%;\">Criteria<\/th>\n<th style=\"width: 10.5166%;\">Points<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"width: 89.3911%;\">Content Contained:<br \/>\nAll content is contained within a landmarked region.<\/td>\n<td style=\"width: 10.5166%;\">2.0 pts<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 89.3911%;\">Correct Landmarks:<br \/>\nAppropriate landmarks have been used for each region.<\/td>\n<td style=\"width: 10.5166%;\">3.0 pts<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 89.3911%;\">Messages Announced:<br \/>\nThe first Error\/Feedback message is announced when the form is submitted with and without invalid input. When the first required field is corrected, the next Error\/Feedback message is announced, and so on, so any field with invalid content is read aloud.<\/td>\n<td style=\"width: 10.5166%;\">4.0 pts<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 89.3911%;\">Landmarks Distinguishable:<br \/>\nLandmark regions with the same role are distinguishable from each other.<\/td>\n<td style=\"width: 10.5166%;\">1.0 pts<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 89.3911%;\">Total Points:<\/td>\n<td style=\"width: 10.5166%;\">10.0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"author":100,"menu_order":9,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-319","chapter","type-chapter","status-publish","hentry"],"part":31,"_links":{"self":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/pressbooks\/v2\/chapters\/319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/wp\/v2\/users\/100"}],"version-history":[{"count":21,"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/pressbooks\/v2\/chapters\/319\/revisions"}],"predecessor-version":[{"id":1845,"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/pressbooks\/v2\/chapters\/319\/revisions\/1845"}],"part":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/pressbooks\/v2\/parts\/31"}],"metadata":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/pressbooks\/v2\/chapters\/319\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/wp\/v2\/media?parent=319"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/pressbooks\/v2\/chapter-type?post=319"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/wp\/v2\/contributor?post=319"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/wafd\/wp-json\/wp\/v2\/license?post=319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}