<?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>Building Browsergames &#187; accessibility</title>
	<atom:link href="http://buildingbrowsergames.com/tag/accessibility/feed/" rel="self" type="application/rss+xml" />
	<link>http://buildingbrowsergames.com</link>
	<description>Ever wanted to build a browsergame?</description>
	<lastBuildDate>Mon, 29 Mar 2010 14:00:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Making your game more accessible</title>
		<link>http://buildingbrowsergames.com/2009/02/05/making-your-game-more-accessible/</link>
		<comments>http://buildingbrowsergames.com/2009/02/05/making-your-game-more-accessible/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 14:00:27 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[accessibility]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=719</guid>
		<description><![CDATA[Recently, we talked about keeping your game accessible for those with disabilities. A few of the changes that we mentioned making to your game are fairly easy changes to make, but a few require some custom Javascript to implement. Today, we&#8217;ll be working through two simple tweaks you can make to improve the accessibility of [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, we talked about <a href='http://buildingbrowsergames.com/2009/02/02/keep-your-game-accessible/'>keeping your game accessible</a> for those with disabilities. A few of the changes that we mentioned making to your game are fairly easy changes to make, but a few require some custom Javascript to implement. Today, we&#8217;ll be working through two simple tweaks you can make to improve the accessibility of your pages: changing the text size, and changing the color scheme.</p>
<p>We will be using the <a href='http://jquery.com/'>jQuery</a> javascript library to accomplish both of these effects, along with some custom CSS.</p>
<p>First off, let&#8217;s say that the stylesheet for your page looks like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">75</span>%</span> verdana<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>color<span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #993333;">white</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>If you want to add some alternate color schemes to your page, you could add them in your CSS like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
3
4
5
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #6666ff;">.default</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #993333;">white</span><span style="color: #00AA00;">&#125;</span>
body<span style="color: #6666ff;">.red</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #993333;">green</span><span style="color: #00AA00;">&#125;</span>
body<span style="color: #6666ff;">.blue</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">blue</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #993333;">white</span><span style="color: #00AA00;">&#125;</span>
body<span style="color: #6666ff;">.green</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #993333;">green</span><span style="color: #00AA00;">;</span>background<span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>By setting up our CSS in this way, it is easy for your designer to make color scheme changes to the entire page whenever we modify the body&#8217;s class, simple by writing their CSS based on which class the body has:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #6666ff;">.red</span> p<span style="color: #6666ff;">.warning</span> <span style="color: #00AA00;">&#123;</span><span style="color: #808080; font-style: italic;">/* this would only be applied under the 'red on green' color scheme*/</span><span style="color: #00AA00;">&#125;</span>
body<span style="color: #6666ff;">.green</span> p<span style="color: #6666ff;">.warning</span> <span style="color: #00AA00;">&#123;</span><span style="color: #808080; font-style: italic;">/* this would only be applied under the 'green on black' color scheme*/</span><span style="color: #00AA00;">&#125;</span>
p<span style="color: #6666ff;">.warning</span> <span style="color: #00AA00;">&#123;</span><span style="color: #808080; font-style: italic;">/* this would be applied regardless of color scheme */</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>We will be using jQuery to dynamically add these classes to our document as necessary. We&#8217;ll start off with a basic HTML document &#8211; I&#8217;ve inlined the CSS so that you can see it all in one place; in a production environment you should make sure to keep your stylesheets separate.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;</span>
<span style="color: #00bbdd;">	&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span style="color: #000066;">xml:lang</span>=<span style="color: #ff0000;">&quot;en&quot;</span> <span style="color: #000066;">lang</span>=<span style="color: #ff0000;">&quot;en&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jQuery accessibility demo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		body {font: 75% verdana, sans-serif;color:black;background:white}
	    body.default {color:black;background:white}
		body.red {color:red;background:green}
		body.blue {color:blue;background:white}
		body.green {color:green;background:black}
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is our page, with some filler content.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;select</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">'body_colors'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'default'</span> <span style="color: #000066;">selected</span>=<span style="color: #ff0000;">'selected'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>default (black on white)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'red'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>red (red on green)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'blue'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>blue (blue on white)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'green'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>green (green on black)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/select<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>With our document set up, we&#8217;ll add the Javascript code to toggle our body&#8217;s class for us:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">charset</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
$(document).ready(function() {
    $('#body_colors').change(function() {
        $('body').attr('class',$(this).val());
    })
})
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>If you&#8217;re new to jQuery, that will probably look like voodoo to you &#8211; but it&#8217;s actually a fairly simple piece of code. We&#8217;re selecting the element on the page with the ID #body_colors(just like you would with CSS &#8211; in this case it&#8217;s a &lt;select&gt; element), and then attaching an event handler to its <em>onchange</em> function &#8211; every time that the value of the &lt;select&gt; changes, our event handler fires. All it does is find our &lt;body&gt; tag, and then set it&#8217;s class to the class that the user just selected.</p>
<p>If you open up our tester page in your browser, you should be able to see that when you select something from the dropdown, the style of the page changes &#8211; which is exactly what we were going for. You can also see it in action at <a href='http://buildingbrowsergames.com/demos/accessibility-1.html'>http://buildingbrowsergames.com/demos/accessibility-1.html</a>.</p>
<p>Modifying the text size is a bit of an interesting change, as it will require you (possibly) to modify the way that you write your CSS. When we first defined the styles for our body, you&#8217;ll notice that we added the &#8216;font&#8217; declaration, with the size of &#8216;75%&#8217;. What this has effectively done is made it so that the baseline size for all the text on the page is 12 pixels. By putting this declaration onto our body element, we can now use ems to size our text; if you wanted to make some text that was 12 pixels, you would give it a font-size of <em>1em</em> &#8211; for 24 pixels, you would use <em>2em</em>, and so on.</p>
<p>Now, at first blush you may be saying &#8220;this is kind of cool, but&#8230;why would I ever use it?&#8221;. The reason for this is simple: <strong>it makes writing our javascript much easier</strong>. Let&#8217;s add some stuff to our HTML page:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>27
28
29
30
31
32
33
34
35
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    Change font size:
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;select</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">'text_size'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'50%'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>smaller (8px)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'75%'</span> <span style="color: #000066;">selected</span>=<span style="color: #ff0000;">'selected'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>default (12px)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'100%'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>big (16px)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'125%'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>bigger (20px)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/select<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>With our font-size dropdown added, we will be writing a little bit more javascript:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>42
43
44
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#text_size'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">change</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'font-size'</span><span style="color: #339933;">,</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>This piece of jQuery is even simpler than the earlier one &#8211; all we do is modify the &#8216;font-size&#8217; attribute on our &lt;body&gt; tag with the value of the selected option.</p>
<p>If you take a look at your page in the browser now, you should notice that selecting different options in the dropdown also alters the text-size on your page. As long as you use em&#8217;s for all of your font-sizes in your document, that means that altering the text-size will transform the text across your <strong>entire</strong> site &#8211; making it much easier to read for users who have a hard time reading small text. If you&#8217;d like to see the entire page in action, you can take a look at <a href='http://buildingbrowsergames.com/demos/accessibility-2.html'>http://buildingbrowsergames.com/demos/accessibility-2.html</a>.</p>
<p>As you can see, making it so that users can alter the color scheme or text size of your page isn&#8217;t particularly difficult &#8211; but for users who need to be able to make those changes, it will make the difference between playing <strong>your</strong> game, and playing a different game that caters to their needs better. Here&#8217;s the entire source for our demo page:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;</span>
<span style="color: #00bbdd;">	&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span style="color: #000066;">xml:lang</span>=<span style="color: #ff0000;">&quot;en&quot;</span> <span style="color: #000066;">lang</span>=<span style="color: #ff0000;">&quot;en&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;meta</span> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jQuery accessibility demo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		body {font: 75% verdana, sans-serif;color:black;background:white}
	    body.default {color:black;background:white}
		body.red {color:red;background:green}
		body.blue {color:blue;background:white}
		body.green {color:green;background:black}
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/style<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>This is our page, with some filler content.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;select</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">'body_colors'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'default'</span> <span style="color: #000066;">selected</span>=<span style="color: #ff0000;">'selected'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>default (black on white)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'red'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>red (red on green)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'blue'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>blue (blue on white)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'green'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>green (green on black)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/select<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    Change font size:
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;select</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">'text_size'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'50%'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>smaller (8px)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'75%'</span> <span style="color: #000066;">selected</span>=<span style="color: #ff0000;">'selected'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>default (12px)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'100%'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>big (16px)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">'125%'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>bigger (20px)<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/select<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">charset</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    $(document).ready(function() {
        $('#body_colors').change(function() {
            $('body').attr('class','');
            $('body').addClass($(this).val());
        })
        $('#text_size').change(function() {
            $('body').css('font-size',$(this).val());
        })
    })
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2009/02/05/making-your-game-more-accessible/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Keep your game accessible</title>
		<link>http://buildingbrowsergames.com/2009/02/02/keep-your-game-accessible/</link>
		<comments>http://buildingbrowsergames.com/2009/02/02/keep-your-game-accessible/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 14:00:53 +0000</pubDate>
		<dc:creator>Luke</dc:creator>
				<category><![CDATA[accessibility]]></category>
		<category><![CDATA[improvements]]></category>

		<guid isPermaLink="false">http://buildingbrowsergames.com/?p=717</guid>
		<description><![CDATA[A Building Browsergames reader by the name of BlindAngel recently got in touch with me to talk a little bit about accessibility in browsergames &#8211; namely, the fact that it&#8217;s something a lot of browsergame developers tend not to think about when they are developing their games.
In the interest of transparency, I should clarify something [...]]]></description>
			<content:encoded><![CDATA[<p>A Building Browsergames reader by the name of <a href='http://www.DraconusMajorus.angel.startmyrpg.com'>BlindAngel</a> recently got in touch with me to talk a little bit about accessibility in browsergames &#8211; namely, the fact that it&#8217;s something a lot of browsergame developers tend not to think about when they are developing their games.</p>
<p>In the interest of transparency, I should clarify something here; <strong>BlindAngel is blind</strong>. So she, more than anyone else I know, is well qualified to talk about accessibility in browsergames; it&#8217;s a topic that applies directly to her.</p>
<p>One of the first groups she mentioned to me with accessibility concerns was people with vision loss; for people with less-than-perfect vision can have problems with text sizes on websites. Take a look at any website you run &#8211; how big is the text? Would you be able to read it from a meter away?</p>
<p>Another group that can have problems with games is those that are color blind, or have trouble distinguishing colors &#8211; sometimes simple combinations like black text on a white background can look blurry, and be difficult for them to read.</p>
<p>The biggest accessibility challenge for people who are blind is that, in BlindAngel&#8217;s words, &#8220;people forget that we have to use an automated program to access anything on the computer&#8221;. She mentions that captcha&#8217;s are a big problem for screen readers(and you shouldn&#8217;t be using them anyway, because <a href='http://www.virtualblight.com/articles/?p=20'>they don&#8217;t work</a>). In her case, she has actually ended up not playing games that she was interested in that used captchas.</p>
<p>Another problem that blind people face when playing games is with images in general; BlindAngel gives the example of a game she plays with cyphers in it:</p>
<blockquote><p>
Some games and site rely on the person being able to see to be able to play sections of their game, for example  In one game I play there are missions to do and they include cyphers, this is where a word is comprised of individual letters that are 1 letter per graphic and then scrambled. As I am unable to see, this is completely skipped by my screenreader&#8230;
</p></blockquote>
<p>Another issue she has is that alt tags on images are not always used correctly; the description needs to be &#8220;clear and concise&#8221;:</p>
<blockquote><p>
&#8230;there is nothing worse than a description that tells you it&#8217;s a person &#8211; are they doing something? is it male or female, adult or child, dressed or not&#8230;
</p></blockquote>
<p>Javascript is also not very well-suited to screen readers; BlindAngel mentioned that she has encountered dropdown menus that contain links &#8211; and as soon as she scrolls down the list so that her screen reader reads them, they redirect her to the page that they are linked to, instead of allowing her to read them.</p>
<p>Using accesskeys for some of the links on your page is a simple but effective accessibility tweak; for someone relying on a screen reader, they are not going to be able to instantly look at all the links on the page &#8211; instead having to read through them one by one. By consistently making it so that the &#8216;h&#8217; key goes to home, and the &#8216;p&#8217; key goes to the user&#8217;s profile, they no longer have to read through all the links on the page when all they want to do is go to their profile page.</p>
<p>These are some of the bigger accessibility problems encountered by people with disabilities who want to play browsergames; but as developers, we can fix them. It&#8217;s easy enough to add more descriptive alt text to your images, and basic accesskeys to the important links in your game. You want players for your game, right? There are thousands of disabled people out there; and making even just a few of these accessibility changes will propel your game to the forefront of their &#8216;to-play&#8217; lists.</p>
]]></content:encoded>
			<wfw:commentRss>http://buildingbrowsergames.com/2009/02/02/keep-your-game-accessible/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

