{"id":3424,"date":"2021-03-15T06:00:49","date_gmt":"2021-03-15T13:00:49","guid":{"rendered":"http:\/\/blogs.oregonstate.edu\/inspire\/?p=3424"},"modified":"2021-03-25T01:33:45","modified_gmt":"2021-03-25T08:33:45","slug":"reflections-on-page-elements-for-accessible-courses","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/inspire\/2021\/03\/15\/reflections-on-page-elements-for-accessible-courses\/","title":{"rendered":"Reflections on page elements for accessible courses"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>The LMS Canvas by Instructure comes with a decent set of styled elements to start with, but diving into the HTML editor is where you can really modify content, giving it a specific look and feel.\u00a0Recently I have found that I am going to these customized elements more often to help achieve learning outcomes and provide a different look and feel for accessible course pages.<\/p>\n<p>It is not limitless, however, or even as open as regular web development would be. Canvas has an <a href=\"http:\/\/bit.ly\/cnvs-allowlist\">HTML Editor Allowlist<\/a> for elements, styles and classes (though some absent from this list will work if you give it a go!). Many of these are activated by using in-line <code>class<\/code> or <code>style<\/code>, but other attributes are also available.<\/p>\n<p>Without further ado, here are three of the more popular elements I have been drawn to when creating courses over the past few terms.<\/p>\n<h2>Accessible Rich Internet Applications (ARIA)<\/h2>\n<p>Defined as<\/p>\n<blockquote><p>a set of attributes that define ways to make web content and web applications more accessible to people with disabilities<br \/>\n<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Accessibility\/ARIA\">Source<\/a><\/p><\/blockquote>\n<p>These attributes are some of the most popular because they help with accessibility (particularly, screen readers) on the course site. Where native HTML5 elements are not available, these ARIA attributes help to explain what a particular piece of content does and how a learner should interact with it. By using these, we help to make courses open to a wider set of learners.<\/p>\n<p>See the <a href=\"http:\/\/bit.ly\/cnvs-allowlist\">Canvas HTML Editor Allowlist<\/a>\u00a0for a full list of supported ARIA attributes.<\/p>\n<h3>Example 1: Element Togglers<\/h3>\n<p>You want to include an element on your course site that expands to reveal more content. You will need to make a screen reader aware that the content is there, and what it does. Using the following should get you off to a good start:<\/p>\n<pre>&lt;<span style=\"color: #0000ff\">span<\/span> <span style=\"color: #008080\">class<\/span>=\"<span style=\"color: #993300\">element_toggler<\/span>\" <span style=\"color: #008080\">role<\/span>=\"<span style=\"color: #993300\">button<\/span>\" <span style=\"color: #008080\">aria-controls<\/span>=\"<span style=\"color: #993300\">something<\/span>\" \r\n<span style=\"color: #008080\">aria-label<\/span>=\"<span style=\"color: #993300\">longer description of the element<\/span>\" <span style=\"color: #008080\">aria-expanded<\/span>=\"<span style=\"color: #993300\">false<\/span>\"&gt;\r\nClick here to see the explanation&lt;\/<span style=\"color: #0000ff\">span<\/span>&gt;\r\n\r\n&lt;<span style=\"color: #0000ff\">div<\/span> <span style=\"color: #008080\">id<\/span>=\"<span style=\"color: #993300\">something<\/span>\" <span style=\"color: #008080\">style<\/span>=\"<span style=\"color: #993300\"><span style=\"color: #0000ff\">display<\/span>: none<\/span>;\"&gt;\r\nThe explanation.\r\n&lt;\/<span style=\"color: #0000ff\">div<\/span>&gt;<\/pre>\n<dl>\n<dt><code>aria-controls=\"something\"<\/code><\/dt>\n<dd>combines with <code>id=\"something\"<\/code> later on in the code. The value must match the <code>id<\/code> value for it to work correctly. This is used to interact with the element.<\/dd>\n<dt><code>aria-label=\"longer description of the element\"<\/code><\/dt>\n<dd>used to describe the functionality of the element if it is not explained prior to the interaction.<\/dd>\n<dt><code>aria-expanded=\"false<\/code><\/dt>\n<dd>used to tell the screen reader the button is initially closed.<\/dd>\n<\/dl>\n<h3>Example 2: Descriptions<\/h3>\n<p>You have a particularly visual element on the page, and you want to write a larger piece of text for a screen reader to explain this. You can use <code>aria-describedby<\/code> and then link it to the id of an element (in the <code>&lt;span&gt;<\/code> below):<\/p>\n<pre>&lt;<span style=\"color: #0000ff\">p<\/span>&gt;&lt;<span style=\"color: #0000ff\">img<\/span> <span style=\"color: #008080\">src<\/span>=\"<span style=\"color: #993300\">close_up.jpg<\/span>\" <span style=\"color: #008080\">aria-describedby<\/span>=\"<span style=\"color: #993300\">close_up<\/span>\"&gt;\r\n&lt;<span style=\"color: #0000ff\">br<\/span>&gt;\r\n&lt;<span style=\"color: #0000ff\">span<\/span> <span style=\"color: #008080\">id<\/span>=\"<span style=\"color: #993300\">close_up<\/span>\"&gt;A close-up view of the rock target named \"M\u00e1az\" from the SuperCam \r\ninstrument on NASA's Perseverance Mars rover.&lt;\/<span style=\"color: #0000ff\">span<\/span>&gt; \r\nAnalysis of SuperCam data shows that M\u00e1az has a basaltic composition. \r\nIt is either an igneous rock or consists of fine grains of igneous material \r\nthat were cemented together in a watery environment.&lt;<span style=\"color: #0000ff\">br<\/span>&gt;\r\nFull image and caption from \r\n&lt;<span style=\"color: #0000ff\">a<\/span> <span style=\"color: #008080\">href<\/span>=\"<span style=\"color: #993300\">https:\/\/www.jpl.nasa.gov\/images\/supercam-close-up-of-maaz<\/span>\"&gt;\r\nNASA Jet Propulsion Labratory.&lt;\/<span style=\"color: #0000ff\">a<\/span>&gt; NASA\/JPL-Caltech\/LANL\/CNES\/CNRS\r\n&lt;\/<span style=\"color: #0000ff\">p<\/span>&gt;<\/pre>\n<h2>Device specific content<\/h2>\n<p>Next up, is hidden content. So you added the element_toggler above, but your learners with the Canvas Mobile App let you know they cannot click it!<\/p>\n<p>Some of the projects I work on with these elements require an entirely different way of accessing the content on a mobile device.<\/p>\n<h3>A potential fix<\/h3>\n<p>Create different versions of the content by hiding each one depending on the device.<\/p>\n<p>To do this, you will need to divide the content using two containers. Using the same element_toggler code from above, we can easily add a separate, but hidden part underneath for Canvas app users.<\/p>\n<pre>&lt;<span style=\"color: #0000ff\">span<\/span> <span style=\"color: #008080\">class<\/span>=\"<span style=\"color: #993300\">element_toggler<\/span>\" <span style=\"color: #008080\">role<\/span>=\"<span style=\"color: #993300\">button<\/span>\" <span style=\"color: #008080\">aria-controls<\/span>=\"<span style=\"color: #993300\">something<\/span>\" \r\n<span style=\"color: #008080\">aria-label<\/span>=\"<span style=\"color: #993300\">longer description of the element<\/span>\" <span style=\"color: #008080\">aria-expanded<\/span>=\"<span style=\"color: #993300\">false<\/span>\"&gt;\r\nView the explanation&lt;\/<span style=\"color: #0000ff\">span<\/span>&gt;\r\n\r\n&lt;<span style=\"color: #0000ff\">div<\/span> <span style=\"color: #008080\">id<\/span>=\"<span style=\"color: #993300\">something<\/span>\" style=\"<span style=\"color: #0000ff\">display<\/span>: <span style=\"color: #993300\">none<\/span>;\"&gt;\r\nThe explanation.\r\n&lt;\/<span style=\"color: #0000ff\">div<\/span>&gt;\r\n\r\n&lt;<span style=\"color: #0000ff\">div<\/span> <span style=\"color: #008080\">class<\/span>=\"<span style=\"color: #993300\">hidden-desktop hidden-tablet hidden-phone<\/span>\"&gt;\r\nThe explanation.\r\n&lt;\/<span style=\"color: #0000ff\">div<\/span>&gt;<\/pre>\n<p>The addition of the <code>class=\"hidden-desktop hidden-tablet hidden-phone\"<\/code> attributes will hide this container for most users. As it is sitting outside of the element toggler, however, mobile app users do not need to click the element toggler to see the explanation! This provides a more accessible option for users of those devices.<\/p>\n<p><strong>Note<\/strong>: if you have access to the stylesheet for your institution, it would be more beneficial to add these changes there than on a per-page basis.<\/p>\n<h2>Anchoring to part of a page<\/h2>\n<p>If you have ever seen text content that says something similar to this\u2026<\/p>\n<blockquote><p>As we discussed before\u2026<\/p><\/blockquote>\n<blockquote><p>As I mentioned previously\u2026<\/p><\/blockquote>\n<blockquote><p>Back in Module 3, we talked about\u2026<\/p><\/blockquote>\n<p>\u2026then you need to use this simple feature of the anchor element!<\/p>\n<p>I use this a lot on course content that requires students to refer to previous material. Everyone will have heard of a hyperlink using the <code>&lt;a&gt;<\/code> tag, but you can also use this anchor to link to a certain part of the page. I regularly use it to send learners to particular headings or content that they would find relevant for assignments. If you set up your course from the start with this in mind, it can be a fast way to group revision material from certain parts of a page, or create more accessible navigation menus.<\/p>\n<p>Give an element an id, like this:<\/p>\n<p><code>&lt;h3 id=\"section_2\"&gt;Section 2&lt;\/h3&gt;<\/code><\/p>\n<p>Then, when you want to send a learner back to that part of the page, just reference it by adding the id to the end of the page link with a `#`. For example:<\/p>\n<p><code>&lt;a href=\"https:\/\/yoursite\/page#section_2\"&gt;Section 2&lt;\/a&gt;<\/code><\/p>\n<p>This will take the learner directly to the heading with the id of \u2018section_2\u2019, which you set up before.<\/p>\n<p>You can even do this within the same page to jump to that part of the page. Just link it like this without the rest of the URL.<\/p>\n<p><code>&lt;a href=\"#section_2\u201d&gt;Section 2&lt;\/a&gt;<\/code><\/p>\n<h2>Conclusion<\/h2>\n<p>These are a sample of the elements, classes, and styles I have used to enhance content over the last few terms. With each, accessibility has been a must, which requires a bit of reflection on how learners would interact with the content. There are a lot more available, and you have a list in the <a href=\"http:\/\/bit.ly\/cnvs-allowlist\">Canvas HTML Editor Allowlist<\/a> to start experimenting. By thinking of accessibility from the early stages of course design, more users can appreciate these page elements and content.<\/p>\n<h2>References<\/h2>\n<p>1. The Canvas Style Allowlist: [<a href=\"http:\/\/bit.ly\/cnvs-allowlist\">http:\/\/bit.ly\/cnvs-allowlist<\/a>]<br \/>\n2. \u201cARIA\u201d from MDN Web Docs\/Mozilla [<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Accessibility\/ARIA\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Accessibility\/ARIA<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The LMS Canvas by Instructure comes with a decent set of styled elements to start with, but diving into the HTML editor is where you can really modify content, giving it a specific look and feel.\u00a0Recently I have found that I am going to these customized elements more often to help achieve learning outcomes&hellip; <a href=\"https:\/\/blogs.oregonstate.edu\/inspire\/2021\/03\/15\/reflections-on-page-elements-for-accessible-courses\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":10690,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[156127],"tags":[2714,1839,50425,1386662],"class_list":["post-3424","post","type-post","status-publish","format-standard","hentry","category-resources-tools-trends","tag-accessibility","tag-ecampus","tag-html5","tag-online-design"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/posts\/3424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/users\/10690"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/comments?post=3424"}],"version-history":[{"count":5,"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/posts\/3424\/revisions"}],"predecessor-version":[{"id":3462,"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/posts\/3424\/revisions\/3462"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/media?parent=3424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/categories?post=3424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/inspire\/wp-json\/wp\/v2\/tags?post=3424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}