<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Indiana University: IT Training Tips Blog &#187; XHTML</title>
	<atom:link href="http://ittrainingtips.iu.edu/category/xhtml/feed" rel="self" type="application/rss+xml" />
	<link>http://ittrainingtips.iu.edu</link>
	<description>Tips and tricks to help you make the most of technology</description>
	<lastBuildDate>Thu, 16 May 2013 16:17:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using JavaScript to create a dynamic tab-based webpage</title>
		<link>http://ittrainingtips.iu.edu/cascading-style-sheets/using-javascript-to-create-a-dynamic-tab-based-webpage/09/2011</link>
		<comments>http://ittrainingtips.iu.edu/cascading-style-sheets/using-javascript-to-create-a-dynamic-tab-based-webpage/09/2011#comments</comments>
		<pubDate>Mon, 26 Sep 2011 11:13:14 +0000</pubDate>
		<dc:creator>Chabane Maidi</dc:creator>
				<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://ittrainingtips.iu.edu/?p=4106</guid>
		<description><![CDATA[Have you ever been to a web page where you can click on buttons or tabs that swap content on the page without having to load an entirely separate web page? Have you ever wondered how to make your own page have similar behavior? Well, there&#8217;s good news and bad news. The bad news is [...]]]></description>
				<content:encoded><![CDATA[<p>Have you ever been to a web page where you can click on buttons or tabs that swap content on the page without having to load an entirely separate web page? Have you ever wondered how to make your own page have similar behavior?<br />
Well, there&#8217;s good news and bad news. The bad news is that you&#8217;re going to need to write a bit of javascript to get this to work, and if you don&#8217;t know javascript, I can understand your reflex to just close this tutorial right now&#8211; but hold on! The good news is that it&#8217;s simple and doesn&#8217;t require an in-depth understanding of javascript to get this working.</p>
<p>Prerequisites for this tutorial:<br />
A moderate understanding of XHTML and CSS</p>
<p><span id="more-4106"></span>In order to get started, create a new xhtml document using your favorite xhtml editor, and save it as anything you like (make sure it has either an htm or html file extension!), and copy the following code into your blank document:</p>
<pre><code>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0
Transitional//EN&quot;
&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;EN&quot; lang=&quot;EN&quot;&gt;
&lt;head&gt;
&lt;title&gt;Test Page&lt;/title&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html;
charset=iso-8859-1&quot; /&gt;

&lt;style type=&quot;text/css&quot;&gt;
body
{
  text-align: center; /* to support older IE browsers */
  font: 100% calibri, verdana, sans-serif;
  margin: 0px; /* zero out margin and padding for best browser
compatibility */
  padding: 0px;
}
div#wrapper
{
  text-align: left; /* overrides the centering in the body rule */
  margin: 0px auto; /* centers the content on the browser window */
  width: 800px;
  background-color: #cddaff;
}
div#header
{
  text-align: center;
  background-color: #b2fadb;
}
table#buttons
{
  border-spacing: 25px 0px;
  margin: 0px auto;
  padding-bottom: 10px;
}
table#buttons td
{
  border: 1px solid #769185;
  margin: 0px 20px;
  width: 200px;
  height: 50px;
}
div#footer
{
  text-align: center;
  font-size: 70%;
  background-color: #b6c9ff;	
}
div.contentPage
{
  width: 700px;
  margin: 0px auto;
  border: dashed 1px #769185;
  padding: 10px;
  font-size: 120%;
}
h2, p
{
  margin-top: 0px;
  padding: 3px;
}
&lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;wrapper&quot;&gt;
  &lt;div id=&quot;header&quot;&gt;
    &lt;h1&gt;Click a button to see each page&lt;/h1&gt;
    &lt;table id=&quot;buttons&quot;&gt;
      &lt;tr&gt;
        &lt;td&gt;Home&lt;/td&gt;
        &lt;td&gt;Contact&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/div&gt; &lt;!-- /header --&gt;
  &lt;div id=&quot;contentHome&quot; class=&quot;contentPage&quot;&gt;
  &lt;h2&gt;Welcome to Gary&#039;s tent shoppe&lt;/h2&gt;
    &lt;p&gt;Hi, my name is Gary Gertmertin, and I love to sell tents. Ever since I was a wee lad, tents were beautiful pieces of human innovation to me. Over the years, I&#039;ve slept in at least fifteen tents. Don&#039;t get me wrong, I hate camping, I just love tents.
    &lt;/p&gt;
    &lt;p&gt;We sell all kinds of tents. There are doggy tents and tent mansions, complete with a swimming pool. If you want to know what types of tents we sell, then go to the contact information tab on this site, and shoot me an e-mail. We don&#039;t give out pictures, so don&#039;t bother asking.
    &lt;/p&gt;
  &lt;/div&gt;
  &lt;div id=&quot;contentContact&quot; class=&quot;contentPage&quot;&gt;
    &lt;h2&gt;How to contact Gary&lt;/h2&gt;
    &lt;p&gt;I refuse to use telephone technology. So don&#039;t ask for any telephone numbers.&lt;/p&gt;
    &lt;address&gt;
      Gary Gertmertin&lt;br /&gt;
      e-mail: gertymerty@example.com
    &lt;/address&gt;
  &lt;/div&gt;
  &lt;div id=&quot;footer&quot;&gt;
    &lt;p&gt;copyright 2011&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>From here on out, only add code that is bold and italicized.<br />
Don&#8217;t worry if you don&#8217;t understand what all the CSS is doing; for this tutorial, what&#8217;s important to be aware of here is that there are multiple divisions (as coded with div elements, and in this example there are only two) that are intended to represent different sub-pages of this xhtml document, namely, a div element uniquely identified (with the id attribute) as &#8220;contentHome&#8221; and another with the id value &#8220;contentPage.&#8221;<br />
Important: elements that you intend to control individually with javascript have to be referred to by the id attribute of the element, because unlike the class attribute, the id uniquely identifies the element and thus prevents ambiguity in the reference.<br />
Go ahead and view the newly created page in a browser. You should see that both the home page and the contact page (the dashed line boxes in the periwinkle content area) are visible, stacked on top of each other. If there were more sub-pages, then there would be even more boxes here. There is a small bit of xhtml and css groundwork that we need to take care of before getting to the javascript. First, we&#8217;re going to prepare the &#8220;buttons.&#8221;<br />
We want the user to be able to click on the &#8220;Home&#8221; and &#8220;Contact&#8221; &#8220;buttons&#8221; in the header section of the page to access the different sub-pages. Normally we would opt for anchor elements, but since we&#8217;re not actually leaving this page, we can just make the table data element behavior resemble anchor elements using css.<br />
First, add the following declaration to the &#8220;table#buttons td&#8221; style rule in the embedded stylesheet:</p>
<pre><code> 
table#buttons td 
{
  border: 1px solid #769185; 
  margin: 0px 20px; 
  width: 200px; 
  height: 50px; 
  <strong><em>cursor: pointer;</em></strong>
} 
</code></pre>
<p>Note: the &#8220;pointer&#8221; value does not work on IE4-5.5. Add &#8220;pointer: hand;&#8221; as well to accomodate those browsers.<br />
Now, when the cursor moves over those table data elements, it becomes the hand which signifies a clickable area. We can improve this further by giving an even more pronounced visual cue. Anchor elements aren&#8217;t the only elements that the hover pseudo-selector works for. Let&#8217;s create some style for when the user hovers over a button. Type in the following style rule:</p>
<pre><code> 
<strong><em>
td:hover 
{ 
  background-color: #a1e2c6;
} 
</em></strong> 
</code></pre>
<p>You can add additional properties as you like to truly have a customized appearance. The user should now be given adequate visual cues that these table data elements are dynamic.<br />
We&#8217;re almost ready to start writing some javascript to get the desired functionality to work. As it stands, all the sub-pages are visible onto the content pane when the webpage is accessed. We only want a sub-page to be visible if the corresponding button is clicked. Let&#8217;s use CSS to start hiding all the sub-pages by default.<br />
To do this, add the following declaration to the &#8220;div.contentPage&#8221; style rule:</p>
<pre><code> 
div.contentPage 
{ 
  width: 700px; 
  margin: 0px auto; 
  border: dashed 1px #769185; 
  padding: 10px; 
  font-size: 120%; 
  <strong><em>visibility: hidden;</em></strong> 
} 
</code></pre>
<p>If you refresh your page in the browser window, you&#8217;ll notice that while the sub-pages have been successfully hidden, they still take up the space in the content pane they did while they were visible. This will become especially problematic as the sub-pages become longer, or more sub-pages are added. To fix this problem, we have to separate the sub-pages from the standard document flow.<br />
To remove an element from the document flow, we can change its position property using css. Add the following declaration to the &#8220;div.contentPage&#8221; style rule:</p>
<pre><code> 
div.contentPage 
{ 
  width: 700px; 
  margin: 0px auto; 
  border: dashed 1px #769185; 
  padding: 10px; 
  font-size: 120%; 
  visibility: hidden; 
  <strong><em>position: absolute;</em></strong> 
} 
</code></pre>
<p>When you refresh the browser, the page should look as if it has no sub-pages. Now that these sub-pages are hidden away, we need to be able to get them back on command by clicking the buttons. This is where the javascript comes in. Are you ready?<br />
Javascript is a fairly advanced topic, and this tutorial isn&#8217;t designed to lay down foundational knowledge for it. Rather, you should be able to learn just enough javascript to be able to integrate this functionality in your own site, and tweak it to your liking.<br />
Add the following attribute to each opening td tag:<br />
<code><br />
&lt;td <strong><em>onmouseup=""</em></strong>&gt;Home&lt;/td&gt;<br />
&lt;td <strong><em>onmouseup=""</em></strong>&gt;Contact&lt;/td&gt;<br />
</code><br />
onmouseup is an example of an event attribute. It will allow us to call javascript code when the user lets go of the left-click button on his or her mouse while the cursor is over a button. Other examples of event attributes are onclick, onmouseover, and onmouseout just to name a few. Clever use of these events will allow you to create a creative and dynamic website.<br />
Write the following code as the value for the onmouseup attribute for the first td element:<br />
<code><br />
&lt;td onmouseup="<strong><em>showHide('contentHome','contentContact');</em></strong>"&gt;Home&lt;/td&gt;<br />
</code><br />
and the following for the second td element:<br />
<code><br />
&lt;td onmouseup="<strong><em>showHide('contentContact','contentHome');</em></strong>"&gt;Home&lt;/td&gt;<br />
</code><br />
Now, this shouldn&#8217;t really make any sense yet. Just recognize a couple facts here: showHide is the name of a function, and we are calling it here while passing in two, what are called, arguments&#8211; the strings &#8220;contentHome&#8221; and &#8220;contentContact,&#8221; which just so happen to be the names given to the buttons by their id attributes.<br />
The showHide function works by passing in the element (by its id attibute value) you want to make un-invisible as the first argument, and whatever elements you want to hide or remain hidden are however many final arguments you want to pass, whether it&#8217;s the second argument, or third or fourth and so on. So in this case, when the user clicks the Home button, the contentHome div element becomes visible, and the contentContact becomes hidden or remains hidden, and vice versa for clicking the Contact button.<br />
There&#8217;s only one problem though, and that is that the showHide javascript function does not exist yet. We have to write it, and that is just what we are going to do next. First, we are going to create an embedded javascript document within the head element of this page.<br />
Scroll up to your head element where your embedded stylesheet exists. Add an opening and closing &#8220;script&#8221; tag pair somewhere directly within the scope of the head element.</p>
<pre><code> 
<strong><em>&lt;script type="text/javascript"&gt; &lt;/script&gt;</em></strong>
</code></pre>
<p>Start off by writing the following code within the script element:<br />
<code><br />
<strong><em>function showHide()<br />
{</p>
<p>}<br />
</em></strong></code><br />
The function keyword allows you to create a new function. We&#8217;ve named this function &#8220;showHide.&#8221; Everything between the curly brace pair will be executed when this function is called. Just assume that the parenthesis pair after &#8220;showHide&#8221; are required boilerplate code to get the function to work.<br />
Inside of the curly braces type the following code:</p>
<pre><code>
function showHide() 
{ 
  <strong><em>var d = document;</em></strong> 
} 
</code></pre>
<p>We&#8217;ve now created a shorter name for document. Whenever we have to write &#8220;document,&#8221; we can simply write &#8220;d&#8221; instead. Each statement in javascript must be ended with a semicolon. Now, type the next line of code:<br />
<code><br />
var d = document;<br />
<strong><em>var args = showHide.arguments;</em></strong><br />
</code><br />
Like the previous line of code, we&#8217;ve assigned a shorter name for a longer sequence of characters to not only make typing more efficient, but more meaningful as well. By typing &#8220;showHide.arguments&#8221; we are accessing the list of arguments passed into the showHide function. The new variable &#8220;args&#8221; will now represent that list. We will now grab the first item from the list. Type the following line of code:<br />
<code><br />
var d = document;<br />
var args = showHide.arguments;<br />
<strong><em>var idName = args[0];</em></strong><br />
</code><br />
We&#8217;ve successfully grabbed the first item of the list (item 0), and stored it in the variable &#8220;idName.&#8221; This is the name of the of element we wish to &#8220;show,&#8221; but not the element itself. We have to first retrieve the element, by writing the following line of code:<br />
<code><br />
var d = document;<br />
var args = showHide.arguments;<br />
var idName = args[0];<br />
<strong><em>var elementToShow = d.getElementById(idName);</em></strong><br />
</code><br />
We are passing our idName string into the getElementById function to grab the actual element we want to make visible, and we are storing it within the new variable we have named &#8220;elementToShow.&#8221;<br />
Now that we have the element we&#8217;re looking for, to make it visibile, type the following code on a new line:<br />
<code><br />
var d = document;<br />
var args = showHide.arguments;<br />
var idName = args[0];<br />
var elementToShow = d.getElementById(idName);<br />
<strong><em>elementToShow.style.visibility = 'visible';</em></strong><br />
</code><br />
At this point, the buttons should be able to make their respective sub-pages visible, but we have a couple problems. First, the sub-page made visibile will still be outside the document flow, which won&#8217;t work for this webpage design (the footer needs to be able to be pushed down). Second, we have no way of hiding any other sub-pages that might already be visible. Let&#8217;s address these problems now.<br />
Type in the following code next:<br />
<code><br />
var d = document;<br />
var args = showHide.arguments;<br />
var idName = args[0];<br />
var elementToShow = d.getElementById(idName);<br />
elementToShow.style.visibility = 'visible';<br />
<strong><em>elementToShow.style.position = 'static';</em></strong><br />
</code><br />
The default css position property value is &#8220;static,&#8221; so this should now pop the sub-page back into the document flow. Excellent, the &#8220;show&#8221; part of the showHide function is now complete. It is now time for the &#8220;hide&#8221; part.<br />
We will first start by declaring a new variable we plan to store the element we want to hide:<br />
<code><br />
var d = document;<br />
var args = showHide.arguments;<br />
var idName = args[0];<br />
var elementToShow = d.getElementById(idName);<br />
elementToShow.style.visibility = 'visible';<br />
elementToShow.style.position = 'static';</p>
<p><strong><em>var elementToHide;</em></strong><br />
</code><br />
This part is a little trickier. For this specific webpage, since there are only two sub-pages, we could just do something very similar to what we did to show the elementToShow, but that would limit this function for webpages with only two sub-pages. We need to make this function more scalable, so as to allow any number of these sub-pages.<br />
We will achieve this with a loop. For each iteration of the loop, we will hide the next argument in the list of arguments until the list is finished. To create this loop, write the following code:<br />
<code><br />
var elementToHide;<br />
<strong><em><br />
for (var i = 1; i &lt; args.length; ++i)<br />
{</p>
<p>}<br />
</em></strong></code><br />
Without having explained the logic and syntax behind this code, the important thing to understand is that with this code, starting from the second argument, everything between those curly braces will be executed exactly as many times as there exist arguments remaining in the args list.<br />
We will add three statements to this loop:</p>
<pre><code> 
var elementToHide; 
for (var i = 1; i &lt; args.length; ++i) 
{ 
  <strong><em>elementToHide = d.getElementById(args[i]);
  elementToHide.style.visibility = 'hidden';
  elementToHide.style.position = 'absolute';</em></strong>
} 
</code></pre>
<p>This should look similar to the code used to show the first argument. This time around, we are grabbing each of the remaining elements from the list, and overwriting the elementToHide variable each iteration with the next element in the list. Each element is set to be hidden again or remain hidden, and escape the document flow.<br />
At this point, if all went well, you should be able to refresh the webpage in the browser window, and the dynamic functionality of the page should be complete.<br />
If you want further practice, then try adding additional sub-pages, and buttons that correspond with them. The real challenge will come when you try to adapt this code to your own project. Hopefully this tutorial will have made the otherwise daunting javascript language manageable enough to create your own show/hide behavior to add to your website.</p>
]]></content:encoded>
			<wfw:commentRss>http://ittrainingtips.iu.edu/cascading-style-sheets/using-javascript-to-create-a-dynamic-tab-based-webpage/09/2011/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web Accessibility Made Easy: Lists</title>
		<link>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-lists/05/2011</link>
		<comments>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-lists/05/2011#comments</comments>
		<pubDate>Thu, 19 May 2011 15:55:42 +0000</pubDate>
		<dc:creator>ATAC Web Accessibility Team</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://ittrainingtips.iu.edu/?p=1709</guid>
		<description><![CDATA[This blog post in the “Web Accessibility Made Easy” series describes how to appropriately use lists… a common feature of Web sites. Although helpful, lists are not always coded correctly. Lists HTML lists are an accepted way to outline or organize information into related groups on a Web page. Lists are a particularly helpful means [...]]]></description>
				<content:encoded><![CDATA[<p>This blog post in the “Web Accessibility Made Easy” series describes how to appropriately use lists… a common feature of Web sites. Although helpful, lists are not always coded correctly.</p>
<h2>Lists</h2>
<p>HTML lists are an accepted way to outline or organize information into related groups on a Web page. Lists are a particularly helpful means of organizing navigation links. There are three list sub-types: unordered, ordered and definition. Unordered lists, which are proceeded by a bullet, may be the most common type of list. Ordered lists are more commonly recognized as numbered lists.  Definition lists are a special list type, created to order and organize term/definition pair sets.  Below are examples of each type of HTML list. For more information on HTML lists, please consult the <a href="http://www.w3.org/TR/html4/struct/lists.html">W3C HTML 4 List page</a>.</p>
<p style="padding-left: 30px"><em>Unordered:</em></p>
<ul style="padding-left: 60px">
<li>Fred</li>
<li>Joe</li>
<li>Johnny</li>
</ul>
<ul> </ul>
<p style="padding-left: 30px"><em>Ordered:</em></p>
<ol style="padding-left: 60px">
<li> Joe</li>
<li>Fred</li>
<li>Johnny</li>
</ol>
<p style="padding-left: 30px"><em>Definition:</em></p>
<p style="padding-left: 30px">Sesquipedalian</p>
<p style="padding-left: 60px">Given to using long words.</p>
<p style="padding-left: 30px">Hortatory</p>
<p style="padding-left: 60px">Marked by strong urging; serving to encourage or incite</p>
<p style="padding-left: 30px"><strong>Note: </strong>The Definition list has been faked above because the HTML definition list element is not recognized by WordPress.</p>
<p>Lists, whether unordered, ordered or definition, need to have opening and closing tags to be valid HTML lists and render correctly to user agents including internet browsers and screen-reading software.</p>
<p style="padding-left: 30px"><em>Code Example:</em></p>
<p style="padding-left: 30px"><code>&lt;ul&gt;<br /> &lt;li&gt;Fred&lt;/li&gt;<br /> &lt;li&gt;Joe&lt;/li&gt;<br /> &lt;li&gt;Johnny&lt;/li&gt;<br /> &lt;/ul&gt;</code></p>
<p>Many developers create fake lists using images and CSS style rules to create the visual appearance of a list.  This creates navigation roadblocks for screen-reader users, especially if there are multiple lists coded in the same manner.   However, with correctly coded lists, screen-reader users can jump from list to list using keyboard shortcuts for easy navigation. In addition, screen-reading software announces how many items are in each list and if nested lists are present, allowing screen-reader users to understand the hierarchical structure of the list.  For these reasons and many others, lists should always be properly coded, after which, the developer can use CSS style rules to control their visual appearance.</p>
<h2>Guideline</h2>
<p><strong>IU Web Accessibility Guidelines</strong></p>
<p>18. Mark up lists and      nested lists properly.</p>
<ol> </ol>
<h2>Tutorial</h2>
<p>This tutorial will be using both the <a href="http://iuadapts.indiana.edu/webcourse/bad/Bad.html">Bad example web page</a> and the  <a href="http://iuadapts.indiana.edu/webcourse/bad/Good2.html">Good example web page</a>, along with their associated style sheets.</p>
<p>1.   The bad code – Fake      lists coded with images and CSS.</p>
<ol> </ol>
<p style="padding-left: 30px">In the code below there is no actual list; the list is faked.  To a screen-reader user, each bullet of this fake list would be read out, “img/bullet,” which would get annoying to any person.  Instead of using &lt;img&gt; tags, the developer should have created a HTML list and used CSS style rules to change the bullet to an image.</p>
<p style="padding-left: 30px"><code>&lt;img src="img/bullet.jpg" width="7" height="7" /&gt;Learn about the federal statues&lt;br /&gt;<br /> &lt;img src="img/bullet.jpg" width="7" height="7" class="float-left" /&gt;Research free and commercial tools that can aid you&lt;br /&gt;<br /> &lt;img src="img/bullet.jpg" width="7" height="7" class="float-left" /&gt;Participate web accessibility training&lt;br /&gt;<br /> &lt;img src="img/bullet.jpg" width="7" height="7" class="float-left" /&gt;Design the web site according to the standards provided&lt;br /&gt;</code></p>
<p>2.   Create correctly coded      HTML lists.</p>
<ol> </ol>
<p style="padding-left: 30px">Add the opening and closing tags &lt;ul&gt; and &lt;/ul&gt;. Then, replace the &lt;img&gt; and &lt;br/&gt; tags with &lt;li&gt; and &lt;/li&gt; tags.  The CSS style declaration below changes the bullet into the chosen image.</p>
<p style="padding-left: 30px"><code>&lt;ul class=“cbullet”&gt;<br /> &lt;li&gt; Learn about the federal statues &lt;/li&gt;<br /> &lt;li&gt; Research free and commercial tools that can aid you &lt;/li&gt;<br /> &lt;li&gt; Participate web accessibility training &lt;/li&gt;<br /> &lt;li&gt; Design the web site according to the standards provided &lt;/li&gt;<br /> &lt;/ul&gt;</code></p>
<p style="padding-left: 30px"><em>CSS Style declaration:</em></p>
<p style="padding-left: 30px"><code>.cbullet ul {</code></p>
<p style="padding-left: 60px"><code>list-style-image: url(img/bullet.jpg);</code></p>
<p style="padding-left: 30px"><code>}</code></p>
<p style="padding-left: 30px"><strong>Note: </strong> Having an image as a bullet does not affect how screen-reading software announces the list items.</p>
<h2>Wrap Up</h2>
<p><strong> </strong></p>
<p>Properly coding all lists is an easy way to improve the accessibility and navigability of a Web site without impacting the visual design.  Properly coded HTML lists are particularly important for screen-reader users.  In addition, coding lists items properly helps web pages to validate and ensures the Web page renders accurately in any Web browsing software.</p>
]]></content:encoded>
			<wfw:commentRss>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-lists/05/2011/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Accessibility Made Easy: Tab Order</title>
		<link>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-tab-order/01/2011</link>
		<comments>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-tab-order/01/2011#comments</comments>
		<pubDate>Wed, 05 Jan 2011 20:32:01 +0000</pubDate>
		<dc:creator>ATAC Web Accessibility Team</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://ittrainingtips.iu.edu/?p=1642</guid>
		<description><![CDATA[This entry in the &#8220;Web Accessibility Made Easy&#8221; series discusses an HTML attribute many web developers may overlook… tab order. Tab order and tabindex Tab order or &#8220;tabbing order&#8221;, &#8220;defines the order in which (HTML) elements will receive focus when navigated by the user via the keyboard.&#8221; (Tabbing navigation, W3C) All elements that by specification [...]]]></description>
				<content:encoded><![CDATA[<p>This entry in the &#8220;Web Accessibility Made Easy&#8221; series discusses an HTML attribute many web developers may overlook… tab order.</p>
<h2>Tab order and tabindex</h2>
<p>Tab order or &#8220;tabbing order&#8221;, &#8220;defines the order in which (HTML) elements will receive focus when navigated by the user via the keyboard.&#8221; (<a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.11.1">Tabbing navigation, W3C</a>) All elements that by specification or scripting can receive focus will be present in the tab order. The tab order works with the following elements among others….<span id="more-1642"></span> &lt;a&gt;, &lt;area&gt;, &lt;button&gt;, &lt;input&gt;, &lt;object&gt;, &lt;select&gt;, and &lt;textarea&gt; HTML elements. Normally, the tab order is determined by the order of elements in the HTML source code. The tab order may follow an unexpected order because of the way the web page is coded. Below is an example of an illogical tab order. The example shows the layout of an HTML form with elements that would be formatted in a two column layout with CSS.</p>
<p>Form</p>
<p>First Name                  Email<br /> Last Name                   Confirm Email</p>
<p>If viewing the source code for the form elements above, it seems like they should appear in this order: first name, email, last name and confirm email. This order could easily confuse someone with a cognitive disability or someone using screen-reading software. They would expect the last name field to come after the first name field because these two pieces of information (data) are closely associated. On an extremely long form or a form with more than two columns of form elements the illogical tab order would be even more evident.</p>
<p>The tab index attribute can correct an illogical tab order. The tab index attribute, &#8220;specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767.&#8221; (<a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.11.1">Tabbing navigation, W3C</a>) Use of the tab index attribute enables tabbing to elements in the correct sequence based on the value provided in the attribute(s), beginning with the smallest value and ending with the largest value.</p>
<p>It should be noted that all elements with tab index attributes are accessed prior to page elements without tab index attributes. So tab order consists first of all page elements with tab index attributes followed by all elements without tab index attributes. This may result in illogical tab order. Tab index attributes may need to be added to all focusable HTML elements to create consistent, logical document wide tab order. Therefore, if the tab order appears logical to users without including the tabindex attribute, it is best to omit the attribute all together.</p>
<h2>Guideline</h2>
<p><strong>IU Web Accessibility Guidelines</strong></p>
<p style="padding-left: 30px">19.    Be sure tabbing through links,      form controls, and objects occurs in a logical order (sequence).</p>
<h2>Tutorial</h2>
<p>This tutorial will be using both the <a title="Bad example web page" href="http://iuadapts.indiana.edu/webcourse/bad/Bad.html" target="_blank">Bad example web page</a> and the <a title="Good example web page" href="http://iuadapts.indiana.edu/webcourse/bad/Good2.html" target="_blank">Good example web page</a>, along with their associated style sheets.</p>
<p style="padding-left: 30px">1.      The bad code &#8211; illogical tab      order</p>
<p style="padding-left: 60px">The code below has four form field elements, which are styled using CSS to control their layout. The problem is the email field comes before the last name field, so the tab order will be: first name, email, last name, confirm email.</p>
<p style="padding-left: 60px"><code>&lt;div class="formfield"&gt;<br />&lt;input name="FName"/&gt;<br />&lt;font color="#FF0000"&gt;First Name&lt;/font&gt;<br />&lt;/div&gt;<br />&lt;div&gt;<br />&lt;input name="Email"/&gt;<br />&lt;font color="#FF0000"&gt;Email&lt;/font&gt;<br />&lt;/div&gt;<br />&lt;div&gt;<br />&lt;input name="LName"/&gt;<br />&lt;font color="#FF0000"&gt;Last Name&lt;/font&gt;<br />&lt;/div&gt;<br />&lt;div&gt;<br />&lt;input name="Email2"/&gt;<br />&lt;font color="#FF0000"&gt;Confirm Email&lt;/font&gt;<br />&lt;/div&gt;</code></p>
<p style="padding-left: 30px">2.      Adding the tab index attribute to each of the form elements to correct the tab order.</p>
<p style="padding-left: 60px">The tab index attribute is added to each form element in the code below. Because this form is not the only content on the example page, a tabindex attribute of 1 is not used. Instead, the tabindex attributes begin with a value of 100. The higher tabindex attribute allows the developer to add tabindex attributes to other focusable HTML elements, preserving a logical tab order. These elements may precede the form in the source code.</p>
<p style="padding-left: 60px"><code>&lt;div class="formfield"&gt;<br />&lt;input name="FName" <strong>tabindex="100"</strong> /&gt;<br />&lt;font color="#FF0000"&gt;First Name&lt;/font&gt;<br />&lt;/div&gt;<br />&lt;div&gt;<br />&lt;input name="Email" <strong>tabindex="300"</strong> /&gt;<br />&lt;font color="#FF0000"&gt;Email&lt;/font&gt;<br />&lt;/div&gt;<br />&lt;div&gt;<br />&lt;input name="LName" <strong>tabindex="200"</strong> /&gt;<br />&lt;font color="#FF0000"&gt;Last Name&lt;/font&gt;<br />&lt;/div&gt;<br />&lt;div&gt;<br />&lt;input name="Email2"  onblur="validateemail();" <strong>tabindex="400"</strong> /&gt;<br />&lt;font color="#FF0000"&gt;Confirm Email&lt;/font&gt;<br />&lt;/div&gt;</code></p>
<p style="padding-left: 60px"><strong>Note:</strong> To ensure a logical tab order on the Good example web page, tabindex attributes should be added to all other &lt;a&gt;, &lt;select&gt;, &lt;input&gt;, &lt;textfield&gt; and &lt;button&gt; HTML elements.</p>
<h2>Wrap Up</h2>
<p>To ensure web pages have a logical tab order, use the tabindex attribute to control tab order. Logical tab order is important for people with and without disabilities because most people find it is very convenient to use tabbing navigation when filling out online forms. The next time you are filling out an online form, pay close attention to the tab order and the use of tabbing navigation. You will realize just how important tab order really is.</p>
]]></content:encoded>
			<wfw:commentRss>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-tab-order/01/2011/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Accessibility Made Easy: Form Labels</title>
		<link>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-form-labels/01/2011</link>
		<comments>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-form-labels/01/2011#comments</comments>
		<pubDate>Wed, 05 Jan 2011 19:28:35 +0000</pubDate>
		<dc:creator>ATAC Web Accessibility Team</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://ittrainingtips.iu.edu/?p=1652</guid>
		<description><![CDATA[This entry in the “Web Accessibility Made Easy” series will discuss explicitly associating a label with a form control. Label Elements The &#60;label&#62; element is an HTML element that defines a label for a specific control on a form.  There are two different ways to use label elements to associate a form control with a [...]]]></description>
				<content:encoded><![CDATA[<p>This entry in the “Web Accessibility Made Easy” series will discuss explicitly associating a label with a form control.</p>
<h2>Label Elements</h2>
<p>The &lt;label&gt; element is an HTML element that defines a label for a specific control on a form.  There are two different ways to use label elements to associate a form control with a meaningful, control specific label. The first way is to associate the label element’s “for” attribute with the corresponding “id” attribute of the form control.  The second way is to give the form control a title attribute, using the label description as the title.</p>
<p>Associating labels with form controls is essential to screen-reader users. Without explicit labeling of form controls, these users would have to guess what kind of information should be entered in each form control. <span id="more-1652"></span>Because by HTML specification label elements associate physical text with form controls, the associated label is always visually displayed. This may interrupt the flow and layout of the Web page.  However, Web developers can use a CSS style, like the one below, to hide content and keep it from being displayed visually on a page.  Although hidden content is not visually displayed, it is accessible to adaptive technology and keyboard-only users.<strong> </strong>Using the second method mentioned above, a Web developer can also explicitly label a form control, but not include physical text. This method is not recommended, but is useful for specialized form controls such as search fields. An easy way to check that all form controls have explicit labels is to use a tool like the <a href="http://firefox.cita.uiuc.edu/"><strong>Firefox Web Accessibility Extension</strong></a> from the University of Illinois Urbana-Champaign.  This tool allows Web developers to quickly identify which form controls are labeled and which are not.   Another way to do this is to look at the source code and verify each form control has and associated &lt;label&gt; element or a title attribute.</p>
<p style="padding-left: 30px">CSS Style to hide content</p>
<p style="padding-left: 30px"><code>.auraltext {</code></p>
<p style="padding-left: 30px"><code>position: absolute;<br />left:-9999px;<br />top:auto;<br />width:1px;<br />height:1px;<br />overflow:hidden;<br />}</code></p>
<p style="padding-left: 30px"><code>.auraltext:focus { </code></p>
<p style="padding-left: 30px"><code>position:static;<br />color:#000000;<br />width:auto;<br />height:auto;<br />outline: thin dotted black;<br />}</code></p>
<h2>Guideline</h2>
<p><strong>IU Web Accessibility Guidelines</strong></p>
<p style="padding-left: 30px">20. Associate labels explicitly with their form controls through positioning, coding or both.</p>
<h2>Tutorial</h2>
<p>This tutorial will use both the <a href="http://iuadapts.indiana.edu/webcourse/bad/Bad.html">Bad example web page</a> and the  <a href="http://iuadapts.indiana.edu/webcourse/bad/Good2.html">Good example web page</a>, along with their associated style sheets</p>
<p style="padding-left: 30px">1.      Bad code – No explicit      label for the form control.</p>
<ol> </ol>
<p style="padding-left: 60px">The code below has a form control that is styled using CSS to control its layout. The problem is that because the text label for the  control appears after the &lt;input&gt; element, screen-reading software does not correctly associate label with the form control.  Also, depending on the placement of the form control, screen-reading software may associate the text in front of the form control as the label for that form control.  If a paragraph of text were to come before the form control, this could become very confusing for a screen-reader user.</p>
<p style="padding-left: 60px"><code>&lt;div class="formcontrol"&gt;<br />&lt;input name="FName"/&gt;<br />&lt;font color="#FF0000"&gt;First Name&lt;/font&gt;<br />&lt;/div&gt;</code></p>
<p style="padding-left: 30px">2.      Position the text label      before the form control.</p>
<ol> </ol>
<p style="padding-left: 60px">To make the form easier to read for all users, the form control label “First Name” has been moved to the left side of the form control from the right side. Because this is a text input form control there is no reason, aside from design choice, to position the label after the form control.  However, if it were a radio button or checkbox, the convention is for the label to appear after the radio button or checkbox.</p>
<p style="padding-left: 60px"><code>&lt;div class="formcontrol”&gt;<br />&lt;font color="#FF0000"&gt;First Name&lt;/font&gt;<br />&lt;input type="text" /&gt;<br />&lt;/div&gt;</code></p>
<p style="padding-left: 30px">3.       Remove and replace deprecated      HTML elements.</p>
<ol> </ol>
<p style="padding-left: 60px">Next, to make the code XHTML compliant the deprecated font element has been replaced with a &lt;span&gt; element and a CSS style. Removing deprecated elements helps to ensure a Web page validates to the selected standards.</p>
<p style="padding-left: 60px"><code>&lt;div class="formcontrol"&gt;<br />&lt;span class="red"&gt;First Name&lt;/span&gt;<br />&lt;input name="FName" /&gt;<br />&lt;/div&gt;</code></p>
<p style="padding-left: 30px">4.      Add the &lt;label&gt; element      to the form control.</p>
<ol> </ol>
<p style="padding-left: 60px">The &lt;label&gt; element is then added.  The “for” attribute of the &lt;label&gt; element is used to explicitly associate the label with the form control by way of the input element’s “id” attribute.</p>
<p style="padding-left: 60px"><code>&lt;div class="formcontrol"&gt;<br />&lt;label for="FName"&gt;&lt;span&gt;First Name&lt;/span&gt;&lt;/label&gt;<br />&lt;input name="FName" /&gt;<br />&lt;/div&gt;</code></p>
<p style="padding-left: 30px">5.     Associate the label element      with the input element.</p>
<ol> </ol>
<p style="padding-left: 60px">Since the “id” attribute was not originally included in the input element, it must be added. The “for” attribute of the &lt;label&gt; element and “id” attribute of the &lt;input&gt; element must match exactly. Following these steps will ensure the form control is explicitly associated with the text label.  To make the rest of the forms on the web site accessible, &lt;label&gt; elements should be added, using the same techniques, to all the other form control.</p>
<p style="padding-left: 60px"><code>&lt;div class="formcontrol"&gt;<br />&lt;label for="FName"&gt;&lt;span&gt;First Name&lt;/span&gt;&lt;/label&gt;<br />&lt;input name="FName" /&gt;<br />&lt;/div&gt;</code></p>
<p style="padding-left: 60px"><em>Alternative Label technique:</em></p>
<p style="padding-left: 60px">The example below uses the title attribute technique to explicitly label a form control.  In the example there is a search field and search button.  The title attribute is added to the text input form control, the submit input form type automatically uses the value attribute as the label.</p>
<p style="padding-left: 60px"><code>&lt;div id="search_container”&gt;<br />&lt;input title="search form control" /&gt;&amp;nbsp;&amp;nbsp;<br />&lt;input value="Go" /&gt;<br />&lt;/div&gt;</code></p>
<h2><strong>Wrap Up</strong></h2>
<p><strong> </strong></p>
<p>Explicitly labeling form controls ensures that users of adaptive technology can accurately identify which information is supposed to be entered into each form control.  Rather than retrofitting a Web site so all forms are labeled, it is more expedient to incorporate form labels into the Web development work flow. Following this practice will add minimal time to Web site development, but will greatly  increase accessibility and usability.</p>
]]></content:encoded>
			<wfw:commentRss>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-form-labels/01/2011/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Accessibility Made Easy: Primary Language</title>
		<link>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-primary-language/12/2010</link>
		<comments>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-primary-language/12/2010#comments</comments>
		<pubDate>Thu, 02 Dec 2010 18:57:12 +0000</pubDate>
		<dc:creator>ATAC Web Accessibility Team</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://ittrainingtips.iu.edu/?p=1236</guid>
		<description><![CDATA[This entry in the “Web Accessibility Made Easy” series will discuss setting the primary language of a web page and how to deal with language changes. Language Attribute The Language attribute of HTML, lang=&#8221;fr&#8221;, identifies the language of the document to user agents (browsers, search engines, assistive technology), in this case to French. Including the [...]]]></description>
				<content:encoded><![CDATA[<p>This entry in the “Web Accessibility Made Easy” series will discuss setting the primary language of a web page and how to deal with language changes.</p>
<h2><strong>Language Attribute</strong></h2>
<p>The Language attribute of HTML, lang=&#8221;fr&#8221;, identifies the language of the document to user agents (browsers, search engines, assistive technology), in this case to French. Including the language attribute in the &lt;html &gt; tag at the beginning of a document sets the primary language for the entire document.  If the document will adhere to the XHTML specification, the xml:lang=&#8221;fr&#8221; language attribute should also be included. The xml:lang attribute is the standard way to identify language information in XML. Subsequent use of the language attribute changes the primary language to a different language, but only for that HTML element.  Language reverts back to the primary language at the end of the element.  </p>
<p><span id="more-1236"></span></p>
<p>The syntax consists of primary code followed by an optional dash and subcode:</p>
<p>lang=&#8221;primary code (&#8220;-&#8221; subcode) &#8220;</p>
<p>Sample Language codes:</p>
<p>lang=&#8221;fr&#8221; : French.<br /> lang=&#8221;en-US&#8221; : The U.S. version of English.<br /> lang=&#8221;en-cockney&#8221; : the Cockney version of English. <br /> lang=&#8221;i-navajo&#8221; : the Navajo language spoken by some Native Americans. <br /> lang=&#8221;x-klingon&#8221; : The primary tag &#8220;x&#8221; indicates an experimental language tag (<a href="http://www.w3.org/TR/html401/struct/dirlang.html">W3C</a>)</p>
<p>Two-letter primary codes are reserved for language abbreviations that  adhere to the <a href="http://xml.coverpages.org/iso639a.html">[ISO639]</a> standard. Likewise, any two-letter optional sub code should adhere to the <a href="http://xml.coverpages.org/country3166.html">[ISO3166]</a> standard.</p>
<h2><strong>Guideline</strong></h2>
<h3><strong>IU Web Accessibility Guidelines</strong><strong> </strong></h3>
<ol>
<li><strong>Clearly identify the primary natural language of the document and any instances when that language changes to another language including instances of text equivalents.</strong></li>
</ol>
<p><strong> </strong></p>
<ol> </ol>
<p>This guideline requires that in every document the language attribute is used in the &lt;html&gt; tag to  specify the primary language.  The guideline also stipulates that any subsequent changes of language be specified.  This allows for proper rendering of the text for all user agents including screen-reading software.</p>
<h2>Tutorial</h2>
<p>This tutorial will again be using the <a href="http://iuadapts.indiana.edu/webcourse/bad/Bad.html">Bad example web page</a>,  the <a href="http://iuadapts.indiana.edu/webcourse/bad/Good2.html">Good example web page</a> and their associated style sheets.</p>
<p style="padding-left: 30px">1.  Viewing the bad code –      missing language attribute</p>
<p style="padding-left: 30px">The code shown below does not contain any language attributes to indicate primary language. Therefore, screen-reading software will attempt to speak the German text in the example as English assuming the default language for the screen reader has been set to English.  When the primary language is not specified, user agents &#8211; in this case screen-reading software &#8211; default to the primary language for which they have been configured, in this example English. This results in mispronunciation of any language other than English.  If web pages are coded to correctly to indicate primary and secondary languages, screen-reading software can be set to automatically switch to the appropriate language by the screen-reader user.</p>
<p style="padding-left: 30px"><em>&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;</em></p>
<p style="padding-left: 30px"><em>&lt;p&gt;Netz-Zug&amp;auml;nglichkeit ist wichtig, weil sie nicht nur jene Leute mit     Unfähigkeit fördert. Sie hilft auch, die Web site allgemeinhin zugänglich     zu bilden, indem sie Tastaturzugang, Lärmkontrollen, Aufflackernkontrollen     und viel anderen Nutzen bewilligen.&lt;/p&gt;</em></p>
<p style="padding-left: 30px">2.   Adding the Language      attribute to the &lt;html&gt; tag and to  subsequent HTML elements</p>
<p style="padding-left: 30px">To indicate primary language for a web page, add the Language attribute to the &lt;html&gt; tag as in the example below.</p>
<p style="padding-left: 30px;text-align: left"><em>&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; lang=&#8221;en-US&#8221; xml:lang=&#8221;en-US&#8221;&gt;</em></p>
<p style="padding-left: 30px">Simply adding both the HTML and XML language attributes to the &lt;html&gt; tag specifies the primary language for the entire document. All user agents should render the page content in the correct language as long as there are no changes from the primary language to another language. Adding the language attribute to subsequent HTML elements will accommodate language changes within the rest of document.</p>
<p style="padding-left: 30px"><em>&lt;div lang=&#8221;de&#8221;&gt;<br />&lt;p&gt;Netz-Zug&amp;auml;nglichkeit ist wichtig, weil sie nicht nur jene Leute mit Unf&amp;auml;higkeit f&amp;ouml;rdert. Sie hilft auch, die Web site allgemeinhin zug&amp;auml;nglich zu bilden, indem sie Tastaturzugang, L&amp;auml;rmkontrollen, Aufflackernkontrollen und viel anderen Nutzen bewilligen.&lt;/p&gt;<br />&lt;/div&gt;</em></p>
<p style="padding-left: 30px">The language attribute can be added to most HTML elements  including  &lt;p&gt;, &lt;span&gt;, &lt;div&gt;, &lt;label&gt;.  An important exception to this rule … the &lt;body&gt; tag.  Instead of including the language attribute in the body tag, it should be included in the &lt;html&gt; tag, as discussed above, to specify primary language for a document.  Adding the language attribute to the &lt;div&gt; tag in the  example above renders only the text in this HTML element in German for all user agents.</p>
<h2><strong>Wrap Up</strong></h2>
<p><strong> </strong></p>
<p>Identifying the primary language is not only beneficial to users of adaptive technology; it is beneficial to all users. The language attribute helps to ensure that languages render correctly in any web browser. Additionally, search engines recognize the language attribute, which can help sort search results by language. Multiple language changes are supported without issue when the language attribute is used.  Using the language attribute adds little extra time to the development of a page. However, it makes a  big difference to users of adaptive technology, particularly for those who use  screen-reading software.</p>
]]></content:encoded>
			<wfw:commentRss>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-primary-language/12/2010/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web Accessibility Made Easy: Headings</title>
		<link>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-headings/10/2010</link>
		<comments>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-headings/10/2010#comments</comments>
		<pubDate>Fri, 15 Oct 2010 16:47:10 +0000</pubDate>
		<dc:creator>ATAC Web Accessibility Team</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://ittrainingtips.iu.edu/?p=1343</guid>
		<description><![CDATA[This entry in the “Web Accessibility Made Easy” series addresses the use of headings to add structure to the content of Web pages. Headings HTML headings have been part of the structure of an HTML document from the beginning.  The heading tags &#60;H1&#62; through &#60;H6&#62; are meant to give web documents structure. Therefore, headings should [...]]]></description>
				<content:encoded><![CDATA[<p>This entry in the “Web Accessibility Made Easy” series addresses the use of headings to add structure to the content of Web pages.</p>
<h2>Headings</h2>
<p>HTML headings have been part of the structure of an HTML document from the beginning.  The heading tags &lt;H1&gt; through &lt;H6&gt; are meant to give web documents structure. Therefore, headings should be properly nested to assign level of importance in the structure of the Web page.  <span id="more-1343"></span>Main topics of a Web page should be represented by &lt;h1&gt; tags.  Sub-topics should be represented by &lt;h2&gt; tags indicating a second level of importance in the structure of the document. The remaining &lt;h&gt; tags three through 6 are used to denote additional topics in descending order of importance.  Each level of HTML headings (&lt;h1&gt;-&lt;h6&gt;) has inherent CSS style rules applied by individual Web browsing software and which control the font size, font weight, padding and margins for each heading element.  Appearance of headings controlled by the inherent browser CSS can be over-ridden by CSS styles chosen by the Web developer.   This enables creation of web sites with specific design to the taste of the Web designer and the purpose of the Web site. However, a Web developer can add CSS style rules to heading tags so these headings fit his or her visual design.</p>
<p>Screen-reader users can discover document structure by creating lists of all the headings of each page of the Web site. The list of headings also enables screen-reader users to navigate around the Web page by selecting headings for topics in which they are interested. Screen-reader users commonly use keyboard commands to accomplish quick movement through a web site to desired content.</p>
<h2>Guideline</h2>
<p><strong>IU Web Accessibility Guidelines</strong></p>
<p style="padding-left: 30px">17.  Use heading elements to convey document structure and use them according to specification.</p>
<h2>Tutorial</h2>
<p>This tutorial illustrates both the right and wrong way to use headings on Web pages. To do this, the <a href="http://iuadapts.indiana.edu/webcourse/bad/Bad.html" target="_blank">bad example Web page</a>, the <a href="http://iuadapts.indiana.edu/webcourse/bad/Good2.html" target="_blank">good example Web page</a>, along with their associated style sheets will be used.</p>
<p style="padding-left: 30px">1.  The bad code – faking headings using visual styling</p>
<p style="padding-left: 30px">The code below is used to make the font of the text bigger and appear  to be  a heading to individuals who are can see. But coded in this manner, the document is given no structure and those visiting the page with screen readers cannot determine the relative importance of page elements/links. Appearance of the page could also be controlled by CSS style rules applied by the developer to control its visual appearance while additionally providing structure for the page.</p>
<p style="padding-left: 30px"><em>&lt;font size=&#8221;+4&#8243;&gt;Indiana University Web Accessibility Class:&lt;/font&gt;</em></p>
<p style="padding-left: 30px">2.  Adding the heading tags to replace the visual styling, &lt;font&gt; tag.</p>
<p style="padding-left: 30px">In this example above, the &lt;font&gt; tag is replaced with an &lt;h1&gt; tag.  As a result, the Web page now has more structure and is easier to navigate using screen-reading software.  If the developer chooses to code the heading style to match the bad example style above, they  create a CSS style declaration with CSS style rules (font-size: 36pt; and font-weight: normal;) and apply it to the &lt;h1&gt; tag. In fact, the &lt;font&gt; tag has been deprecated for XHTML.1.0 in favor of headings and style sheets.</p>
<p style="padding-left: 30px"><em>&lt;h1&gt; Indiana University Web Accessibility Class:&lt;/h1&gt;</em></p>
<p style="padding-left: 30px">CSS Style declaration:</p>
<p style="padding-left: 30px"><em>h1 {<br />font-size: 36pt;<br />font-weight: normal;<br />}</em></p>
<h2><strong>Wrap Up</strong></h2>
<p><strong> </strong></p>
<p>HTML Headings are a quick and easy way to improve the accessibility and navigability of a Web site for users of screen reading software, without impacting the visual design.  Unfortunately, headings do not offer explicit benefits to users who don’t use assistive technology. However, they do offer great benefits (structure, and ease of navigation for screen-reader users).</p>
]]></content:encoded>
			<wfw:commentRss>http://ittrainingtips.iu.edu/xhtml/web-accessibility-made-easy-headings/10/2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Standards Smackdown: XHTML2 vs. HTML5</title>
		<link>http://ittrainingtips.iu.edu/xhtml/web-standards-smackdown-xhtml2-vs-html5/09/2009</link>
		<comments>http://ittrainingtips.iu.edu/xhtml/web-standards-smackdown-xhtml2-vs-html5/09/2009#comments</comments>
		<pubDate>Mon, 21 Sep 2009 20:20:18 +0000</pubDate>
		<dc:creator>Amy Neymeyr</dc:creator>
				<category><![CDATA[Basic Skills]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://ittrainingtips.iu.edu/general-news/web-standards-smackdown-xhtml2-vs-html5/09/2009</guid>
		<description><![CDATA[Way back in July, the W3C (the governing organization of web standards) announced that it was not going to renew the charter of the XHTML2 working group. In non-bureaucracy speak, that means the W3C has stuffed XHTML2 standards development into a bottle and chucked it out to sea, where it will spend the rest of [...]]]></description>
				<content:encoded><![CDATA[<p><img vspace="8" align="right" alt="Standards Smackdown: XHTML2 vs. HTML5" id="image419" src="http://ittrainingtips.iu.edu/wp-content/uploads/2009/09/standardssmackdown_small.png" />Way back in July, the W3C (the governing organization of web standards) announced that <a target="_blank" href="http://www.w3.org/News/2009#item119">it was not going to renew the charter of the XHTML2 working group</a>. In non-bureaucracy speak, that means the W3C has stuffed XHTML2 standards development into a bottle and chucked it out to sea, where it will spend the rest of eternity bobbing on the waves and following the thermal currents. The W3C did this so that it could focus all of its attention on developing HTML5.</p>
<p>&#8220;Wait a minute, &#8221; one might shout on hearing this news, &#8220;I thought XHTML was the wave of the future, and HTML was what Cro-Magnons used to code their web pages??? What&#8217;s going on?&#8221;</p>
<p>Its easy to be confused, and, yes, even a little bit alarmed by this news. But, in essence, the labels here don&#8217;t really represent what you think they do: XHTML2 isn&#8217;t really XHTML as you know it, and HTML5 encompasses a lot more than HTML4.01. Here&#8217;s what you need to know about both of these standards:<span id="more-404"></span></p>
<ol>
<li><strong>XHTML2 was a radical departure from XHTML1, was not designed to be backwards-compatible, and no major browser maker supported it.</strong><br />
Yes, you read that right.  XHTML pages you&#8217;ve been building up until now would not be grandfathered in under XHTML 2 and may actually break.  Why?  In both the <a target="_blank" title="Dreamweaver workshops" href="http://ittraining.iu.edu/workshops/schedule_by_group.aspx?group=7">Dreamweaver</a> and <a target="_blank" title="XHTML workshops" href="http://ittraining.iu.edu/workshops/schedule_by_group.aspx?group=41">XHTML</a> workshops, we explain that XHTML  is a mostly happy marriage between the web-oriented HTML tags and the exacting syntax of XML.  While this is theoretically true, in practice, browsers do not actually interpret XHTML1-formatted pages as XML.  Why not? The biggest reason is that XML is an unforgiving standard &#8211; XML parsers will stop processing the document at the first error. We want web browsers to be more permissive than that, so that even if we forget to close a tag, the browser will still display our page as best it can.  XHTML2 would force browsers and other clients to parse XHTML2 as XML, which potentially means that one error in a page&#8217;s structure would result in a broken page.</li>
<ol>
<li>Even thought XHTML2 is no longer, there were some cool aspects to the XHTML2 standard, including granting every XHTML element special powers like the ability to behave like a hyperlink and reference external media such as images.</li>
</ol>
<li><strong>HTML5 is both XHTML and HTML</strong><strong>, with new deluxe features to support what web developers want to do with web pages.</strong><br />
Are you familiar and comfortable with XHTML-style- formatting, where your page is well-formed, code is in lowercase, and tag attributes are quoted? You won&#8217;t have to change a thing for HTML5.  And for those who prefer loosey-goosey HTML4.01 style syntax, where tags are closed, or not, and maybe sometimes in mixed-case?  You won&#8217;t have to change a thing for HTML5.  This aspect of the HTML5 standard is quite controversial, as there are many who argue that allowances for sloppy HTML syntax will make a mess of things behind the scenes. I would personally strongly recommend sticking with the fussier XHTML syntax for several reasons:</li>
<ol>
<li>XHTML syntax is widely accepted and used</li>
<li>the rules (once you learn them) are consistent and easy to remember</li>
<li>you leave less to the browsers to interpret (and possibly mess up)</li>
<li>XHTML will make your pages more easily understandable to other developers</li>
</ol>
<p>Some of the <strong>new exciting deluxe features in HTML5</strong> are:</p>
<ol>
<li>HTML5 will give you energy and help you lose weight! No, not really.</li>
<li>New structural tags to help you avoid the overuse of the one-size-fits-all <code>div</code> tag: <code>header</code>, <code>nav</code>, <code>section</code>,  and <code>footer</code>, to name a few.</li>
<li>New semantic tags, like <code>time</code>, <code>figure</code>, and <code>aside</code></li>
<li>Features for more advanced web developers including the ability to store data in the web browser, send and receive messages across multiple documents, and drag-and-drop</li>
</ol>
<p>Thanks to <a target="_blank" href="http://arstechnica.com/open-source/news/2009/07/decoding-the-html-5-video-codec-debate.ars">a schoolyard row among Apple, Google, Mozilla and Opera</a>, there sadly will be no simple <code>video</code> or <code>audio</code> tag in HTML5.</ol>
<p>For further reading, check out:</p>
<ul>
<li><a rel="bookmark" title="Permanent Link: XHTML 2 Dies a Lonely Death, Makes Room For HTML 5" href="http://www.webmonkey.com/blog/XHTML_2_Dies_a_Lonely_Death__Makes_Room_For_HTML_5">XHTML 2 Dies a Lonely Death, Makes Room For HTML 5</a></li>
<li><a rel="bookmark" title="Permanent Link: Misunderstanding Markup: XHTML 2/HTML 5 Comic Strip" href="http://www.smashingmagazine.com/2009/07/29/misunderstanding-markup-xhtml-2-comic-strip/">Misunderstanding Markup: XHTML 2/HTML 5 Comic Strip</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ittrainingtips.iu.edu/xhtml/web-standards-smackdown-xhtml2-vs-html5/09/2009/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tag, you&#8217;re it! The Dreamweaver Tag Chooser</title>
		<link>http://ittrainingtips.iu.edu/dreamweaver/tag-youre-it-the-dreamweaver-tag-chooser/05/2009</link>
		<comments>http://ittrainingtips.iu.edu/dreamweaver/tag-youre-it-the-dreamweaver-tag-chooser/05/2009#comments</comments>
		<pubDate>Tue, 12 May 2009 13:14:28 +0000</pubDate>
		<dc:creator>David Altenhof</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://ittrainingtips.iu.edu/dreamweaver/tag-youre-it-the-dreamweaver-tag-chooser/05/2009</guid>
		<description><![CDATA[Web authors have a wide variety of HTML or XHTML tags to work with when creating Web pages. In addition to common tags like &#60;p&#62;, &#60;ul&#62; or &#60;strong&#62;, there are lesser-known, but still useful ones such as those below: HTML/XHTML Element Use &#60;acronym&#62; An acronym &#60;cite&#62; A citation to a document such as a book [...]]]></description>
				<content:encoded><![CDATA[<p>Web  authors have a wide variety of HTML or XHTML tags to work with when creating  Web pages. In addition to common tags like &lt;p&gt;, &lt;ul&gt; or &lt;strong&gt;,  there are lesser-known, but still useful ones such as those below:</p>
<table width="500" border="1" cellspacing="0">
<tr>
<th>HTML/XHTML Element</th>
<th>Use</th>
</tr>
<tr>
<td>&lt;acronym&gt; </td>
<td>An acronym</td>
</tr>
<tr>
<td>&lt;cite&gt;</td>
<td>A citation to a document such as a book or  magazine</td>
</tr>
<tr>
<td>&lt;code&gt;</td>
<td>A code sample</td>
</tr>
<tr>
<td>&lt;dfn&gt;</td>
<td>A term that is being defined</td>
</tr>
<tr>
<td>&lt;q&gt;</td>
<td>A short, inline quote</td>
</tr>
<tr>
<td>&lt;sub&gt;,&lt;sup&gt;</td>
<td>A subscript and superscript</td>
</tr>
</table>
<p>There are dozens of similarly useful and perfectly valid elements available for use. Some of them, such as &lt;code&gt;, have a default  style in most browsers (&lt;code&gt; will render in a monospaced font). Others  such as &lt;acronym&gt; have no default style. However, you can use the tags as  hooks to add your own style by redefining the look of the element using CSS. </p>
<p><span id="more-250"></span></p>
<p>In addition to providing styling hooks, these tags also add  greater semantic meaning to your Web pages. This will aid with search engine  indexing, and it can allow you to create JavaScript applications that  manipulate these elements programmatically.</p>
<p>However, using these  tags in Dreamweaver is not as simple as clicking the bold or italic button in  the Properties panel. You could add them manually to your markup in code view, but  why do that? We use Dreamweaver so we don’t have to write code by hand, right?</p>
<p>An easy way to get access to these tags is Dreamweaver’s <em>Tag Chooser</em>.  To use the Tag Chooser, first click the  appropriate icon on the Common tab of the Insert Toolbar as shown below:
 </p>
<p><img src="http://ittrainingtips.iu.edu/wp-content/uploads/2009/05/dw_tool.gif" alt="Dreamweaver Insert Bar" /></p>
<p>You should then be able to browse a list of available HTML  tags based on their type. If you click on an individual tag, you will see a  brief description of its meaning and browser compatibility information.
</p>
<p><img src="http://ittrainingtips.iu.edu/wp-content/uploads/2009/05/tag_chooser.png" alt="Dreamweaver Tag Chooser" /></p>
<p>As you can see, you can also access tags for Web programming  in languages such as Cold Fusion and ASP.NET. </p>
<p>To surround a particular bit of text or other page elements  with a tag, simply select the text or elements you want to surround, choose  your tag in the Tag Chooser, and then click <em>insert</em>.  You may then get an options menu allowing you  to specify a class, ID, style or other attributes. Fill these fields out as necessary.  The Tag Chooser window can stay open and be used repeatedly while editing your  document. There’s no need to keep opening it.</p>
<p>
  Using this expanded vocabulary of elements will help you write better and more standards compliant code immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://ittrainingtips.iu.edu/dreamweaver/tag-youre-it-the-dreamweaver-tag-chooser/05/2009/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
