<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Cormac Flynn on Medium]]></title>
        <description><![CDATA[Stories by Cormac Flynn on Medium]]></description>
        <link>https://medium.com/@cormacflynn?source=rss-d0d5702ecde2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gKPztqTSr3CJvK1qjnQONA.jpeg</url>
            <title>Stories by Cormac Flynn on Medium</title>
            <link>https://medium.com/@cormacflynn?source=rss-d0d5702ecde2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 01:37:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cormacflynn/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Towards an Accessible Player]]></title>
            <link>https://medium.com/deezer-engineering/towards-an-accessible-player-b38431bb5721?source=rss-d0d5702ecde2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b38431bb5721</guid>
            <category><![CDATA[deezer]]></category>
            <category><![CDATA[music-player]]></category>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[a11y]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Cormac Flynn]]></dc:creator>
            <pubDate>Wed, 24 May 2017 15:08:23 GMT</pubDate>
            <atom:updated>2017-05-24T15:08:23.183Z</atom:updated>
            <content:encoded><![CDATA[<h4>Accessibility Part 5</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*1Ul-DPJurrZvndssLEYd4g.png" /><figcaption>The “Able Player”, a fully accessible music player that we used as an example of best-practices. <a href="https://ableplayer.github.io/ableplayer/">You can find out more about it here</a></figcaption></figure><p>Earlier this year, Deezer hosted one of its regular Hackathons, giving developers from different teams the chance to collaborate on ad-hoc projects or fun ideas they might have been hankering to implement. Myself and Ahmed Abdellaoui, an iOS developer, decided to work on making the web and iOS players more accessible. As we would have to present our work, it seemed like the perfect opportunity to explain to Deezer staff and management why accessibility is important and how it can make the Deezer platform better for everyone.</p><p>In this final article I’ll focus on the web player, a standalone component that currently appears in the bottom-left of the Deezer.com interface, and how we made it more accessible. In many ways the issues resolved — bad labeling, keyboard navigation problems &amp; content unoptimized for screen readers — act as a summary of the topics we’ve covered in the <a href="https://deezer.io/accessibility-at-deezer-71462e019bf7">previous</a> <a href="https://deezer.io/how-to-read-music-b7986780ba9f">articles</a> <a href="https://deezer.io/pressing-play-2b9771842389">in this</a> <a href="https://deezer.io/focus-and-contrast-c84e1619cf0b">series</a>.</p><h4>Controls &amp; Components</h4><p>Our first task was to examine the content of the player — what its sub-components were, what HTML elements were used for each control and how these were labeled for the user (if at all).</p><p>The web player is composed of the following elements:</p><ol><li>The album cover for the currently playing track, overlayed with the track title and artist name;</li><li>Buttons that control favoriting, the creation of playlists and other advanced features;</li><li>A “seek” slider that shows the current position and allows the user to seek to any point in the track;</li><li>Standard back, next and play control buttons;</li><li>A bottom set of controls for changing the volume, setting the repeat and shuffle states and a button to open the list of current and upcoming tracks.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/221/1*3EKG2x3V-sRJMzbXuHhWEQ.png" /><figcaption>The web player as it currently appears on Deezer.com</figcaption></figure><p>To improve basic support for screen-readers and keyboard navigation, we first improved all labels, made sure simple controls were correctly represented by &lt;button&gt; elements, making them automatically accessible, and added :focus rules where :hover appeared in our CSS, as described in the previous article.</p><p>I then focused on two elements in the bottom set of controls — the repeat control and the shuffle button.</p><p>Take a look at this video, created for our Hackathon presentation, that shows the unoptimized site and player as read by a screen-reader.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F217005386&amp;url=https%3A%2F%2Fvimeo.com%2F217005386&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F634111766_1280.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/d44020638f27e1e5568221bda310d204/href">https://medium.com/media/d44020638f27e1e5568221bda310d204/href</a></iframe><p>At the 30s mark, note that the screen-reader speaks “Repeat — button” as we change the state from “Repeat none” to “Repeat all” to “Repeat one”. The shuffle button exhibits the same behavior — its current state cannot be known as the label is always set to “Shuffle”.</p><p>The solution in both cases was to improve the use of the aria-label attribute. In particular, the label should describe the <em>future </em>state of the button, rather than its current value. For example when repeat is turned off, the label should read “Repeat all tracks in the list”, as this is the action performed by selecting the button. When “all” is selected, the label should read “Repeat only the current track”, and so on. It might seem obvious, but our instinct is often to label controls by their current value rather than their value after the button has been clicked.</p><h4>Speaking Assertively</h4><p>Staying with screen-reader accessibility, we next tried to think a little about how a visually-impaired user might interact with the player.</p><p>For example, suppose the user was listening to a “mix”, a randomly selected playlist of thematically-related tracks. Such a user would only know the artist and title of the currently playing track if they manually moved the focus to the text at the top of the player component (or if they know the track already).</p><p>To accommodate such a user, we added some hidden text containing the artist name and the track title; in addition, we enclosed that text in an element with the attribute aria-live=&quot;assertive&quot;.</p><pre>&lt;!-- This content is only available to screen-readers --&gt;<br>&lt;span className=&quot;sr-only&quot; id=&quot;player-track-info&quot;&gt;<br>   &lt;span aria-live=&quot;assertive&quot;&gt;{trackTitle} by {artistNames}&lt;/span&gt;<br>&lt;/span&gt;</pre><p>The contents of the inner &lt;span&gt; are updated dynamically when a new track starts. The aria-live=&quot;assertive&quot; attribute tells the screen-reader to speak every change to this element, even if it has to interrupt itself to do so. The reader acts somewhat like a radio-show host, announcing the title as the current track changes before continuing with whatever it was previously speaking.</p><h4>Accessible Sliders</h4><p>There are two sliders in the Player component — the seek bar and the volume control. The WAI accessibility guidelines describe attributes and functionality changes that work to make a slider component more accessible to keyboard and screen-reader users alike — <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_slider_role">MDN has a good summary</a>. In addition, we used the <a href="https://ableplayer.github.io/ableplayer/">“Able Player”</a>, a fully accessible music player, as an example of best-practices.</p><p>We began by marking up the slider using the correct ARIA role, label and slider-specific attributes. Below, a simplified example:</p><pre>&lt;div role=&quot;slider&quot;<br> aria-label=&quot;Seek position&quot;<br> aria-valuenow={position.toFixed(2)}<br> aria-valuemin=&quot;0&quot;<br> aria-valuemax={duration}<br> aria-valuetext={`${position} of ${duration}`}<br> aria-disabled={!duration}<br> tabIndex={!duration ? -1 : 0}   <br> onKeyDown={<strong>this</strong>._seekOnKeyDown} /&gt;</pre><p>There are a few things to note here</p><ol><li>There exists a “slider” role in the ARIA spec, so we use it here, along with a label;</li><li>The ARIA valuenow attribute contains the current track position, to two decimal places, with valuemin and valuemax the expected upper and lower limits. In practice, a screen-reader will ignore these in favour of aria-valuetext. As we have only tested on VoiceOver, we include all attributes to ensure maximum compatibility;</li><li>The aria-valuetext attribute contains the text spoken by the screen-reader as the user interacts with the component. In the real code, we localize and format the values;</li><li>If the track has a “falsy” duration (i.e. is empty or not yet loaded), we disable the component and set its tabIndex to -1, so the slider is skipped during keyboard navigation.</li></ol><p>We treat keyboard navigation in the _seekOnKeyDown callback:</p><ol><li>If the user presses the left or down arrow, we step back about 5 seconds in the current track. Pressing “Page down” jumps back 30 seconds;</li><li>For right or up, we seek forward a 5 second step; “Page up” moves us 30 seconds forward;</li><li>Pressing the “Home” button returns the user to the very start of the track. Pressing “End” moves the position to just before the end of the current track.</li></ol><p>When navigating via the keyboard, a user will have access to the full range of expected functionality. While using a screen-reader, each of these position changes is spoken aloud. You can see a little of this functionality in the following video, again a part of our Hackathon presentation.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F217013674&amp;url=https%3A%2F%2Fvimeo.com%2F217013674&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F634122192_1280.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/9dcc9ec7e88f742d7f9c3dc33f6eec7c/href">https://medium.com/media/9dcc9ec7e88f742d7f9c3dc33f6eec7c/href</a></iframe><p>Similar changes were made by Ahmed to the iOS application and, following our presentation, Deezer decided to make accessibility an official corporate goal, meaning that accessibility will be a considering for all future mobile and web developments here at Deezer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b38431bb5721" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deezer-engineering/towards-an-accessible-player-b38431bb5721">Towards an Accessible Player</a> was originally published in <a href="https://medium.com/deezer-engineering">Deezer I/O</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Focus and Contrast]]></title>
            <link>https://medium.com/deezer-engineering/focus-and-contrast-c84e1619cf0b?source=rss-d0d5702ecde2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c84e1619cf0b</guid>
            <category><![CDATA[a11y]]></category>
            <category><![CDATA[deezer]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[accessibility]]></category>
            <dc:creator><![CDATA[Cormac Flynn]]></dc:creator>
            <pubDate>Wed, 19 Apr 2017 16:31:53 GMT</pubDate>
            <atom:updated>2017-04-20T08:35:16.145Z</atom:updated>
            <content:encoded><![CDATA[<h4>Accessibility Pt 4 — Focus Outlines, Color and Contrast</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*zETI-HC_Db49QoE4GQR3ww.png" /><figcaption>The Deezer logo as seen by someone with Protonapia (Red-Green Color-blindness). This image was created using the Chrome extension <a href="https://chrome.google.com/webstore/detail/chromelens/idikgljglpfilbhaboonnpnnincjhjkd?hl=en">ChromeLens</a>, which allows you to view a website as seen by someone with a variety of visual conditions, from color-blindness to those with partial sight.</figcaption></figure><p>In <a href="https://deezer.io/pressing-play-2b9771842389">the last article</a>, we looked at how to manage focus when using the keyboard. By default, the browser will place an outline around the currently active element. Firefox, for example, adds a dotted border; Chrome draws a blue halo. This outline is added irrespective of how the element is given focus — whether via the keyboard or by clicking in the conventional way.</p><p><a href="http://www.outlinenone.com/">Many websites</a> (Deezer included) override this behavior, removing the focus outline entirely in order to maintain a consistent design across browsers. Moreover designers often choose colors purely for aesthetic reasons, without considering how they impact legibility and contrast. Both these design choices impact users with visual disabilities, those with reduced visual acuity (due to age, for example) or those with conditions such as color-blindness.</p><p>In this article, we’ll examine how to tweak an existing design to give sufficient visual feedback to accommodate keyboard navigation and to ensure our content has enough contrast to be legible to as many users as possible.</p><p>Accessibility should ideally be something we think about from the start of the design process; as here we’re working with an existing site design that predates our accessibility improvements, the changes outlined below are necessarily conservative and incomplete. However Deezer has committed to making accessibility a company policy that will be a consideration in all future design briefs.</p><h4>Focus Outlines</h4><p>In the previous article, we used a Chrome extension called <a href="https://chrome.google.com/webstore/detail/focus-indicator/heeoeadndnhebmfebjccbhmccmaoedlf">Focus Indicator</a> to help debug the keyboard navigation functionality. Disable this extension and it quickly becomes clear that, despite our improvements, navigating effectively with the keyboard is near impossible without some sort of focus outline or other visual feedback.</p><p>Ideally, we would simply remove the CSS rules that block the standard focus outline and return the browser to its default behavior. However as accessibility was not part of the original design brief, the look of the site could be aesthetically compromised if we went down this route. Instead we look to reuse, where possible, the visual feedback that occurs when we “rollover” an active element using the mouse pointer — for example, the darker black background that appears when you move your mouse pointer over an item in the left-hand menu on Deezer.com.</p><p>In most cases, this is simply a matter of adding the focus pseudo class to the CSS rule in question:</p><pre>// Before<br>a:hover {<br> text-decoration: underline;<br>}</pre><pre>// After<br>a:hover, a:focus {<br> text-decoration: underline;<br>}</pre><p>Other cases require the rule to be moved to the element that can take keyboard focus. For example, consider the following HTML:</p><pre>&lt;li&gt;<br> &lt;a href=&quot;/settings&quot;&gt;Settings&lt;/a&gt;<br>&lt;/li&gt;</pre><p>A CSS selector that uses li:hover would work correctly using a mouse, but adding li:focus would fail as the &lt;li&gt; element can never take keyboard focus. Instead, the hover selector must be switched to the anchor tag.</p><p>Sometimes we want to apply a style only when navigating with the keyboard, and not when using the mouse. For example, following changes in the last article, closing a panel will return focus to the element in the left-hand menu that opened it. With a :focus CSS selector, the parent menu item will appear selected until focus is moved elsewhere. If we move the mouse pointer over another item while the menu is in this state, more than one menu item will appear selected at once.</p><p>The solution, as in the last article, was to differentiate programmatically between a close action performed by a keypress versus one invoked by the mouse. So, occasionally, don’t be afraid to implement programmatic workarounds to accommodate the expectations of users.</p><h4>Color contrast</h4><p>A good tool to check the legibility of your site content is <a href="http://khan.github.io/tota11y/">the bookmarklet tota11y</a>. Using this on the current site reveals areas of content that are likely difficult to read for those without full visual acuity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t7qfi-7xgcGfKY6vZ8YkHg.png" /><figcaption>The current Deezer.com site, with the tota11y bookmarklet showing areas of low contrast in red</figcaption></figure><p>Another useful tool is the Chrome extension <a href="https://chrome.google.com/webstore/detail/chromelens/idikgljglpfilbhaboonnpnnincjhjkd?hl=en">ChromeLens</a>, with which you can view the site as it appears to users with a variety of visual disabilities or conditions.</p><p>Using both these tools, we worked with a designer to improve the color contrast of site headings and sub-headings. In addition, we added more impactful focus styles for search input fields and items in the left-hand menu. These were fast and simple changes that should ensure the majority of text-related contrast and focus issues are resolved. However, problems remain with the player itself:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*X5p_NnoHMA9mm53kHx-o2w.png" /><figcaption>On the left, the current Deezer web player, as it might be seen by someone with medium partial blindness. On the right, the same player after contrast improvements were made to the site headings and sub-headings. This image was created using the ChromeLens extension for Chrome.</figcaption></figure><p>Although our contrast changes improve the legibility of the player’s heading and sub-heading, its icons still suffer from low-contrast and an insufficiently visible “rollover” style. These issues, along with accessibility in general, are now being used to inform an upcoming redesign of the web player. It illustrates how making your web app accessible is an ongoing process, requiring continuous attention, rather than a single set of definitive changes.</p><p>In the final article in this series, I’ll focus again on the web player, explaining a little about how we made it and related components more accessible during a recent Hackathon at Deezer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c84e1619cf0b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deezer-engineering/focus-and-contrast-c84e1619cf0b">Focus and Contrast</a> was originally published in <a href="https://medium.com/deezer-engineering">Deezer I/O</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pressing Play]]></title>
            <link>https://medium.com/deezer-engineering/pressing-play-2b9771842389?source=rss-d0d5702ecde2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b9771842389</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[a11y]]></category>
            <dc:creator><![CDATA[Cormac Flynn]]></dc:creator>
            <pubDate>Thu, 09 Feb 2017 15:05:16 GMT</pubDate>
            <atom:updated>2017-04-05T09:36:14.116Z</atom:updated>
            <content:encoded><![CDATA[<h4>Accessibility Part 3— Improving Keyboard Navigation on Deezer.com</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*oue6o1QZml84LAGhEjgJ7Q.png" /><figcaption>A “blind” keyboard without any key labels. How good is your touch typing? <a href="https://www.flickr.com/photos/plugimi/248429924/in/photolist-nXgyy-gwmAC2-gwmN7H-g1EDcJ-9xAHRg-cXQof-5GfCCm-5kHNkZ-4RQ8rF-98wp2h-316uT-MmxiF-iNHLMz-979pyL-q8G9B-oKthJb-3pzKHj-dZinh3-3XqMYg-bPRE6i-ixgqcF-58tjHp-cfAKTb-2Zog8X-bPRE8k-jpaoo-2wmtm-bAX1SJ-bAX1VE-9reLQY-FqJ2F-58xtUj-GFtsQs-58xwjw-5Hh2cW-3KtqGt-CU7zZ-rLyyQ-bPREg8-geaSW-5xJvys-9Ax6WN-8VKHFf-6zV28F-4p7hGo-58tmKD-58xuB5-uWQb5-58xua1-7VymHm">Original Source</a> —<a href="https://creativecommons.org/licenses/by-nd/2.0/"> License</a> This photo has been cropped</figcaption></figure><p>The keyboard is the primary input device for the visually-impaired, those with motor-disabilities and even so-called “power users” who may find keystrokes faster than using a mouse. The visual layout of a site has no bearing on how easy it is to navigate with a keyboard; what matters is the choice of HTML tags and the sequential order of the content.</p><p>In this article I’ll explain how keyboard navigation works and share some of the steps we took to improve the keyboard accessibility of the Deezer website. Just like <a href="https://deezer.io/how-to-read-music-b7986780ba9f#.x5ly3f8ry">our work with screen readers</a>, these changes improve the site for <em>everyone</em>, disabled or otherwise, and will be further refined as we move to testing with real users.</p><h3>Focusing on an element</h3><p>When you click a link or place the cursor in a text field, the element is said to have <strong>focus</strong>. You can see what’s currently in focus by opening your browser console and executing the command document.activeElement.</p><p>When a page is loaded for the first time, document.activeElement will be the &lt;body&gt; tag. A user can press the <em>tab</em> key to move the focus from &lt;body&gt; to the next <strong>tabbable</strong> element in the page. What is considered tabbable — meaning, an element that is keyboard focusable — <a href="https://allyjs.io/data-tables/focusable.html">differs between browsers</a>. In general, form controls and links with href attributes are able to take keyboard focus, along with elements that possess a tabindex attribute with a non-negative value. If no element is in focus, document.activeElement will equal &lt;body&gt; again.</p><pre>&lt;!-- tabbable --&gt;<br>&lt;a href=&quot;http://www.deezer.com/&quot;&gt;&lt;/a&gt;</pre><pre>&lt;!-- tabbable --&gt;<br>&lt;a tabindex=&quot;0&quot;&gt;&lt;/a&gt;</pre><pre>&lt;!-- not tabbable --&gt;<br>&lt;a href=&quot;http://www.deezer.com/&quot; tabindex=&quot;-1&quot;&gt;&lt;/a&gt;</pre><pre>&lt;!-- not tabbable --&gt;<br>&lt;a&gt;&lt;/a&gt;</pre><p>The <strong>tab order</strong> of a website is the sequence in which elements are given focus as the user hits the tab key. This order is determined by the position of the element in the document (earlier take precedence) and the value of the document’s tabindex attributes (higher values take focus first). So the active element that follows &lt;body&gt; will be either the next tabbable element in the document’s HTML or the first with the highest non-zero tabindex value, if such an element exists.</p><p>The browser will, by default, draw a visible outline around the currently active element —regardless of whether the focus is placed via the mouse or the keyboard. The appearance of this outline differs between browsers. Firefox, for example, adds a subtle dotted border; Chrome displays a blue halo. For this reason, designers often remove the focus outline to ensure a consistent look across all browsers. This makes it <a href="http://www.outlinenone.com/">impossible for users</a> to determine which element is currently in focus, something that is critical for anyone who relies on keyboard navigation.</p><p>We’ll examine focus outline and color contrast in a future article; in the meantime, I’m using a Chrome extension called <a href="https://chrome.google.com/webstore/detail/focus-indicator/heeoeadndnhebmfebjccbhmccmaoedlf">Focus Indicator</a> to add a bright visible outline to the currently active element.</p><p>One unfortunate exception to these rules is Firefox on MacOS. By default, the MacOS keyboard accessibility settings allow focus to be placed only on form controls and lists. Chrome and Safari manage their own a11y configuration, but Firefox uses the system one, meaning that the user is unable to use tab to place the focus on a link, regardless of the presence of tabindex or href attributes. The user can change these settings by going to <em>System Preferences -&gt; Keyboard -&gt; Shortcuts -&gt; Accessibility </em>and selecting <em>All Controls </em>but there’s currently no way to force this behavior in the HTML.</p><h3>Performing an Action</h3><p>If the active element is a form control or an anchor tag with an href attribute, we can submit the form, follow the link or fire its event handler by pressing the Enter key. In the case of a &lt;button&gt; we also have the option of hitting the space bar.</p><p>A tag can otherwise be made tabbable by giving it a positive tabindex attribute, but it will only respond to keypresses if the callback associated with its event handler is modified appropriately, as we’ll see later.</p><p>Custom components such as volume sliders should respond to the directional arrows — “up” or “right” to increase the value, “left” or “down” to decrease it. In addition, <a href="https://www.w3.org/TR/wai-aria-practices-1.1/">WAI guidelines</a> recommend that the “page up” and “page down” keys should increase and decrease the value more quickly, whereas “Home” and “End” should respectively jump to the minimum and maximum values allowed by the component.</p><p>Modal dialogs, tooltips or contextual menus should allow themselves to be dismissed using the Escape key.</p><h3>Improving Keyboard Navigation</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F203260730&amp;url=https%3A%2F%2Fvimeo.com%2F203260730&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F617494612_1280.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f8738ddbe5b96c9023607611cdff3cb/href">https://medium.com/media/2f8738ddbe5b96c9023607611cdff3cb/href</a></iframe><h4>#1 — Think about HTML sequential order</h4><p>This step is easy to reason about but, sometimes, tricky to apply to legacy code. Tab order, just like the order content is spoken by a screen reader, is largely determined by the sequential placement of elements in the HTML. This position is often chosen to more easily allow a CSS float to be applied in order to achieve a visual effect.</p><p>For example, consider a track “card”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*K7Ydp3z-_PnUKPVk14edYw.png" /><figcaption>A track card as it appears in the Queuelist</figcaption></figure><p>We want to give sufficient context to the user, so our desired tab order is: (1) track title, (2) artist name, (3) play button, (4) favorite icon, (5) context menu icon. However the underlying HTML is ordered as follows: (3) play button, (5) context menu, (4) favorite button, (1) track title, (2) artist title.</p><p>One possible solution is to keep the HTML as is, but to set tabindex values on each part of the card — a tabindex of 1 on the track title, 2 on the artist name etc. This is a really bad idea. If all other elements on the page have a tabindex of zero or less then the uppermost card’s track title will become the <em>first</em> element that takes focus after the &lt;body&gt; tag. If we adjust all preceding tabindex attributes to compensate then we need to do this every time the card component or page layout changes. For this reason it’s recommended to set tabindex to -1 for something that should never take focus, and to zero otherwise.</p><p>The best solution seems to be to change the structure of the HTML and to adjust the CSS accordingly. However, like everything in practical web development, a compromise must be found between the perfect solution and what is possible within the time given. We decided instead to use the aria-label attribute to provide additional context to the play button, and to keep the HTML as it is. This was because the card CSS is fundamental to a number of other components, so we felt a less invasive solution was best for the moment. Keyboard accessibility will be a consideration from the start for all future developments.</p><p>Other parts of the site were less problematic to fix. But, as with accessibility in general, developing for keyboard navigation is a long-term process rather than something that can be corrected in one go.</p><h4>#2 — Use standard form controls and anchor tags</h4><p>As we’ve already seen, form controls and anchor tags are, for the most part, automatically tabbable and accessible via the keyboard and should be used in preference to other HTML tags.</p><p>In general we should try to use an &lt;a href&gt; for an action that changes the URL; a &lt;button&gt; should be used otherwise.</p><h4>#3— Make custom components accessible with tabindex and onKeyDown</h4><p>If a link or form control can’t be used, we should still ensure that the component is focusable and responds to keypresses.</p><p>For example, consider the following React component and its event handler callback:</p><pre>render() {<br> return (<br>  &lt;span onClick={() =&gt; this._showAlert}&gt;<br>   Show Alert<br>  &lt;/span&gt;<br> );<br>}</pre><pre>_showAlert(e) {<br> alert(&#39;Hello&#39;);<br>}</pre><p>This component responds only to mouse clicks; moreover it lacks a tabindex and so isn’t in the document tab order. To address this, we make the following changes:</p><pre>render() {<br> return (<br>  &lt;span role=&quot;button&quot; tabIndex=&quot;0&quot;<br>   onClick={() =&gt; this._showAlert}<br>   onKeyDown={() =&gt; this._showAlert}&gt;<br>   Show Alert<br>  &lt;/span&gt;<br> );<br>}</pre><pre>_showAlert(e) {<br> // Respond only to Enter keypresses<br> if (e.keyCode &amp;&amp; e.keyCode !== 13){<br>  return;<br> }</pre><pre> alert(&#39;Hello&#39;);<br>}</pre><p>The _showAlert callback is invoked by either a click or keypress on the element. If the keypress is anything other than the Enter key, signified by keyCode value 13, we return and allow the event to continue as usual.</p><p>Without this keyCode check, the user would be unable to press tab to move to the next element in the document as <em>any</em> keypress event would invoke the callback, open the alert box and trap the keyboard focus.</p><p>This is something to keep in mind if you need to disable the default action of an element using e.preventDefault — always place this <em>after</em> the if statement or you risk blocking the default action of <em>all</em> keypresses.</p><h4>#4— Don’t interfere with default key combinations</h4><p>Deezer provides a number of keyboard shortcuts that make it easier to control the Player — open the Deezer home page and hit the h key to see the full list:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*28BWNC4rqqxL639taJEZiQ.png" /><figcaption>The list of available keyboard shortcuts.</figcaption></figure><p>Some of these shortcuts interfere with the default behavior of the browser when using the keyboard. For example, the space bar plays the current track rather than invoking an action on a button. The Enter, left arrow and right arrow keys are similarly bound to Player actions.</p><p>To fix this, we simply changed the keyboard shortcuts, adding shift or alt combinations where appropriate.</p><p>The space bar is something we couldn’t change; users expect it to play the current track, something they’re used to from players like YouTube, Quicktime or VLC.</p><h4>#5 — Manage focus programmatically, if necessary</h4><p>Sometimes it’s necessary to intervene programmatically in the management of focus. For example, consider the “panel” that opens when you click the “cog” symbol in the left-hand menu on Deezer.com. Navigating with the keyboard, we want the component to work as follows:</p><ol><li>The user tabs to the “cog” icon in the left-hand navigation menu;</li><li>The user presses the “Enter” key;</li><li>The settings panel opens and the focus is placed on the first active element in the panel;</li><li>The user presses tab to move through the setting options in the panel;</li><li>Once finished, the user presses Esc to close the settings panel;</li><li>Focus is returned to the “cog” icon and the user can continue to tab through the rest of the main navigation menu.</li></ol><p>This behavior is impossible to achieve using HTML sequential order and tabindex alone so instead we make the following changes to the Panel component:</p><ol><li>The event that opens the settings panel contains a reference to the “cog” icon as e.currentElement on the Event object. We pass this to the panel component;</li><li>The panel container is made tabbable with a zero-value tabindex, acting as the first focusable element for keyboard navigation. A descriptive aria-label is also added, giving an audible reference point to visually-disabled users when the panel is opened;</li><li>Panels can now be closed using the Esc key. When the user hits Esc, we return focus to the element e.currentElement</li></ol><p>Let’s take a look at the optimized site with all these changes in place:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F203267510&amp;url=https%3A%2F%2Fvimeo.com%2F203267510&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F617503312_1280.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/1dd74b8c0a30ed328e4065f5dd9e3fee/href">https://medium.com/media/1dd74b8c0a30ed328e4065f5dd9e3fee/href</a></iframe><p>Note how Focus Indicator highlights the active element with a green border. In the next article, we’ll look at focus outlines, color contrast and how to find a compromise between design constraints and accessibility.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b9771842389" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deezer-engineering/pressing-play-2b9771842389">Pressing Play</a> was originally published in <a href="https://medium.com/deezer-engineering">Deezer I/O</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Read Music]]></title>
            <link>https://medium.com/deezer-engineering/how-to-read-music-b7986780ba9f?source=rss-d0d5702ecde2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7986780ba9f</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[a11y]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Cormac Flynn]]></dc:creator>
            <pubDate>Mon, 23 Jan 2017 14:22:19 GMT</pubDate>
            <atom:updated>2017-03-31T13:45:22.162Z</atom:updated>
            <content:encoded><![CDATA[<h4>Accessibility Part 2 — Semantic Markup and Screen Readers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*_SDvuVH1-rbazOlHpPcd9A.png" /><figcaption>The first measures of the aria from J.S. Bach’s Goldberg Variations, followed by its braille edition. Image has been cropped and resized. <a href="https://www.flickr.com/photos/musescore/10066625675/in/photolist-7EFDvo-gky66D-gmU7q4-M8gd2r-MCGuMy-MCGvyJ">Original Image</a> —<a href="https://creativecommons.org/licenses/by/2.0/"> License</a></figcaption></figure><p>Assistive technologies are examples of the practical application of what’s often called the “semantic web” — the judicious use of HTML to describe the meaning or purpose of web content. Recall from <a href="https://deezer.io/accessibility-at-deezer-71462e019bf7">the last article</a> how a blind or visually-impaired person uses assistive technology to navigate the web — websites are read aloud by a screen reader from the top of the HTML to the bottom. Lacking visual cues, the user relies instead on auditory ones gleaned from the underlying HTML.</p><p>In this article, I’ll explain how to write accessible HTML for screen readers using semantic markup. To explain these ideas, I’ll return to the video from last week— a VoiceOver session on the unoptimized website, read by the voice Moira —to explore the problems raised, how to resolve them and to show how VoiceOver performs on a site optimized for accessibility.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F199858230&amp;url=https%3A%2F%2Fvimeo.com%2F199858230&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F613213490_1280.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/73ff4cb5771809fccbbae009cb2c83cb/href">https://medium.com/media/73ff4cb5771809fccbbae009cb2c83cb/href</a></iframe><h3>Content Headings</h3><p>When we talk about semantic markup, we tend to think immediately of new HTML5 additions like &lt;header&gt; or &lt;section&gt;. Although important, more conventional elements like buttons, links or page heading tags transmit semantic information that is arguably more useful. Screen readers like VoiceOver have a feature called the <em>rotor</em>, available via the shortcut Ctrl — Alt — U, that tabulates page elements like this and permits the user to jump between them.</p><p>A heading — the tags &lt;h1&gt; to &lt;h6&gt; — marks the beginning of a distinct section of the content, ranked from the most to the least important.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/0*dRIo34kYrTV77wbb." /><figcaption>The VoiceOver “rotor” showing the full list of headings for the unoptimized Deezer.com site</figcaption></figure><p>The headings on the unoptimized site are symptomatic of tags chosen with visual rather than semantic meaning in mind. The level-5 headings for example act as Thumbnail subtitles; they do not follow a level-4 heading nor give any indication of context to the user.</p><p>Returning to the video, the first thing VoiceOver encounters should be a top-level &lt;h1&gt; heading containing the word “Deezer”. Instead, Moira tries to speak the site logo, a decorated link that happens to be the first active element in the page:</p><pre>&lt;div class=&quot;brand&quot;&gt;<br> &lt;a class=&quot;logo logo-deezer&quot; href=&quot;/en/&quot;&gt;&lt;/a&gt;<br>&lt;/div&gt;</pre><p>Here’s how the logo should be marked up:</p><pre>&lt;<strong>header</strong> <strong>role=&quot;banner&quot;</strong> class=&quot;brand&quot;&gt;<br> <strong>&lt;h1&gt;</strong><br>  &lt;a class=&quot;logo logo-deezer&quot; href=&quot;/en/&quot; <strong>lang=&quot;en&quot;</strong>&gt;<br>   <strong>&lt;span class=&quot;sr-only&quot;&gt;Deezer&lt;/span&gt;</strong><br>  &lt;/a&gt;<br> <strong>&lt;/h1&gt;</strong><br>&lt;/<strong>header</strong>&gt;</pre><p>We made the following changes:</p><ol><li>The &lt;header&gt; element encloses the content, providing an additional semantic cue to the screen reader;</li><li>A &lt;h1&gt; tag surrounds the anchor which itself contains the word “Deezer” marked up with the class sr-only. This CSS class moves the content off-screen, but its order in the HTML keeps it visible to the screen reader.</li><li>Finally, we add a lang=”en” attribute to the &lt;a href&gt;. This is an attempt to ensure the correct pronunciation of “Deezer” in languages other than English. Sadly, this is not currently used by VoiceOver on MacOS.</li></ol><p>Note also the attribute role on the &lt;header&gt; tag. This is our first encounter with <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA">Accessible Rich Internet Applications (ARIA)</a> attributes, annotations that provide contextual clues and make it easier for screen readers to use interactive content. An ARIA role highlights an important landmark in the page and is available in the VoiceOver <em>rotor</em> landmark list.</p><p>For the remaining headings in the page, we must decide what the primary content is and how it’s divided into sections, then add semantic headings and eliminate presentational ones to produce a logical flow from most to least important.</p><p>With this work done, we have the following organization, presenting a cleaner summary of Deezer.com’s content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/0*Qm15HK_y6BkuHpro." /><figcaption>The VoiceOver “rotor” showing headings for the optimized site. The unusual characters represent icons in the original content.</figcaption></figure><h3>Form Controls &amp; Links</h3><p>A screen reader speaks the textual content of a website until it encounters a focusable element such as a form control or link. Both form controls and links are special elements as they are automatically accessible — a &lt;button&gt; or an &lt;a href&gt; take focus and respond to mouse or keyboard interaction with no further work from the developer. If we instead choose a different HTML tag to carry an event listener — a &lt;div&gt; or a &lt;span&gt;for example — we must take special steps so the element is focusable and responds to the keyboard; the same goes for &lt;a&gt; tags without an href attribute. It’s for this reason that properly labeled form controls are recommended for all UI actions, and valid anchor tags to change the URL.</p><p>Let’s return to the VoiceOver <em>rotor</em>; here’s the list of form controls for the unoptimized site:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/0*01QAJ7pLggUwNMey." /><figcaption>The VoiceOver “rotor” showing the list of form controls. Note that unlabelled &lt;button&gt; tags are indistinguishable from one another. Again, the unusual characters are the result of icons in the original HTML.</figcaption></figure><p>The top two items in the list are the next two spoken by Moira in the video — the search field and its button. Here’s how they’re marked up:</p><pre>&lt;div class=&quot;search&quot;&gt;<br> &lt;div class=&quot;search-form&quot; role=&quot;search&quot;&gt;<br>  &lt;label for=&quot;menu_search&quot; class=&quot;sr-only&quot;&gt;Search&lt;/label&gt;<br>  &lt;input type=&quot;text&quot; id=&quot;menu_search&quot; placeholder=&quot;Search&quot; /&gt;<br>  &lt;button type=&quot;button&quot;&gt;<br>   &lt;!-- svg icon, details omitted ... --&gt;<br>   &lt;svg&gt;&lt;/svg&gt;<br>  &lt;/button&gt;<br> &lt;/div&gt;<br>&lt;/div&gt;</pre><p>This looks pretty good — we’ve used the correct ARIA role and have provided a label for the screen reader. When Moira speaks she says <em>“Search, search edit text, button”</em>, reading the label, the input field and the unlabeled button.</p><p>Let’s look at how this might be improved:</p><pre>&lt;div class=&quot;search&quot; <strong>role=&quot;search&quot;</strong>&gt;<br> <strong>&lt;form&gt;<br>  </strong>&lt;div class=&quot;search-form&quot;&gt;<br>   &lt;label for=&quot;menu_search&quot; class=&quot;sr-only&quot;&gt;Search&lt;/label&gt;<br>   &lt;input <strong>type=&quot;search&quot;</strong> id=&quot;menu_search&quot; placeholder=&quot;Search&quot; /&gt;<br>   &lt;button <strong>type=&quot;submit&quot;</strong>&gt;<br>    &lt;!-- svg icon, I omit the details ... --&gt;<br>    &lt;svg <strong>aria-labelledby=&quot;iconTitle&quot; role=&quot;img&quot;</strong>&gt;<br>     <strong>&lt;title id=&quot;iconTitle&quot;&gt;Search&lt;/title&gt;</strong><br>    &lt;/svg&gt;<br>   &lt;/button&gt;<br>  &lt;/div&gt;<br> <strong>&lt;/form&gt;</strong><br>&lt;/div&gt;</pre><p>Here’s what we did:</p><ol><li>Enclosed the content in a &lt;form&gt; tag and added a submit button to better communicate the purpose of these controls. We also moved the ARIA role to the parent; a &lt;form&gt; already has its own implicit landmark role and we don’t want to override it;</li><li>The input field is given a type attribute of value <em>“search”</em>. Again, this is an additional clue for the screen reader. Older browsers will treat a search input as a normal text field;</li><li>We made the &lt;svg&gt; icon accessible by adding a &lt;title&gt; tag. The ARIA attribute aria-labelledby references the title id to tell the screen reader where to find the label text.</li></ol><p>Moira will now speak this as <em>“Search, search text field blank, search button”</em>, which is a little better.</p><p>Continuing down the site menu, VoiceOver reads aloud the following items:</p><ol><li><em>“Visited link, home”</em></li><li><em>“Link, Hear this”</em></li><li><em>“Report a bug”</em></li><li><em>“Link, 24x24–000000–80–0–0.jpg My Music”</em></li><li><em>“Link, Favorite Tracks”</em></li><li><em>“Playlists”</em></li><li><em>“One”</em></li><li><em>“Albums”</em></li><li><em>“Apps”</em></li></ol><p>#1, #2 and #5 are links and are correctly spoken by VoiceOver.</p><p>#3, #6, #8 and #9 are spoken as non-interactive text. Each of these opens a panel when clicked and should thus be rendered as buttons. Here’s how the markup looks in the unoptimized site:</p><pre>&lt;li&gt;<br> &lt;a class=&quot;nav-link&quot;&gt;<br>  &lt;svg&gt;&lt;/svg&gt;<br>  Albums<br> &lt;/a&gt;<br>&lt;/li&gt;</pre><p>As the link lacks an href attribute it never takes focus and its contents are treated as purely textual. If an anchor tag was absolutely required, we could force it to act like a focusable button by adding two attributes: role=”button” and tabindex=”0”. However in this case we can simply use a real button:</p><pre>&lt;li&gt;<br> <strong>&lt;button type=&quot;button&quot; class=&quot;nav-link&quot;&gt;</strong><br>  &lt;svg&gt;&lt;/svg&gt;<br>  Albums<br> <strong>&lt;/button&gt;</strong><br>&lt;/li&gt;</pre><p>#7 is the content of the “new &amp; updated playlists” badge. As this is a non-critical part of the navigation menu, we add an aria-hidden attribute to make it invisible to the screen reader:</p><pre>&lt;li&gt;<br> &lt;button type=&quot;button&quot; class=&quot;nav-link&quot;&gt;<br>  &lt;svg&gt;&lt;/svg&gt;<br>  Playlist<br>  &lt;span class=&quot;badge badge-info&quot; <strong>aria-hidden=&quot;true&quot;</strong>&gt;1&lt;/span&gt;<br> &lt;/button&gt;<br>&lt;/li&gt;</pre><p>#4 is a link that contains an incorrectly marked up &lt;img&gt; tag. An image with a semantic purpose should always have an alt attribute explaining its content; for purely presentational images, an empty alt will make it invisible to the screen reader and that’s what we add in this case.</p><p>The final set of elements that Moira tries to read are the Player component and Flow. We’ll see in a later article how to make the Player and Flow fully accessible; for the moment, we can improve accessibility by using a combination of labeled &lt;button&gt; tags, the sr-only class and aria-hidden.</p><p>With these changes done, the form control list in the <em>rotor</em> now looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*4GX1d72J_evGPDKbmqrTTQ.png" /><figcaption>The optimized VoiceOver form controls “<em>rotor”</em></figcaption></figure><h3>Skipping to Content</h3><p>Despite these improvements, going through the menu every time you want to play a track or to launch Flow can get pretty tedious. There are a few ways we can improve this.</p><p>Firstly, we can add hidden links just after the site logo, visible only to screen readers, that allow the user to jump to the Player component or to the main content area that begins with the Flow player.</p><p>Secondly, we can make better use of HTML5 tags and ARIA landmark roles so, with the aid of the VoiceOver <em>rotor, </em>the user can easily skip to the important parts of the site. The most useful HTML5 tags &amp; roles are:</p><ol><li>&lt;header role=”banner”&gt;</li><li>&lt;nav role=”navigation”&gt;</li><li>&lt;section&gt; and &lt;article&gt;. Note that &lt;section&gt; should describe a distinct document section; an &lt;article&gt; should markup a piece of standalone content;</li><li>role=”region” — we add this to areas of special significance in the page, such as the Player and Flow components, along with an aria-label attribute that describes the region’s purpose;</li><li>&lt;aside role=”complementary”&gt; — a piece of content ancillary to the page’s overall topic e.g. the comments on an Album page.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkP9QHKK72Ppyr3yP8FYFw.png" /><figcaption>The optimized site with HTML5 tags outined — pink for &lt;header&gt;, blue for role=”search”, yellow for &lt;nav&gt;, green for &lt;article&gt; and red for &lt;section&gt;</figcaption></figure><p>This gives us the following list of landmark roles:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*FbjEaNDLacNKigfoDN8XkA.png" /><figcaption>Landmarks for the optimized site. Note the Player and Flow regions, giving easy access to the two most-used parts of the page.</figcaption></figure><h3>Final Result</h3><p>So, how does Moira do on the optimized site?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F200187214&amp;url=https%3A%2F%2Fvimeo.com%2F200187214&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F613625159_1280.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2e09e7d6a811b69910f462aa0e626a0/href">https://medium.com/media/f2e09e7d6a811b69910f462aa0e626a0/href</a></iframe><p>Note how VoiceOver distinguishes between those menu items that change the URL — links — and those that perform actions on the same page — buttons. Note also that the site still has problems. The Player in particular needs some work, and we’ll get to that in a later article.</p><p>Finally, we talked here about how to improve the web platform in cases where a site is read aloud<em>; </em>in the next article, we’ll look at functionality that helps all users, the able-bodied and those with both visual and motor disabilities — keyboard navigation.</p><p>(<a href="https://deezer.io/pressing-play-2b9771842389">Part 3 — Keyboard Navigation — can be found here</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7986780ba9f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deezer-engineering/how-to-read-music-b7986780ba9f">How to Read Music</a> was originally published in <a href="https://medium.com/deezer-engineering">Deezer I/O</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Accessibility at Deezer]]></title>
            <link>https://medium.com/deezer-engineering/accessibility-at-deezer-71462e019bf7?source=rss-d0d5702ecde2------2</link>
            <guid isPermaLink="false">https://medium.com/p/71462e019bf7</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Cormac Flynn]]></dc:creator>
            <pubDate>Tue, 17 Jan 2017 14:06:42 GMT</pubDate>
            <atom:updated>2017-03-31T13:37:30.316Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part 1 — An Introduction to Accessibility</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*zjw16ePFOz7CiGNT1LyQvw.png" /><figcaption>Deezer.com with the VoiceOver screen reader activated</figcaption></figure><p>Like many developers, I have my own checklist I run through when finalizing an application — performance checks, cross-browsing testing, that kind of thing. Accessibility, the act of making a site functional for all users, was usually near the bottom, an optional extra that was nice to have, if I had the time. I understood its importance in an abstract way, but had no concrete knowledge about how a blind or visually-impaired person might actually use a web application.</p><p>I think this is probably a common experience — if accessibility is addressed at all, it’s usually an afterthought or box-ticking exercise, particularly with a deadline looming. So, given the chance to work on pet projects during the pre-Holiday period at Deezer, I decided to finally dig into the topic to learn how a disabled person might use the web in the real world and how Deezer could be made more usable for everyone.</p><p>This article, the first in a series, describes why accessibility is important and how we intend to change the Deezer web platform to ensure it’s as easy-to-use as possible for all our users.</p><h3>What is Accessibility &amp; Why is it Important ?</h3><p>Accessibility (<em>a11y</em> for short) describes the process of ensuring that people with disabilities can use your software.</p><p>A common misunderstanding is that “disability” refers only to blind people. There are in fact a variety of visual, auditory and motor disabilities that make using the web hard, difficulties that may be shared with older people, those with learning problems or even users on low-bandwidth connections. An accessible website improves the user experience for all of these groups.</p><p>Focusing on improving the accessibility of a web site is often a hard sell. It can be difficult to explain the benefits, especially when the perception exists that the number of impacted users is small. It can be harder again to advise developers when online resources are confusing or contradictory. So what are the arguments in favour of <em>a11y</em> compliance, and how difficult is it to build an accessible application?</p><p>A hard-headed economic case can easily be made. In the United States, <a href="http://www.afb.org/info/blindness-statistics/2">23.7 million adults</a> report difficulty seeing — or 10% of the population. In the EU27 <a href="http://www.fch.europa.eu/page/accessibility">50 to 75-million have some disability</a>, of which <a href="http://www.euroblind.org/resources/information/">30-million are blind or partially-sighted</a>. In France alone, <a href="http://www.aveuglesdefrance.org/quelques-chiffres-sur-la-deficience-visuelle">1.7 million report having vision problems</a>. The number of elderly in both regions dwarfs all these figures — it’s projected that by 2025, <a href="http://ec.europa.eu/health/population_groups/elderly_en">20% of the European population will be over 65</a>.</p><p>There may be legal requirements, now or in the future. <a href="https://www.section508.gov/">Section 508</a> in the United States, alongside <a href="http://eur-lex.europa.eu/legal-content/EN/TXT/?uri=uriserv:OJ.L_.2016.327.01.0001.01.ENG&amp;toc=OJ:L:2016:327:TOC">directive 2016/2102 in the European Union</a>, oblige public bodies to ensure their services are accessible to all users. There is every chance that work to complete the digital market in the EU will include moves to ensure that digital services are accessible to all its citizens.</p><p>Deezer also has an ethical duty to its users and to society in general; as music distribution moves increasingly to streaming platforms we should make our content available to everybody or risk abandoning all but the able-bodied to legacy media, or to our competitors.</p><p>Finally, it’s important to note that changes made for disabled users improve the website for everyone. A consistent and clear UI, correctly-labeled form fields and keyboard navigation make the site easier for everybody to use. Providing text-equivalents for media such as images not only helps those on low-bandwidth, but makes our content easier for search engines to index. Improving color contrast and readability assists those who are visually-impaired, but also some elderly people and those who suffer from color blindness.</p><p>The concrete steps required to make a site accessible are fairly modest, and often things we’re doing already, but have the potential to improve the experience of using Deezer for a diverse cohort of users.</p><h3>How can we better cater for our disabled users?</h3><p>There are two primary ways in which a visually-impaired person navigates the web. Blind or severely visually disabled users often use a <em>screen reader</em>, the most well-known of which are <a href="http://www.freedomscientific.com/Products/Blindness/JAWS">JAWS</a> or <a href="http://webaim.org/articles/voiceover/">VoiceOver</a> (the screen reader installed with MacOS).</p><p>A screen reader will speak aloud the content of a website, from top to bottom, using clues from the HTML to determine the language, and the difference between plain text, images, form fields and other elements that are part of a standard website. It allows blind users to jump between different sections, to and from site navigation and to interact with media and interactive elements using keyboard commands alone — but <em>only</em> if the site is correctly structured. Our current website is not optimized for screen reader navigation; if you’re on a Mac, open <a href="http://www.deezer.com/">Deezer.com</a> in Safari and press cmd — F5 to give VoiceOver a try.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F199858230&amp;url=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F199858230&amp;image=http%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F613213490_1280.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d5c2d3f59aa23d68106e862b72e8406/href">https://medium.com/media/7d5c2d3f59aa23d68106e862b72e8406/href</a></iframe><p>Those with some vision, or with motor disabilities, can often browse the web conventionally but are sometimes unable to use a mouse. Such users rely entirely on keyboard navigation. Again, this presupposes that a website has been designed to accommodate exclusive use of the keyboard; Deezer’s support is uneven, at best.</p><p>There are a number of actions we intend to take to improve the website experience for all users. Some are simple — like changes to the underlying HTML — whereas others are more difficult, such as managing the user’s focus as they navigate through the site via the keyboard. I’ve divided the work into the following steps:</p><ol><li>Improving Semantic Markup for Screen Readers</li><li>Simple Keyboard Navigation, Tab Order and Focus</li><li>Element Outline &amp; Color Contrast</li><li>Accessible Components &amp; Aria Attributes</li><li>Making an Accessible Player</li></ol><p>Each of these will be followed by a blog article explaining the changes and challenges involved.</p><p>Finally, as an able-bodied person, any testing I do will obviously be insufficient without input from the lived experiences of disabled people. Therefore we hope, ultimately, to test a refreshed Deezer web application with a group of real users to gauge the impact of the changes and to observe how a disabled person actually uses the website. In that sense, the completion of the above steps represents the minimum work required to ensure the site is accessible.</p><p>In the meantime though, and throughout this series, all feedback and comments are very welcome!</p><p>(<a href="https://deezer.io/how-to-read-music-b7986780ba9f">Part 2 — Semantic Markup and Screen Readers — can be found here</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71462e019bf7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/deezer-engineering/accessibility-at-deezer-71462e019bf7">Accessibility at Deezer</a> was originally published in <a href="https://medium.com/deezer-engineering">Deezer I/O</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>