<?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>Marco's accessibility blog &#187; HTML5</title>
	<atom:link href="http://www.marcozehe.de/tag/html5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcozehe.de</link>
	<description>Musings, tips and tricks about the accessible software world</description>
	<lastBuildDate>Tue, 07 Feb 2012 09:14:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>From WAI-ARIA to HTML5 and back&#8230;or maybe not?</title>
		<link>http://www.marcozehe.de/2011/12/05/from-wai-aria-to-html5-and-back-or-maybe-not/</link>
		<comments>http://www.marcozehe.de/2011/12/05/from-wai-aria-to-html5-and-back-or-maybe-not/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 12:01:17 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[ARIA]]></category>
		<category><![CDATA[ConstraintValidation]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[HTML5Forms]]></category>
		<category><![CDATA[WAI-ARIA]]></category>

		<guid isPermaLink="false">http://www.marcozehe.de/?p=291</guid>
		<description><![CDATA[Over the weekend, I gave a presentation at the German Multimediatreff. I talked about how to make things more accessible by combining HTML5 and WAI-ARIA in smart ways, using HTML5 where available and appropriate, and enhancing the user experience where &#8230; <a href="http://www.marcozehe.de/2011/12/05/from-wai-aria-to-html5-and-back-or-maybe-not/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Over the weekend, I gave a presentation at the German <a href="http://www.multimediatreff.de"><span lang="de">Multimediatreff</span></a>. I talked about how to make things more accessible by combining HTML5 and WAI-ARIA in smart ways, using HTML5 where available and appropriate, and enhancing the user experience where HTML5 still has gaps in the implementation. This is a recap of what I showed.</p>
<h3>The premise</h3>
<p>The base for my talk is my third <a href="http://www.marcozehe.de/2008/07/16/easy-aria-tip-3-aria-invalid-and-role-alert/">easy ARIA tip</a>, where I enhanced a form with some basic local form validation to help users fill it out and avoid errors upon submission. If you are not or no longer familiar with what I did there, stop reading here and go read that post again as a recap. If you are caught up, let&#8217;s move on!</p>
<h3>From WAI-ARIA to HTML5</h3>
<p>Since then, a lot of time has passed, and we&#8217;re now much better equipped with native markup magic that HTML5 supplies us. Thankfully, Firefox and also other browsers implement most, if not all, these features now, so we can move ahead with our changes. To remind you, WAI-ARIA is there to enhance, not substitute, native markup, so whereever possible, we should use native markup when available. These changes are:</p>
<ol>
<li>Strip all JavaScript: Let&#8217;s start clean and see how far the new native markup stuff gets us!</li>
<li>Throw out all <em><code>aria-required="true"</code></em> instances and replace them with the HTML5 <em>required</em> attribute. This gives us automatic flagging of a required field not only via accessibility APIs, but also through visual indicators. Also, a required field is automatically flagged as invalid if it is empty.</li>
<li>For the field &#8216;name&#8217;, add a <em>pattern</em> attribute containing a regular expression that defines a valid name consist of some characters, one space, and some more characters. This will cover most cases, and if you&#8217;d like something more complex, consider me giving you some homework. <img src='http://www.marcozehe.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
<li>The field &#8220;email&#8221; gets the <em>type</em> &#8220;email&#8221;, the field &#8220;website&#8221; gets the <em>type</em> &#8220;url&#8221; set. This gives us proper validation of e-mail addresses and URLs respectively right upon entry. Moreover, on mobile devices with a virtual keyboard, the most common extra keys are usually provided right out of the box.</li>
</ol>
<p>In addition, for a better error message, I am using the non-standard <em>x-moz-errormessage</em> attribute on the &#8220;name&#8221; field to tell users that the name was entered wrong rather than the standard &#8220;patterns don&#8217;t match&#8221; error message the browsers usually throw at users in the instance of them having entered a wrong value.</p>
<p>In addition, the name field contains (already in the ARIA example) a title attribute that tells users that a name must consist of at least two words.</p>
<p>Filling out this form now gives us validation upon submission. Firefox sets focus back to any invalid field it finds when users press the &#8220;submit&#8221; button. In addition, an error message is displayed describing the problem.</p>
<h3>&#8230;and back</h3>
<p>Our original example, however, was better in that it provided validation right at the point when an entry lost focus. Since this is a dynamically created alert box that is not yet a native HTML5 element, we <strong>have</strong> to resort to WAI-ARIA again to make this work the same, but using the HTML5 validation benefits. So, let&#8217;s enhance our example:</p>
<ol>
<li>Bring back the first two functions from the original ARIA version unchanged. These remove any existing alert box, and they create a new alert with the given message.</li>
<li>Adjust the function that is called in the <em>onblur</em> handler of the &#8220;name&#8221; and &#8220;email&#8221; fields (see below):
<ol>
<li>First, we have to adjust the function name to something that doesn&#8217;t clash with a reserved word. I used <code>testIfEntryIsValid</code>.</li>
<li>Now, get rid of the search string and error message parameters. These are no longer needed because the validation is done by the browser, and we simply use the HTML5 form constraints API to ask the browser for the relevant info. Also, the browser provides us with the appropriate error message, so no need to generate one ourselves here.</li>
<li>In the if clause, simply ask if the call to the checkValidity() method of the element we obtained in the line above gives us a &#8220;true&#8221; or &#8220;false&#8221; result. If true, simply remove the old alert. If false, create an alert and use the element&#8217;s validationMessage property as the message parameter. The browser will handle the rest for us.</li>
<li>Remove the lines that set <em>aria-invalid</em>. These are no longer needed, since the browser&#8217;s constraint validation will provide the invalid or valid states automatically.</li>
</ol>
</li>
<li>For the &#8220;name&#8221; and &#8220;email&#8221; fields, add back <em>onblur</em> handlers pointing to the above function and simply pass in the field&#8217;s ID.</li>
</ol>
<p>Testing this example, it shows that we&#8217;ve got our original functionality back. In addition, if we ignore the intermediate error messages, the browser&#8217;s validation mechanism will throw us back to any of the wrongly filled out fields upon a submission attempt. Note that not all browsers do this last step. Safari on the Mac, for example, will submit the form even if it contains invalid entries.</p>
<h3>In summary</h3>
<p>The new version of our form is much improved over the version we had originally. It still contains some WAI-ARIA where it makes sense, since there is no native HTML5 alert box yet. But the rest is HTML5. The JavaScript code is a bit less bloated since we don&#8217;t have to do our own validation any more, and we benefit from all the builtin constraint validation mechanisms.</p>
<p>Feedback is welcome! But before you throw things at me for my sloppy JavaScript, please keep in mind that this is just a proof of concept. If you would like to re-use this technique, I encourage you to put your best knowledge to use and put in better handling of events or such, appropriate for your web application. <img src='http://www.marcozehe.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The example pages can be found (in English and German) at <a href="http://www.marco-zehe.de/examples/">this address</a>. Happy hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcozehe.de/2011/12/05/from-wai-aria-to-html5-and-back-or-maybe-not/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Firefox 6: html:progress element accessibility</title>
		<link>http://www.marcozehe.de/2011/05/18/firefox-6-htmlprogress-element-accessibility/</link>
		<comments>http://www.marcozehe.de/2011/05/18/firefox-6-htmlprogress-element-accessibility/#comments</comments>
		<pubDate>Wed, 18 May 2011 07:44:07 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[progressElement]]></category>

		<guid isPermaLink="false">http://www.marcozehe.de/?p=263</guid>
		<description><![CDATA[Recently, Mounir landed support for the HTML5 progress element on the Mozilla development branch (AKA &#8220;Nightly&#8221; channel). A few days later, after a concerted effort and another episode of &#8220;Marco and C++ are only partially good friends&#8221; , accessibility support &#8230; <a href="http://www.marcozehe.de/2011/05/18/firefox-6-htmlprogress-element-accessibility/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently, <a href="http://blog.oldworld.fr/">Mounir</a> landed support for the <a href="http://www.whatwg.org/specs/web-apps/current-work/#the-progress-element">HTML5 progress element</a> on the Mozilla development branch (AKA &#8220;Nightly&#8221; channel). A few days later, after a concerted effort and another episode of &#8220;Marco and C++ are only partially good friends&#8221; <img src='http://www.marcozehe.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  , accessibility support landed, too, and thus the progress element will be accessible starting in Firefox 6. For those of you on the &#8220;Aurora&#8221; channel, you should see stuff come through the pipeline with updates after the next Aurora merge, currently slatted for mid next week.</p>
<p>This means that web devs can use the progress element in web applications, and we will now no longer expose the alternative text enclosed in the opening and closing tags, but the actual visual representation of a progress meter. The accessible object for the progress meter will expose the AccessibleValue interface for all relevant platforms (e. g. ATK and IAccessible2), so that assistive technologies can query for not only the value string but also the float values for:</p>
<ul>
<li>the current value</li>
<li>the minimum (always 0)</li>
<li>the maximum (if not specified, the default is 1 as in the specification)</li>
</ul>
<p>By default, NVDA will expose the current percentage as you can test in <a href="http://oldworld.fr/mozilla/progress.html">this example</a> with a current version of NVDA.</p>
<p>Note that there were no changes required on NVDA&#8217;s side to support this. So if your screen reader currently supports WAI-ARIA progress meter elements, and the screen reader does not do any funky stuff with their own HTML parsing here, this should just work.</p>
<p>Another note: While we were here, we also fixed a few things regarding XUL:progressmeter elements that were buggy in the past, but were not really uncovered until now. The user visible impact will be minimal for this, but for our code this was definitely benefitial, as we&#8217;re now dealing with the proper maximum value for xul:progressmeter elements, which differs from the default max for html:progress.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcozehe.de/2011/05/18/firefox-6-htmlprogress-element-accessibility/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>New accessibility support for HTML5 elements and attributes</title>
		<link>http://www.marcozehe.de/2010/11/09/new-accessibility-support-for-html5-elements-and-attributes/</link>
		<comments>http://www.marcozehe.de/2010/11/09/new-accessibility-support-for-html5-elements-and-attributes/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 09:26:04 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[ARIA]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Landmark]]></category>

		<guid isPermaLink="false">http://www.marcozehe.de/?p=248</guid>
		<description><![CDATA[In the nightly builds starting November 9th, 2010, there are some HTML5 elements and attributes newly supported by the accessibility APIs. This will be in Firefox 4.0. Landmark elements mapped to WAI-ARIA landmark roles We are mapping the following HTML5 &#8230; <a href="http://www.marcozehe.de/2010/11/09/new-accessibility-support-for-html5-elements-and-attributes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the nightly builds starting November 9th, 2010, there are some HTML5 elements and attributes newly supported by the accessibility APIs. This will be in Firefox 4.0.</p>
<h3>Landmark elements mapped to WAI-ARIA landmark roles</h3>
<p>We are mapping the following HTML5 landmark elements to accessibles with WAI-ARIA landmark role semantics:</p>
<table border="1">
<tr>
<th>HTML5 element</th>
<th>WAI-ARIA role</th>
</tr>
<tr>
<td>article</td>
<td>main</td>
</tr>
<tr>
<td>footer</td>
<td>contentinfo</td>
</tr>
<tr>
<td>header</td>
<td>banner</td>
</tr>
<tr>
<td>nav</td>
<td>navigation</td>
</tr>
</table>
<p>In a second small patch landing the next few days, we will also map the html:aside element to the &#8220;complementary&#8221; role. This was a small oversight on our part in the first patch.</p>
<p>Both NVDA and Orca will pick these changes up without any additional action required on their parts. Other screen readers will hopefully implement or pick up the support ASAP so web authors can use these new elements without having to worry about support or lack thereof.</p>
<h3>The placeholder attribute</h3>
<p>This attribute can be used on form elements to predefine text that disappears as soon as the field gets focus. It#s a visual indication of what is expected in the field. If, and only if, the field has no label otherwise, this placeholder text will be used to generate the AccessibleName, the name the screen reader speaks for the field when it gains focus. If the field has a label provided by the label element or an ARIA construct, the placeholder text will be ignored.</p>
<h3>Proper events being generated when required/invalid/disabled states change</h3>
<p>For a few weeks now, we have had support for the disabled, required attributes and the invalid state evaluation of patterns. Now, if any of these conditions change, we now generate the proper StateChange events to notify screen readers and other assistive technologies.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcozehe.de/2010/11/09/new-accessibility-support-for-html5-elements-and-attributes/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>What should the action name for an indeterminate checkbox be?</title>
		<link>http://www.marcozehe.de/2009/02/11/what-should-the-action-name-for-an-indeterminate-checkbox-be/</link>
		<comments>http://www.marcozehe.de/2009/02/11/what-should-the-action-name-for-an-indeterminate-checkbox-be/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 13:57:59 +0000</pubDate>
		<dc:creator>Marco</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.marcozehe.de/?p=106</guid>
		<description><![CDATA[As noted in this blog post, we&#8217;re currently working on implementing the accessibility for HTML 5 checkboxes that are indeterminate. An indeterminate checkbox is a checkbox that is neither checked nor unchecked, or half-checked if you will. The first stage &#8230; <a href="http://www.marcozehe.de/2009/02/11/what-should-the-action-name-for-an-indeterminate-checkbox-be/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.marcozehe.de/2009/02/09/implementing-a-new-feature-in-gecko-that-may-have-an-impact-on-accessibility-ping-the-accessibility-team-and-tell-them/">As noted in this blog post</a>, we&#8217;re currently working on implementing the accessibility for HTML 5 checkboxes that are indeterminate. An indeterminate checkbox is a checkbox that is neither checked nor unchecked, or half-checked if you will.</p>
<p>The first stage is complete: Firefox 3.2a1pre as of Wednesday&#8217;s nightly will expose such indeterminate checkboxes as what we internally call STATE_MIXED. There are still two work items left as far as we can see:</p>
<ol>
<li>Expose an action name for a checkbox that is in this indeterminate state.</li>
<li>Make sure we fire STATECHANGE events for STATE_MIXED.</li>
</ol>
<p>For action item 1, I&#8217;d like to call out to you guys to offer suggestions on what this action name should be. My initial idea is &#8220;toggle&#8221;. The reason is that we will never know whether the next state after clicking will be fully checked or fully unchecked. That always depends on the web site&#8217;s author to decide. That&#8217;s why I first thought of this neutral name.</p>
<p>Anybody got any better ideas, or even a suggestion derived from other such indeterminate, or tristate, checkboxes from operating systems? Post your ideas here or comment on <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=477975">the bug</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcozehe.de/2009/02/11/what-should-the-action-name-for-an-indeterminate-checkbox-be/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

