{"id":79,"date":"2005-06-13T03:37:50","date_gmt":"2005-06-13T03:37:50","guid":{"rendered":"http:\/\/lachy.id.au\/log\/2005\/06\/media-attribute-accessibility"},"modified":"2006-04-30T23:45:48","modified_gmt":"2006-04-30T23:45:48","slug":"media-attribute-accessibility","status":"publish","type":"post","link":"https:\/\/lachy.id.au\/log\/2005\/06\/media-attribute-accessibility","title":{"rendered":"Media Attribute Accessibility"},"content":{"rendered":"<p>Recently, <a href=\"http:\/\/annevankesteren.nl\/\">Anne van Kesteren<\/a> demonstrated\r\n    <a href=\"http:\/\/annevankesteren.nl\/2005\/05\/xhtml-2\" title=\"XHTML 2.0: Working Draft 7\">a\r\n\t\tnice technique<\/a> with the <a href=\"http:\/\/www.w3.org\/TR\/xhtml2\/mod-mediaAttribute.html#s_mediaAttributemodule\">XHTML\r\n\t\t2.0 <code class=\"markup\">media<\/code> attribute<\/a> designed to deliver a contact form to screen users, while giving\r\n\ta postal address for print users. <a href=\"http:\/\/kurafire.net\/\" title=\"The KuraFire Network\">Faruk Ates<\/a> also published an interesting article\r\n\tabout <a href=\"http:\/\/kurafire.net\/log\/archive\/2005\/06\/06\/xhtml-2-and-google\">XHTML\r\n\t2.0 and Google<\/a>, specifically focussing on the potential abuse of\r\n\tthe <code class=\"markup\">media<\/code> attribute to hide content from screen users, but not from Google.\r\n\tHowever, this got me thinking about some of the accessibility issues involved\r\nwith this technique.<\/p>\r\n<p>Take a look at Anne\u2019s example:<\/p>\r\n<blockquote cite=\"http:\/\/annevankesteren.nl\/2005\/05\/xhtml-2\"><pre><code class=\"markup\">&lt;section&gt;\r\n  &lt;h&gt;Contact&lt;\/h&gt;\r\n  &lt;div media=&quot;screen&quot;&gt;\r\n    Contact form to be inserted here.\r\n  &lt;\/div&gt;\r\n  &lt;div media=&quot;print&quot;&gt;\r\n    &lt;address layout=&quot;relevant&quot;&gt;Anne van Kesteren\r\n    Crosestijn 4629 \u2026&lt;\/address&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/section&gt;<\/code><\/pre>\r\n<\/blockquote>\r\n<p>As you can see, this clearly provides suitable alternate content for users\r\n\tdepending on whether they\u2019re using a <code class=\"style\">screen<\/code> medium, or <code class=\"style\">print<\/code> medium. However,\r\n\twhat about other <a href=\"http:\/\/www.w3.org\/TR\/CSS21\/media.html#media-types\" title=\"CSS 2.1: Recognised Media Types\">media\r\n\ttypes<\/a> like <code class=\"style\">braille<\/code>, <code class=\"style\">embossed<\/code>, <code class=\"style\">handheld<\/code>, <code class=\"style\">projection<\/code>,\r\n\t<code class=\"style\">speech<\/code>, <code class=\"style\">tty<\/code>, <code class=\"style\">tv<\/code> or any other media? They get nothing!<\/p>\r\n<p>Clearly, the intention of this example is that the contact form is not suitable\r\n\tfor any static media (<code class=\"style\">embossed<\/code> and <code class=\"style\">print<\/code>), while the postal address is. There\r\n\tis also no reason why a postal address isn\u2019t suitable for <code class=\"style\">all<\/code> media. One solution,\r\n\tand currently the only usable solution, is to explicitly list all suitable media\r\n\tin the attribute (it\u2019s a comma separated list). However, what happens when CSS\r\n\textends the list of possible media in the future? Would the media attributes\r\n\tthen need to be updated to reflect this?<\/p>\r\n<p>Another solution I can think of would be to allow for the CSS media groups\r\n\tto be used instead, but AFAICT, that\u2019s not possible at this stage. For example,\r\n\tthe above example could become:<\/p>\r\n<pre><code class=\"markup\">&lt;section&gt;\r\n  &lt;h&gt;Contact&lt;\/h&gt;\r\n  &lt;div media=&quot;<strong>interactive<\/strong>&quot;&gt;\r\n    Contact form to be inserted here.\r\n  &lt;\/div&gt;\r\n  &lt;div media=&quot;<strong>all<\/strong>&quot;&gt;\r\n    &lt;address layout=&quot;relevant&quot;&gt;Anne van Kesteren\r\n    Crosestijn 4629 \u2026&lt;\/address&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/section&gt;<\/code><\/pre>\r\n","protected":false},"excerpt":{"rendered":"The media attribute can cause unintentional accessibility issues.","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,2],"tags":[],"_links":{"self":[{"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/posts\/79"}],"collection":[{"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/comments?post=79"}],"version-history":[{"count":0,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/posts\/79\/revisions"}],"wp:attachment":[{"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/media?parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/categories?post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/tags?post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}