23.01.2018 Views

MICROSOFT_PRESS_EBOOK_PROGRAMMING_WINDOWS_8_APPS_WITH_HTML_CSS_AND_JAVASCRIPT_PDF

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Id=\"e2a62d42-dbca-43d2-b779-66eb916d9df4\" AppId=\"Microsoft.SDKSamples.Store.JS_8wekyb3d8bbwe\"<br />

ProductId=\"product2\" PurchaseDate=\"2012-09-11T17:39:12Z\" ProductType=\"Durable\"<br />

ExpirationDate=\"2014-01-01T00:00:00Z\" /><br />

If you want to consume a receipt as an XML document instead of a string (for display or print), it’s a<br />

simple matter to create such an object like we did with tile and notification XML in Chapter 13:<br />

var receiptDOM = new Windows.Data.Xml.Dom.XmlDocument();<br />

receiptDOM.loadXml(receipt);<br />

Accessibility<br />

As I mentioned in this chapter’s introduction, nearly 60% of users employ accessibility features in some<br />

capacity—sometimes because of a real disability, sometimes due to personal preference, and sometimes<br />

just to make the device easier to use within certain environments. In many countries, accessibility is<br />

actually a legal requirement, so it will be necessary if you plan to make an app available in those regions.<br />

In short, supporting accessibility is something that every app should do and do well, and fortunately this<br />

isn’t the onerous task you might think it to be. (For reference, see Making your app accessible and<br />

Introduction to Web Accessibility; the latter is written for web apps but is very applicable to Windows<br />

Store apps. Also see Guidelines and checklist for Accessibility, Practices to avoid for accessible apps, and<br />

Implementing accessibility for particular content types.)<br />

Accessibility might feel like a lot of work because developers are relatively unfamiliar with what it<br />

means. To remedy this, take a few minutes to give yourself some direct experience. But before you do<br />

anything else:<br />

Go to PC Settings > Sync Your Settings and turn off the options for Desktop Personalization and Ease<br />

of Access. Otherwise the effects of your tinkering will roam to other devices you might have. I learned this<br />

the hard way when I was playing around with contrast settings on my main laptop after which a game my<br />

son wanted to play on a tablet came up mostly black! Clearly, that app didn’t handle high contrast well,<br />

but it also took me a while to figure out what was going on!<br />

Now that we’ve taken care of that detail, try the following:<br />

• Press Left Shift+Alt+Print Screen or go to PC Settings > Ease of Access and toggle high contrast<br />

mode (see image below). How does the app respond? Are all of the critical elements visible? A<br />

mode like this is important for users who have difficulty distinguishing subtle colors.<br />

781

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!