<?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 Kai Wedekind on Medium]]></title>
        <description><![CDATA[Stories by Kai Wedekind on Medium]]></description>
        <link>https://medium.com/@kai_wedekind?source=rss-c0afc115ccbf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Js_sw4sGYmIoSKYPsxB77g.jpeg</url>
            <title>Stories by Kai Wedekind on Medium</title>
            <link>https://medium.com/@kai_wedekind?source=rss-c0afc115ccbf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 04:35:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kai_wedekind/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[Solve Traditional Accessibility Problems The Untraditional Way]]></title>
            <link>https://codeburst.io/solve-traditional-accessibility-problems-the-untraditional-way-60208c81efa6?source=rss-c0afc115ccbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/60208c81efa6</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Kai Wedekind]]></dc:creator>
            <pubDate>Wed, 05 Sep 2018 11:06:44 GMT</pubDate>
            <atom:updated>2018-09-05T14:36:10.381Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ek6U6OuYCcWOjiaVDUlDWg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CRP6UJFIK4U465-9qufqWQ.png" /></figure><blockquote>Accessibility is the practice of making your websites usable by as many people as possible</blockquote><p>Giving users the ability to customize their account color scheme can have devastating effects on the accessibility of your application. When you allow users to alter their color palette, you introduce the possibility of implementing a color contrast ratio that is inaccessible.</p><p>Thus, special considerations must be made to ensure the color of text content in your UI has a strong enough color contrast ratio to be accessible.</p><p>Black and white provide the strongest color contrast ratios, however in their purest state (#ffffff and #000000), they can have a negative impact on users’s experience — they can be too harsh on the user’s eyes. Thus, it’s recommended to use off-black, #101010 and off-white, #f0f0f0. For simplicity sake, I’m going to use the purest states in my examples.</p><p>So how can you programmatically determine which text color to use based on a user’s color palette? There are two equations which work well to determine the appropriate text color: the <strong>50 percent equation</strong> and the <strong>YIQ equation</strong>. Both are easy to implement and produce similar results.</p><h4>50% Equation</h4><p>The 50% equation compares the background color to the hex value 50% of the way between pure black and pure white (the median hex value).</p><ul><li>If the background color value is less than the 50% mark, it’s on the darker side of the spectrum and returns white for the text color.</li><li>If the background color value is greater than the 50% mark, it’s on the lighter side of the spectrum and returns black for the text color.</li></ul><p>Below is the corresponding function for calculating the accessible text color. It converts the six-character hex background value into an integer and compares it to 50% of the value for pure white.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1eb656d973174f73523949794f3b2574/href">https://medium.com/media/1eb656d973174f73523949794f3b2574/href</a></iframe><p>It doesn’t get much simpler than that!</p><p>The 50% equation in action can be found here:</p><ul><li><a href="https://kaiwedekind.github.io/color-contrast-50-percent-equation/">Color Contrast 50% Equation</a></li><li><a href="https://github.com/KaiWedekind/color-contrast-50-percent-equation">KaiWedekind/color-contrast-50-percent-equation</a></li></ul><h4>YIQ Equation</h4><p>The YIQ equation converts the RGB color (0 to 255) into a YIQ color space. <a href="https://www.w3.org/TR/AERT/#color-contrast">YIQ</a> is the standard formula for calculating the perceived brightness of a color, and is recommended by the World Wide Web Consortium (W3C).</p><p><strong>YIQ Equation</strong><br>((Red value X 299) + (Green value X 587) + (Blue value X 114)) / 1000</p><p>Below is the function for calculating the YIQ color space. I have chosen to use a brightness value of 128, which is considered bright.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4c421427e95244c681877a46390c23e6/href">https://medium.com/media/4c421427e95244c681877a46390c23e6/href</a></iframe><ol><li>First, break down the hex value into separate RGB values.</li><li>Once everything is scaled and normalized, it will contain an integer within the range 0 to 255.</li><li>Similar to the 50% function, we must check if the input color value is higher or lower than the 50% mark between black and white. This will return either black or white depending upon which value produces the most optimal color contrast.</li></ol><p>That’s it — two simple contrast equations which work well to determine the best font color for optimal readability. The majority of the time, these two contrast algorithms produce the same result. There are some instances where the results conflict, but generally you can use whichever equation you prefer.</p><p>The YIQ equation in action can be found here:</p><ul><li><a href="https://kaiwedekind.github.io/color-contrast-yiq-equation/">Color Contrast YIQ Equation</a></li><li><a href="https://github.com/KaiWedekind/color-contrast-yiq-equation">KaiWedekind/color-contrast-yiq-equation</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WEAmfiK-rbdQgmaa5N79BA.png" /></figure><p>Now let’s solve the color contrast problem with machine learning and a neural network; we only need a few lines of code. We won’t delve into the details of machine learning and neural networks, however we can use them to solve the problem of selecting the optimal text color for maximum readability.</p><h4>Neural Networks</h4><p>Neural networks (NN) are one of the approaches used in machine learning. With neural networks we can better model complex relationships between inputs and outputs to find patterns in data.</p><h4>Brain.js</h4><p><a href="https://github.com/BrainJS/brain.js">Brain.js</a> is a great library for implementing machine learning approaches within web applications. Brain.js is very useful and can add a lot of value to JavaScript/Node applications. Its ease-of-use allows anyone to get started with neural networks.</p><p>Installing the machine learning library brain.js is very easy.</p><pre>yarn add brain.js</pre><p>Now, import brain.js module into you project.</p><pre>const brain = require(&#39;brain.js&#39;)</pre><p>Now, we can solve the color contrast problem in three steps:</p><ol><li><strong>Create a neural network:</strong><br>let network = new brain.NeuralNetwork();</li><li><strong>Train the network with training data: </strong><br>network.train(data, { log: true });</li><li><strong>Run the network with real data:</strong><br>network.run();</li></ol><p>You train your network by simply giving it an array of values where each array input has two attributes: an input and an output attribute. The network is trained with historical data, where the input and output values are already known.</p><p>Brain.js expects values between 0 and 1. Inputs and Outputs can have one or more values. We will train our color contrast network by formatting the inputs as RGB colors and the outputs to be either black or white.</p><p>Now, lets start training our network.</p><ol><li>Pick a random color</li><li>Normalize the RGB value to a value between 0 and 1 by dividing by 255</li><li>Add this value as an input to the training data</li><li>Give your input value a respective output value of either black or white</li><li>Repeat step 1 – 4</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f802543979a8337479c2da9a86270d57/href">https://medium.com/media/f802543979a8337479c2da9a86270d57/href</a></iframe><p>With the training data, you can now run your network and let it calculate the probability distribution of the color with the highest contrast.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/70f85f013281f83883a03f786ad5ed75/href">https://medium.com/media/70f85f013281f83883a03f786ad5ed75/href</a></iframe><p>Brain.js is going to train the network and is going to predict if the text color should be black or white. You should get something similar to this:</p><pre>...<br>iterations: 530, training error: 0.006119754857500322<br>iterations: 540, training error: 0.005870729613810573<br>iterations: 550, training error: 0.005638886768098001<br>iterations: 560, training error: 0.005422631733361282<br>iterations: 570, training error: 0.0052205261001664685<br>iterations: 580, training error: 0.005031314834044752<br>result { white: 0.059708621352910995, black: 0.9404082298278809 }</pre><p>Brain.js predicted that the color contrast is light with an accuracy of 0.94 (94%). I have used a training set of four input values which is extremely low for a machine learning model, but it already gives me relatively good results.</p><p>A network becomes more accurate as you add more historical data to train. A neural network is only as good as the quality and amount of its data points; data is the most valuable element in Machine Learning.</p><p>If you want to specify how you want your machine learning model to be trained, you can specify the options as a second argument in the train function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8be5c1be9e8a4bbc6729fe31ecc4d0b4/href">https://medium.com/media/8be5c1be9e8a4bbc6729fe31ecc4d0b4/href</a></iframe><p>The network will train until the training error has fallen below the error threshold (default 0.005) or the max number of iterations (default 20000) has been reached, whichever comes first.</p><p>By default, training won’t let you know how its doing until the end, but if you set log to true to get periodic updates on the current training error of the network. The training error should decrease each time. The updates will be printed to console. If you set log to a function, this function will be called with the updates instead of printing to the console.</p><p>The <strong>learning rate </strong>is a parameter that influences how quickly the network trains. It’s a number from 0 to 1. If the learning rate is close to 0 it will take longer to train. If the learning rate is closer to 1 it will train faster but it&#39;s in danger of training to a local minimum and performing badly on new data. The default learning rate is 0.3.</p><p>In the color-prediction.js above, I used network.run() and I received the probability values of black and white. With this, I can check whether the probability value of white is larger than the probability value of black; if it is, the color should be white. But brain.js has also a method brain.likely(rgb, network) which can do that for us. If we want the output to be either white or black, we can add the following code:</p><pre>const result = brain.likely({ r: 0, g: 1, b: 0.65 }, network);<br>console.log(result);</pre><p>Now, if you find a color contrast which is not correct, instead of adding more edge cases to your traditional algorithm, you just have to add another dataset to your training data to train your model a little bit better.</p><p>This way it is much closer to the way in which I would expect it to work. So instead of solving for some strange edge cases, you can just add another data point to the training data.</p><p>Instead of solving for edge cases I try to find spots in the data and train the model more effectively. Within moments we have been able to solve this problem. It would have been very frustrating to solve this in code.</p><p>You can let your users decide which color contrast they find the best for their eyes. You can create a random RGB generator and let your users vote. Each time the user votes, the input, which is the RGB combination data, and the color with the highest contrast are going to be converted into inputs and outputs.</p><p>In this way, crowd-sourcing can help you to accumulate your training data. You can additionally just ask your designers to give you valid RGB data points with their expected contrast color.</p><p>The neural network with brain.js in action can be found here:</p><ul><li><a href="https://kaiwedekind.github.io/color-contrast-neural-network/">Color Contrast Neural Network</a></li><li><a href="https://github.com/KaiWedekind/color-contrast-neural-network">KaiWedekind/color-contrast-neural-network</a></li></ul><p>If you are interested in solving the color contrast issue with neural networks and Tensorflow.js, then you can find my solution here:</p><ul><li><a href="https://kaiwedekind.github.io/color-contrast-tensorflow/">Color Contrast Tensorflow</a></li><li><a href="https://github.com/KaiWedekind/color-contrast-tensorflow">KaiWedekind/color-contrast-tensorflow</a></li></ul><p>There are many other non traditional methods which you can improve the accessibility of your applications, such as using image recognition for automated image descriptions to help blind people understand your content more effectively, or machine learning which can be used to create automated text summaries in order to help people with learning disabilities, real-time translation or speech recognition for automated subtitles.</p><h3>Conclusion</h3><p>Color contrast is an important topic. It is important to make the contrast between colors as high as possible, as it makes it easier for users to read content, increases accessibility and is generally just easier on the eyes.</p><p>The non-traditional ways discussed above are only a few ways that have emerged thanks to machine learning and neural networks. Such solutions are already finding their way into assistive technologies.</p><p>As creative people add those solutions to new products and applications, it will close the gaps experienced by people with disabilities. These are exciting times and this is only the beginning.</p><p>There are plenty of other ways out and it doesn’t really matter if you are using traditional or non-traditional ways to solve machine learning. What is important is that you pick one method and implement it within your application.</p><figure><a href="http://bit.ly/codeburst"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i3hPOj27LTt0ZPn5TQuhZg.png" /></a></figure><blockquote>✉️ <em>Subscribe to </em>CodeBurst’s<em> once-weekly </em><a href="http://bit.ly/codeburst-email"><strong><em>Email Blast</em></strong></a><strong><em>, </em></strong>🐦 <em>Follow </em>CodeBurst<em> on </em><a href="http://bit.ly/codeburst-twitter"><strong><em>Twitter</em></strong></a><em>, view </em>🗺️ <a href="http://bit.ly/2018-web-dev-roadmap"><strong><em>The 2018 Web Developer Roadmap</em></strong></a><em>, and </em>🕸️ <a href="http://bit.ly/learn-web-dev-codeburst"><strong><em>Learn Full Stack Web Development</em></strong></a><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60208c81efa6" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/solve-traditional-accessibility-problems-the-untraditional-way-60208c81efa6">Solve Traditional Accessibility Problems The Untraditional Way</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[6 Reasons You Should Use Native Web Components]]></title>
            <link>https://codeburst.io/6-reasons-you-should-use-native-web-components-b45e18e069c2?source=rss-c0afc115ccbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b45e18e069c2</guid>
            <category><![CDATA[web-components]]></category>
            <category><![CDATA[shadow-dom]]></category>
            <category><![CDATA[web-standards]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[custom-elements]]></category>
            <dc:creator><![CDATA[Kai Wedekind]]></dc:creator>
            <pubDate>Sun, 19 Aug 2018 17:17:30 GMT</pubDate>
            <atom:updated>2018-08-26T18:57:57.753Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g2rztWwYlibKtDnvNj4zeQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F4jcjEDh9IofohlWMomeVQ.png" /></figure><p>We write code not only for computers to understand and execute, but for other humans. This is a mindset that hasn’t resonated with popular sites such as Ebay, Facebook, Google.</p><p>This is partially the fault of developers who aren’t using semantic elements. But fault can also be attributed to HTML itself, which hasn’t kept up with the demand for the ability to build complex web applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cxbivXm-rUQoPRvWykHPEw.png" /></figure><p>One example of developers misusing HTML is Gmail which has approximately 47 layers of divs.</p><p>But unfortunately this is how developers have been using HTML in their web applications. Although the applications may look good from the user’s perspective, the code is completely illegible and not well written from a modern development perspective.</p><p>Developers need to place more emphasis on writing cleaner, more semantic markup for several reasons: better performance, increased accessibility, and easier maintainability.</p><p>Let’s take a look at a revamped version of Gmail’s HTML code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9668e336127365a57cdf3fcc0714719f/href">https://medium.com/media/9668e336127365a57cdf3fcc0714719f/href</a></iframe><p>Native Web Components provide a lot benefits:</p><ul><li><strong>Declaration</strong>: You can easily declare components on your page that are ready to go</li><li><strong>Composability</strong>: You can compose applications using smaller chunks of code, with the Shadow DOM</li><li><strong>Reusability</strong>: You can import, use and reuse elements in applications</li><li><strong>Maintainability</strong>: Compartmentalized, reusable code is the best way to maintain code readability; it reduces overall application size, and simplifies debugging</li><li><strong>Extensibility</strong>: Browser elements or custom web components can be extended with the custom elements API</li><li><strong>Scoping</strong>: Shadow DOM provides DOM and CSS scoping where styles don’t leak out and component DOM is all local. You define the element api inside your component and it doesn’t leak into the global scope</li><li><strong>Interoperability</strong>: Native web components are interoperable<strong> </strong>at<strong> </strong>the browsers lowest level which is DOM</li><li><strong>Productivity</strong>: Using already built components and iterating on top of them lets us develop faster and more productive</li><li><strong>Accessibility</strong>: By using and extending existing browser elements, the default browser accessibility comes with it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_pCCBIoKGn-ZvPbf_1I9Q.png" /></figure><p>Having your front-end application code split up into component libraries or even design systems can ensure brand consistency through the company. It also provides an additional benefit of the ability to be used by all teams, regardless of tech stack.</p><p>This is true for both large companies as well as as companies who grow quickly. Web components are also extremely useful for teams who are working on many different projects.</p><p>The advantage of DRY (Don’t Repeat Yourself) in programming is crucial, especially when writing applications for the web. Web components can be used to ensure a consistent look and feel without having to recreate everything from scratch again and again when starting a new project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JpT5SldQFsXn7MVRvCrYxQ.png" /></figure><p>If you are a development manager or executive, native web components save you money. Developers will have the ability to focus solely on making native reusable components, similar to legos, and use these blocks in other applications across teams. Your teams will be able to build and deploy applications much more quickly. This leads to less time devoted to developing new features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TNiOawzPleT4tpqJi9hNzw.png" /></figure><p>From a developer’s perspective, native web components help to manage the project more efficiently. The code will be more consumable. Code can be shared between teams more easily. And as a by-product, code quality will be improved, as developers can re-use existing components. Finally, applications that are using native web components reap the benefits,: when you add a fix or add a new feature, these changes get propagated down to each instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnCYgCFicSdSauFIdAyIIw.png" /></figure><p><a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components">Web components</a> is a standard that was added by the “World Wide Web Consortium” or W3C. The W3C sets or defines the standard of features that browsers can implement.</p><p>Web components enable developers to write applications in a more modular way by breaking the applications down into smaller logical chunks with reusable functionality.</p><p>A couple of years ago, all browser vendors got together and agreed on a new set of web standards for defining web components.</p><h3>Core Elements of Web Components</h3><p>There are four core elements of web components.<strong> </strong>All browser vendors have agreed to comply on at least three out of four of these elements listed below.</p><h4>1. Custom Elements</h4><p>The <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/customElements">Custom Element</a> API lets you create custom declarative elements, or extended elements, that the browser comes with out-of-the-box.</p><p>The process of creating a new element is as follows:</p><ul><li>Creating a new element class that extends from one of the existing HTMLElement classes</li><li>Associate the new element with an HTML template</li><li>Register this element with a new name</li></ul><p>By creating custom components, the browser will recognize the new element and will render it accordingly.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d78fde79f3974894c237badc7b991f88/href">https://medium.com/media/d78fde79f3974894c237badc7b991f88/href</a></iframe><h4>2. HTML Templates</h4><p>With <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template">HTML templates</a> it is possible to group of client-side content which is not rendered at load time. HTML Templates are rendered at runtime by JavaScript.</p><p>The elements <strong>&lt;template&gt;</strong> and <strong>&lt;slot&gt;</strong> allow you to create reusable markup for custom elements.</p><pre>&lt;template id=&quot;todo-item&quot;&gt;<br>  &lt;li&gt;<br>    ...<br>  &lt;/li&gt;<br>&lt;/template&gt;</pre><h4>3. Shadow DOM</h4><p>With <a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM">Shadow DOM</a> we can create scoped sub-trees of within the DOM that is completely hidden from the outside. This provides several benefits among which is encapsulation of the styling of the DOM sub-tree.</p><p>Shadow DOM ensures that web components are interoperable and can run in any environment. Additionally, shadow DOM allows us hide presentational elements from end users; you can effectively create a private and a public API. There is no requirement to use shadow DOM and custom elements together, as each specification was designed to work as a stand-alone.</p><pre>const shadowRoot = this.attachShadow({mode: &#39;open&#39;})</pre><h4>4. HTML Imports</h4><p><a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/HTML_Imports">HTML Imports</a> is a proposal for including web components as HTML documents within another HTML document. The HTML Imports specification is the most contended element of the Web Components specifications, however it is only supported by Chrome and Opera.</p><pre>&lt;link rel=&quot;import&quot; href=&quot;my-todos.html&quot;&gt;</pre><h3>Browser support</h3><p>An important consideration when using the Web Components spec today is browser support. All modern browsers have been moving toward implementing <a href="https://developers.google.com/web/fundamentals/web-components/customelements">Custom Elements v1</a>.</p><p>Using Custom Elements v1 you can rely on a <a href="https://github.com/webcomponents/webcomponentsjs">polyfill</a> which gives you support for most of the features in all modern browsers (IE 10+). I’ve been using a client-side loader (<a href="https://unpkg.com/@webcomponents/webcomponentsjs@2.0.0/webcomponents-loader.js">webcomponents-loader.js</a>), which dynamically loads the minimum polyfill bundle, using feature detection.</p><p>There is also a <a href="https://github.com/WebReflection/document-register-element#tested-on">stand-alone working lightweight version</a> of the W3C Custom Elements specification which is already used in production by the Google AMP project. The polyfill claims to have experimental support down to IE8, (you can see the full list <a href="https://github.com/WebReflection/document-register-element#tested-on">here</a>). Unfortunately some features, like full style encapsulation, cannot be polyfilled.</p><p>If you want to support for <a href="https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver">Mutation Observers</a> in IE10, there is an additional shim you will need to include.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vE3zUnbXhVOmg9tECcqwyg.png" /></figure><p>Having best practices is always a good idea to define your development style within and across teams. Native web components should work everywhere. They are based on web standards and they are the future of the platform. Here are some best practices and guidelines for web components I have found.</p><ul><li><a href="https://www.webcomponents.org/community/articles/web-components-best-practices">Web Components Best Practices</a></li><li><a href="https://www.webcomponents.org/community/articles/how-should-i-name-my-element">How should I name my element? - webcomponents.org</a></li><li><a href="https://developers.google.com/web/fundamentals/web-components/best-practices">Custom Element Best Practices | Web Fundamentals | Google Developers</a></li><li><a href="https://github.com/GoogleWebComponents/style-guide">GoogleWebComponents/style-guide</a></li><li><a href="https://github.com/mateusortiz/webcomponents-the-right-way#best-practices">mateusortiz/webcomponents-the-right-way</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u8onacAB03pY976Or5Zd_A.png" /></figure><p>Many developers have a hard time getting their heads around what Custom Elements offer as a stand-alone technology. This isn’t made any easier by the fact that the term “Web Components” is often used interchangeably with Custom Elements. In particular, developers often conflate Custom Elements and Shadow DOM, despite the two being totally separate.</p><p>Without a doubt, the Web Components specification is going to play a large role in the evolution of front-end web applications in the future. Certainly, native web components won’t replace the component engines provided by JavaScript frameworks, but there is a huge opportunity for these two paradigms to work together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZtGh__-szC3FwjLH1Kymg.png" /></figure><p>We are moving towards a more agnostic kind of solution where we can write these components and use them throughout different kind of solutions and with various JavaScript frameworks.</p><p>Native web components with custom elements are such a flexible primitive, that once you start to see all of the possibilities, the opportunities are endless.</p><p>We can consider web components as a tool to extend HTML, not to replace it.</p><p>I’m excited to see what the next few years will hold as more teams begin rolling out their own element suites and we move to an era of high quality, interoperable, UI components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CLCtJdz_YwJ3BpW4uPIJGw.png" /></figure><h4>Book recommendations</h4><p><a href="https://amzn.to/2Os3t8e">Web Components in Action</a></p><h4>References</h4><ul><li><a href="https://developers.google.com/web/fundamentals/web-components/shadowdom#composition_slot">Shadow DOM v1: Self-Contained Web Components | Web Fundamentals | Google Developers</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow#Browser_compatibility">Element.attachShadow()</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/shadowRoot">Element.shadowRoot</a></li><li><a href="https://caniuse.com/#search=web%20components">Can I use... Support tables for HTML5, CSS3, etc</a></li><li><a href="https://www.webcomponents.org/polyfills/">Polyfills - webcomponents.org</a></li><li><a href="https://unpkg.com/@webcomponents/webcomponentsjs@2.0.0/">UNPKG - @webcomponents/webcomponentsjs</a></li><li><a href="https://github.com/WebComponents/webcomponentsjs">webcomponents/webcomponentsjs</a></li></ul><figure><a href="http://bit.ly/codeburst"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i3hPOj27LTt0ZPn5TQuhZg.png" /></a></figure><blockquote>✉️ <em>Subscribe to </em>CodeBurst’s<em> once-weekly </em><a href="http://bit.ly/codeburst-email"><strong><em>Email Blast</em></strong></a><strong><em>, </em></strong>🐦 <em>Follow </em>CodeBurst<em> on </em><a href="http://bit.ly/codeburst-twitter"><strong><em>Twitter</em></strong></a><em>, view </em>🗺️ <a href="http://bit.ly/2018-web-dev-roadmap"><strong><em>The 2018 Web Developer Roadmap</em></strong></a><em>, and </em>🕸️ <a href="http://bit.ly/learn-web-dev-codeburst"><strong><em>Learn Full Stack Web Development</em></strong></a><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b45e18e069c2" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/6-reasons-you-should-use-native-web-components-b45e18e069c2">6 Reasons You Should Use Native Web Components</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IBM’s new way to empower customers • In-App-Experience (IAX)]]></title>
            <link>https://medium.com/@kai_wedekind/ibms-new-way-to-empower-customers-in-app-experience-iax-6763c411cfe?source=rss-c0afc115ccbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/6763c411cfe</guid>
            <category><![CDATA[customer-engagement]]></category>
            <category><![CDATA[customer-experience]]></category>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[iax]]></category>
            <category><![CDATA[self-help]]></category>
            <dc:creator><![CDATA[Kai Wedekind]]></dc:creator>
            <pubDate>Tue, 31 Jul 2018 11:42:11 GMT</pubDate>
            <atom:updated>2018-07-31T12:02:45.951Z</atom:updated>
            <content:encoded><![CDATA[<p>by <a href="https://medium.com/u/c0afc115ccbf">Kai Wedekind</a> and <a href="https://medium.com/u/286199bbb1eb">Thomas Reinecke</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rsXdPKDaQTh-W1yJkcmELQ.png" /></figure><p>Great customer support looks very different than it did a decade ago. Consumer expectations for services have never been higher, and companies everywhere are looking for better ways to meet those expectations.</p><p>Customers increasingly expect service and support to be available across multiple channels of interaction, and they also want to be able to switch seamlessly between self-service options.</p><p>There is a great demand to be able to start in a self-service environment, but at the same time there is always a portion of interactions or problems that aren’t necessarily solvable by self-service. As a result of today’s competitive economy, it is imperative for businesses to come up with customer service strategies that will allow companies to retain their customers and keep their businesses ahead of the competition.</p><p>‘Traditional’ customer service strategies are no longer as effective. These days, companies must use “modern” customer service strategies, where employees engage with customers and provide a new customer experience environment that businesses are increasingly expected to offer.</p><p>There is nothing more frustrating to customers than not being able to find a phone number to call when they need it, or having to explain their question or complaint all over again after shifting from one channel to another.</p><p>Businesses which succeed in delivering a positive customer experience, rather than a frustrating one, stand to gain more loyal patrons.</p><p>How is innovation and growth affecting customer support as a whole? Zendesk explored in their <a href="https://www.zendesk.com/benchmark/">Customer Service Benchmark</a> that 91% of consumers will use a self-service knowledge base if provided. This means that traditional support channels like phone and email often cost your customers more time and energy than they’re willing to spend.</p><p>On the other hand, a great knowledge base full of helpful content can empower your customers to find answers themselves, which means happier customers and fewer support cases for your team.</p><p>Making sure that your customers are satisfied is essential to your business success and providing top class customer service and in-app experience can make your company stand out. According to a research in 2015 by <a href="http://www.gartner.com/newsroom/id/3072017">Gartner</a>, over 50 percent of modern companies planned to redirect their investment to improve customer experience and support.</p><p>IBM has been heavily investing in transforming its businesses, too. All of IBM’s businesses with traditional software products are shifting to <a href="https://www.ibm.com/cloud">IBM Cloud</a> to provide traditional products as Software as a Service (SaaS) offerings.</p><p>The typical customer support of on-premise products has always been a complex area, where support engineers have to solve customer environment specific problems. Gathering information which is necessary to determine (and finally solve) a problem continues to be a challenge that requires noteworthy efforts on both the customer and the solution side.</p><p>By using IBM’s SaaS offerings running on IBM Cloud, clients no longer have to worry about running, configuring and operating their own environments. IBM is covering most of the operational issues in-house, without having clients even realizing it. The customer support view therefore is shifting towards typical end user issues for SaaS products.</p><blockquote>“How can I get help if I have an issue with my product?”</blockquote><p>The answer is, <strong>right where you are, </strong>in your product<strong>. </strong>IBM’s want to bring support and self-help solutions into all IBM SaaS offerings. <br>This is why IBM started the project <strong>In-App-Experience (IAX)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*MzoMolHapXvaYTZNR5a1Rw.png" /></figure><p>IAX is going to consolidate the effort to bring the following support features to all IBM SaaS offerings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O9wmZLdvEtFMNVIr9irKjQ.png" /></figure><p>Search for documentation<strong> </strong>is going to help customers find the right product specific technical documentation, knowledge articles, and forums within the SaaS offering.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kBVLQ8xTUb9jCdcYB6jztA.png" /></figure><p>Chat helps customers get immediate answers, and has the added benefit of removing the necessity of a time-consuming phone call. Chat is great for answering simple questions. Enabling chat means you don’t need to wait a long time for a response to a simple question. Without chat, email support can get bogged down with answering simple email requests. Chat includes a chatbot solution as well as live chat with support agents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JFDgYPvsOVrgGxndC7F-MQ.png" /></figure><p>Create a case helps customers to create a ticket within you product. Sometimes a problem is just too complex to solve over chat or a customer leaves the chat abruptly. Instead of just abandoning the conversation, it’s easy to transfer the dialogue to a ticket and continue to work on resolving the issue within a support ticket. It’s a nice way to keep customers happy by not forgetting about their issue and reassures them that their needs are important.</p><h4>Goal and expected outcome</h4><p>IBMs goals for IAX and the expected outcome of this initiative are …</p><ol><li>A <strong>unified user experience</strong> for support features throughout all IBMs SaaS offerings with a <strong>seamless look &amp; feel.</strong></li><li><strong>Consolidation</strong> of existing in-app support experience implementations and the expected consolidation of infrastructure, tooling and isolated development efforts</li><li><strong>Linkage</strong> of in-app support capabilities into IBMs new <strong>strategic support platform</strong> for service management (powered by IBM Watson &amp; Salesforce Service Cloud)</li></ol><h4>High-level architecture</h4><p>IAX is a set of libraries that connect with a variety of business services and can be plugged-in together. IAX libraries are hosted on a Content-Delivery-Network (CDN) on IBM Cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IkUfS3GRVUIDea37yvpTfg.png" /><figcaption>High-Level Architecture of IAX</figcaption></figure><p>A user, authenticated with an IBM ID, receives the IAX libraries together with the web application, from the SaaS offering, in the browser. Usually the actual use of IAX features is contextual and depends on the SaaS offering itself. IAX can be used fully headless, utilizing UI capabilities. It has the unified look-and-feel of the surrounding product, however IAX out-of-the-box UI components can be used and styled directly. IAX provides a lot of flexibility because it injects a number of HTML directives, representing its components, which can be embedded and linked anywhere within the surrounding product.</p><p>The user can utilize the <strong>search</strong>, <strong>chat</strong> and <strong>case create</strong> features, which are handled by different backend services. Whilst <strong>search</strong> runs directly against <a href="http://watson4support.mybluemix.net/"><strong>IBMs Support Search with Watson</strong></a> services, <strong>case create</strong> uses IBMs Support Business Continuity Layer (to ensure IBM can properly handle your request when even Salesforce might be unavailable) and <strong>chat</strong> is handled directly on the Salesforce Service Cloud.</p><h3>Conclusion and Outlook</h3><p>IAX is expected to streamline IBMs activities to include support capabilities within SaaS offerings. Its primary goal is to provide a unified user experience for IBM’s SaaS clients in order to reach and interact with IBM Support.</p><p>The <strong>Search</strong> and <strong>Chat</strong> features (with a Bot and with a Support agent), as well as creating a <strong>Case,</strong> will help clients to receive substantially faster access to resources which become necessary to answer questions or to solve potential problems.</p><p>At IBM we are currently running multiple pilots in-house to evolve IAX for production use, and we plan to roll it out into SaaS once IAX becomes available to the general public.</p><p>We hope this provided a good overview of what IBM’s In-App-Experience will become.</p><p><em>If you liked this article, please clap for us or leave us a comment! :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6763c411cfe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTML5 Speech Recognition API]]></title>
            <link>https://codeburst.io/html5-speech-recognition-api-670846a50e92?source=rss-c0afc115ccbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/670846a50e92</guid>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[speech-control]]></category>
            <category><![CDATA[speech-recognition]]></category>
            <dc:creator><![CDATA[Kai Wedekind]]></dc:creator>
            <pubDate>Thu, 26 Jul 2018 19:50:14 GMT</pubDate>
            <atom:updated>2018-08-26T18:57:47.368Z</atom:updated>
            <content:encoded><![CDATA[<p>by <a href="https://medium.com/u/c0afc115ccbf">Kai Wedekind</a></p><blockquote>“I don’t see any reason why we would(n’t) use the Speech Recognition API,<br>we could use other API’s also, there are a lot of API’s out there.” — D.T.</blockquote><p>Did you have ever wonder, if it is possible to use and navigate a website with only voice commands? — No? — Is that possible? — Yes!</p><p>In year 2012 the W3C Community introduced the <a href="https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html">Web Speech API specification</a>. The goal was to enable speech recognition and -synthesis in modern browsers. It is July 2018, and the WebSpeech API is still a working draft and only available in Chrome and Firefox (Not supported by default, but can be enabled).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxmfAo2zJlxiu12wGybpVg.png" /><figcaption><a href="https://caniuse.com/#search=Speech">https://caniuse.com/#search=Speech</a></figcaption></figure><p>You can almost say that Chrome is the only browser that has implemented the W3C specification, using Google’s speech recognition engines.</p><p>As a web developer I was excited about the specification, as it opens up a whole new world of opportunities for web apps and new interaction features in existing apps. And since Google opened its own speech recognition engine to support that API, we are able to incorporate one of the best speech recognition technologies out there. At this point — the API is free in conjunction with Google, but there is no guarantee it will continue to be in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iYxrR4zaECeQ5AgSq3jy_A.png" /><figcaption>History of Speech Recognition</figcaption></figure><p>The HTML5 Speech Recognition API allows JavaScript to have access to a browser’s audio stream and to convert it to text. I’m going to show you how to use the web speech API so that you can invite your users to talk with your current or future web application.</p><h4>Basic usage</h4><p>The speech recognition interface lives on the browser’s window object as SpeechRecognition in Firefox and as webkitSpeechRecognition in Chrome.</p><p>Start by setting the recognition interface to SpeechRecognition (regardless of the browser) using:</p><pre>window.<strong>SpeechRecognition</strong> = window.<strong>webkitSpeechRecognition</strong> || window.<strong>SpeechRecognition</strong>;</pre><p>After that, make sure that the speech recognition API is supported by your browser.</p><pre>if (&#39;SpeechRecognition&#39; in window) {<br>  // speech recognition API supported<br>} else {<br>  // speech recognition API <strong>not</strong> supported<br>}</pre><p>The next step is to create a new speech recognition object.</p><pre>const recognition = new window.<strong>SpeechRecognition</strong>();</pre><p>This recognition object has many properties, methods and event handlers.</p><h4>Properties:</h4><ul><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/grammars">recognition.grammars</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/lang">recognition.lang</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/continuous">recognition.continuous</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/interimResults">recognition.interimResults</a> (default: false)</li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/maxAlternatives">recognition.maxAlternatives</a> (default: 1)</li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/serviceURI">recognition.serviceURI</a></li></ul><h4>Methods:</h4><ul><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/abort">recognition.abort()</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/start">recognition.start()</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/stop">recognition.stop()</a></li></ul><h4>Event handlers:</h4><ul><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onaudiostart">recognition.onaudiostart</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onaudioend">recognition.onaudioend</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onend">recognition.onend</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onerror">recognition.onerror</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onnomatch">recognition.onnomatch</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onresult">recognition.onresult</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onsoundstart">recognition.onsoundstart</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onsoundend">recognition.onsoundend</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onspeechstart">recognition.onspeechstart</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onspeechend">recognition.onspeechend</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/onstart">recognition.onstart</a></li></ul><p>With that in mind, we can create our first speech recognition example:</p><pre>const recognition = new window.<strong>SpeechRecognition</strong>();</pre><pre>recognition.onresult = (event) =&gt; {<br>  const speechToText = event.results[0][0].transcript;<br>}</pre><pre>recognition.start();</pre><p>This will ask the user to allow the page to have access to the microphone. If you allow access you can start talking and when you stop, the onresult event handle will be fired, making the results of the speech capture available as a JavaScript object.</p><p>The onresult event handler returns a SpeechRecognitionEvent with a property results which is a two-dimensional array. I took the first object of this matrix which contains the transcript property. This property holds the recognized speech in text format. If you haven’t set the properties <a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/interimResults">interimResults</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/maxAlternatives">maxAlternatives</a> then you will get only one result with only one alternative back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*HSIne5PM6Pwnnpa7A9wxyQ.png" /></figure><p>The first dimension are the interim results, so when the recognizer is recognizing the speech while you are speaking, it captures the partial parts of that recognition.</p><h4>Streaming results</h4><p>You have two choices for capturing results; you can either wait until the user has stopped talking or have results pushed to you when they are ready. If you set the recognition.interimResults = true, then your event handler is going to give you a stream of results back, until you stop talking.</p><p>This means you can start to render results before the user has stopped talking. With the same sentence like above “Welcome to Frontend developer meetup” I got the following interim results back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C68ueKjBiyyYtbtepTYZWA.png" /><figcaption>Interim Results</figcaption></figure><p>The last streamed interim result has an isFinal = true flag, that indicated that the text recognition has finished.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*Refp3fYnrq1-9um7IwdyGw.png" /></figure><p>The other flag is maxAlternatives (default: 1), which gives you the number of alternatives of the speech recognition back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OHCEUlsx15Oip9VtB40OAg.png" /></figure><p>Each speech recognition result and alternative has a confidence value which tells you how confident the recognition was. In my experience, the first alternative always had the highest confidence.</p><p>If you’ve tried the examples above, you probably noticed that when you stopped speaking, the recognition engine stopped recognizing. That’s because there is a flag, recognition.continuous which is set to false by default. If you set recognition.continuous = true , the recognition engine will treat every part of your speech as an interim result.</p><p>Because of this, I changed the onresult event handler so that it read the elements of the results array each time I said something. As a result the onresult event handler will be called every time I finished a sentence.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce83c60156b9982c75dc2551802e9699/href">https://medium.com/media/ce83c60156b9982c75dc2551802e9699/href</a></iframe><h4>Handling accents and languages</h4><p>If your users are speaking a language other than English, you can improve their results by specifying a language parameter withrecognition.lang. To recognize German you’d use recognition.lang = &quot;de-DE&quot; or for a British accent recognize.lang = &quot;en-GB&quot;. The default language isen-US.</p><h4>Accessibility</h4><p>What if you want to add voice commands to your website? Sometimes it is just easier to say what you want to do. Speech recognition therefore can help you with searching the web, dictating emails, controlling the navigation through your app. Many people with physical disabilities who cannot use the keyboard or mouse rely on speech recognition to use the computer. To make that possible, websites and applications need to be properly developed to do that. Content must be properly designed and coded so that it can be controlled by voice. Labels and identifiers for controls in code need to match their visual presentation, so that it is clear which voice command activates a control. Speech recognition can additionally help lots of people with temporary limitations too, such as an injured arm.</p><p>Speech recognition can be used to fill out form fields, as well as to navigate to and activate links, buttons, and other controls. Most computers and mobile devices nowadays have built-in speech recognition functionality. Some speech recognition tools allow complete control over computer interaction, allowing users to scroll the screen, copy and paste text, activate menus, and perform other functions.</p><p>It is not an easy task, but not impossible. You have to manage all callbacks, starting, and stopping of the speech recognition, and the handling of errors in the event that something goes wrong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8KOdOzGMsuJzsyROZRu5AA.png" /><figcaption>Speech to Action Workflow</figcaption></figure><p>To handle all speech commands and actions, I’ve decided to write a library with the name <strong>AnyControl</strong>. AnyControl is a small JavaScript SpeechRecognition library that lets you control your site with voice commands. It is built on top of Webkit Speech API.</p><p>AnyControl has no dependencies, just 3 KB small, and is free to use and modify.</p><ul><li><a href="https://www.npmjs.com/package/anycontrol">anycontrol</a></li><li><a href="https://github.com/KaiWedekind/anycontrol">KaiWedekind/anycontrol</a></li></ul><h4>Security</h4><p>If your are using the Speech Recognition API, it is most likely that your browser is going to ask you for permission to use your microphone. With pages hosted on https you are only asked once; you don’t have to repeatedly give access. When you use the http protocol the browser is going to ask you every single time it wants to make an audio capture.</p><p>This seems like a security vulnerability in the sense that an application can record audio on an https hosted page once a user has authorized it. The Chrome API interacts with Google’s Speech Recognition API, so all of the data is going to Google and whoever else might be listening.</p><p>In context of JavaScript the entire page has access to the output of the audio capture, so if your page is compromised the data from the instance could be read.</p><h4>Conclusion</h4><p>The Speech Recognition API is very useful for data entry, website navigation and commands. It is interesting to see that it is possible to capture a conversation to have something like an instant transcript. There are definitely some security concerns with this API where a HTTPS Web Application could start listening at any time after you have approved access. Therefore, if you use the speech recognition API, use it with caution.</p><p>If you would like to see more, check out my website <a href="http://www.kaiwedekind.com/"><em>www.kaiwedekind.com</em></a></p><p><a href="https://www.kaiwedekind.com/">Kai Wedekind</a></p><h4>References</h4><ul><li><a href="https://www.google.com/intl/en/chrome/demos/speech.html">Chrome Browser</a></li><li><a href="https://developers.google.com/web/updates/2013/01/Voice-Driven-Web-Apps-Introduction-to-the-Web-Speech-API">Voice Driven Web Apps: Introduction to the Web Speech API | Web | Google Developers</a></li><li><a href="https://www.w3.org/WAI/perspective-videos/voice/">Voice Recognition</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis">SpeechSynthesis - Web APIs | MDN</a></li><li><a href="https://caniuse.com/#search=speech">Can I use... Support tables for HTML5, CSS3, etc</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition">SpeechRecognition - Web APIs | MDN</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API">Web Speech API - Web APIs | MDN</a></li><li><a href="https://www.w3.org/WAI/perspective-videos/">Web Accessibility Perspectives Videos: Explore the Impact and Benefits for Everyone</a></li><li><a href="http://blogs.sitepointstatic.com/examples/tech/speech-input/index.html">webkit speech test</a></li><li><a href="https://dvcs.w3.org/hg/speech-api/raw-file/9a0075d25326/speechapi.html">Web Speech API Specification</a></li></ul><figure><a href="http://bit.ly/codeburst"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i3hPOj27LTt0ZPn5TQuhZg.png" /></a></figure><blockquote>✉️ <em>Subscribe to </em>CodeBurst’s<em> once-weekly </em><a href="http://bit.ly/codeburst-email"><strong><em>Email Blast</em></strong></a><strong><em>, </em></strong>🐦 <em>Follow </em>CodeBurst<em> on </em><a href="http://bit.ly/codeburst-twitter"><strong><em>Twitter</em></strong></a><em>, view </em>🗺️ <a href="http://bit.ly/2018-web-dev-roadmap"><strong><em>The 2018 Web Developer Roadmap</em></strong></a><em>, and </em>🕸️ <a href="http://bit.ly/learn-web-dev-codeburst"><strong><em>Learn Full Stack Web Development</em></strong></a><em>.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=670846a50e92" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/html5-speech-recognition-api-670846a50e92">HTML5 Speech Recognition API</a> was originally published in <a href="https://codeburst.io/">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Fetching with Apollo Client 2.0]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kai_wedekind/data-fetching-with-apollo-client-2-0-d52a30eee63c?source=rss-c0afc115ccbf------2"><img src="https://cdn-images-1.medium.com/max/600/1*FCmu-JFywTa-7vyb4lsNCA.png" width="600"></a></p><p class="medium-feed-snippet">by Kai Wedekind</p><p class="medium-feed-link"><a href="https://medium.com/@kai_wedekind/data-fetching-with-apollo-client-2-0-d52a30eee63c?source=rss-c0afc115ccbf------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kai_wedekind/data-fetching-with-apollo-client-2-0-d52a30eee63c?source=rss-c0afc115ccbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/d52a30eee63c</guid>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[apollo-client]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[vue-apollo]]></category>
            <dc:creator><![CDATA[Kai Wedekind]]></dc:creator>
            <pubDate>Sun, 19 Nov 2017 19:49:30 GMT</pubDate>
            <atom:updated>2017-11-19T20:10:57.009Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[REST in Peace. Long Live GraphQL]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@kai_wedekind/rest-in-peace-long-live-graphql-f53e269c466d?source=rss-c0afc115ccbf------2"><img src="https://cdn-images-1.medium.com/max/600/1*aPmzJgCQWghRK62mzZQcpQ.png" width="600"></a></p><p class="medium-feed-snippet">by Kai Wedekind</p><p class="medium-feed-link"><a href="https://medium.com/@kai_wedekind/rest-in-peace-long-live-graphql-f53e269c466d?source=rss-c0afc115ccbf------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@kai_wedekind/rest-in-peace-long-live-graphql-f53e269c466d?source=rss-c0afc115ccbf------2</link>
            <guid isPermaLink="false">https://medium.com/p/f53e269c466d</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[restful]]></category>
            <category><![CDATA[apollo-client]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Kai Wedekind]]></dc:creator>
            <pubDate>Sat, 18 Nov 2017 21:41:50 GMT</pubDate>
            <atom:updated>2017-11-18T22:03:51.564Z</atom:updated>
        </item>
    </channel>
</rss>