<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ryan</title>
    <description>The latest articles on DEV Community by Ryan (@ryan).</description>
    <link>https://dev.to/ryan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F61196%2Fccea8cb2-3f5d-4ea0-8cb6-c5480b049cb5.png</url>
      <title>DEV Community: Ryan</title>
      <link>https://dev.to/ryan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ryan"/>
    <language>en</language>
    <item>
      <title>Making your :focus style fit in with one line of CSS</title>
      <dc:creator>Ryan</dc:creator>
      <pubDate>Fri, 29 Apr 2022 05:54:10 +0000</pubDate>
      <link>https://dev.to/ryan/making-your-focus-style-fit-in-with-one-line-of-css-ko0</link>
      <guid>https://dev.to/ryan/making-your-focus-style-fit-in-with-one-line-of-css-ko0</guid>
      <description>&lt;p&gt;I read a post the other day about bad devs &lt;a href="https://dev.to/colabottles/stop-removing-focus-2o7b"&gt;removing focus styles&lt;/a&gt;, which really harms accessibility.&lt;/p&gt;

&lt;p&gt;The usual reason for doing so is that the browser native focus style is ugly and clashes with the site theme. And fair gripe, it is ugly. &lt;/p&gt;

&lt;p&gt;So here's the simple fix, which is just as easy as removing the style:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:focus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;outline-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="c"&gt;/* your foreground text colour */&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we're just defining outline &lt;em&gt;color&lt;/em&gt;, this won't add an outline to things that don't already have one. If you have a more descriptive rule for specific elements, they'll simply override this 0-specificity rule.&lt;/p&gt;

&lt;p&gt;Please make sure the colour you use has high enough contrast to be noticeable -- although if the colour you're using for text doesn't, your site has another problem 😀&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>css</category>
    </item>
    <item>
      <title>Do validate your HTML</title>
      <dc:creator>Ryan</dc:creator>
      <pubDate>Sun, 24 Apr 2022 05:04:35 +0000</pubDate>
      <link>https://dev.to/ryan/do-validate-your-html-4iga</link>
      <guid>https://dev.to/ryan/do-validate-your-html-4iga</guid>
      <description>&lt;p&gt;I'd been pulling my hair out trying to get a perfect score in Chrome's Lighthouse audit. I had only a few tiny icons, not many deeply nested elements, no blocking javascript, I had used preload tags to avoid request chains, and the page sure seemed fast to me. There was no reason I should be capped at 95 for performance. But the audit would always tell me 900ms was being spent on "Unattributable." Gee, very helpful!&lt;/p&gt;

&lt;p&gt;A post I happened to read here on DEV linked the &lt;a href="https://validator.w3.org/"&gt;W3 Validator&lt;/a&gt; so I thought what the heck, let's see if anything is wrong, and ran my site through it. Sure enough I had a few mismatched tags. And wouldn't you know it, fixing that made the problem go away and showed me those beautiful fireworks.&lt;/p&gt;

&lt;p&gt;Most browsers will silently fix mismatched tags, so you won't notice any errors on the site or console and it will even be corrected in the source code. But I suppose this makes the renderer waste some time re-parsing the DOM -- not enough for me to notice on my notebook, but substantial on Lighthouse's simulated slow device.&lt;/p&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>performance</category>
    </item>
    <item>
      <title>How do you use Night Mode?</title>
      <dc:creator>Ryan</dc:creator>
      <pubDate>Wed, 09 Jan 2019 05:00:21 +0000</pubDate>
      <link>https://dev.to/ryan/how-do-you-use-night-mode-31bo</link>
      <guid>https://dev.to/ryan/how-do-you-use-night-mode-31bo</guid>
      <description>&lt;p&gt;&lt;em&gt;Cover: &lt;a href="https://unsplash.com/photos/kjEev5pYu5E"&gt;Patrick Brinksma&lt;/a&gt; on Unsplash&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I notice that some sites and apps have night mode as an immediately accessible toggle, some have it on the first level of a popout menu, and others still have it buried a few menus deep in the settings.&lt;/p&gt;

&lt;p&gt;Do you find yourself often switching to and from night mode? Do you set it once and use it all the time, day and night? Or do you ignore it?&lt;/p&gt;

&lt;p&gt;Personally, I tend to prefer the darker scheme so if there's a night mode I'll leave it on all the time.&lt;/p&gt;

</description>
      <category>ux</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Two conundrums with implementing social login</title>
      <dc:creator>Ryan</dc:creator>
      <pubDate>Mon, 07 Jan 2019 03:32:18 +0000</pubDate>
      <link>https://dev.to/ryan/two-conundrums-with-implementing-social-login-5nl</link>
      <guid>https://dev.to/ryan/two-conundrums-with-implementing-social-login-5nl</guid>
      <description>&lt;p&gt;Implementing social login is simple enough at first but there are a bunch of weird cases to think about with a lot of different potential ways to handle them.&lt;/p&gt;

&lt;p&gt;For example, I am developing a web app where users can register with an email address, or certain social accounts. Users should be able to freely link or unlink any social accounts, right? I'm struggling to think of a way to handle a couple of cases without being too complicated for the user.&lt;/p&gt;

&lt;h1&gt;
  
  
  Example 1
&lt;/h1&gt;

&lt;p&gt;Suppose a user registered with an email address, and now they want to link their Facebook account. However that Facebook account is already used on another account (most likely the same user clicked login with Facebook once and created a new account without meaning to.)&lt;/p&gt;

&lt;p&gt;Would you prompt the user in this case to merge their accounts? (tricky to implement and destructive -- maybe they could merge the wrong account and you can't fix the mistake) Or would you tell the user "you must log on to the other account and unlink it first"? (difficult/time-consuming for the user)&lt;/p&gt;

&lt;h1&gt;
  
  
  Example 2
&lt;/h1&gt;

&lt;p&gt;A user first registered with a social account, but now wants to unlink that account. There must be a way to verify the user's identity, so they'll need to provide an email address. It seems wrong to require the user to give up personal information in order to delete other information. But the only alternative I can see is giving the option to delete their account entirely which also seems hostile (you want to remove Facebook? Give me your email or kiss your account goodbye 😨) Or I could prompt them to set a username only to log on with, but that could be confusing too and they risk locking themselves out of their account with no way to recover it. They will need to provide a valid email for verification anyway so it seems like a pointless extra step.&lt;/p&gt;

&lt;p&gt;Seems like there are no good answers! Social login is supposed to make things easier, isn't it? What to do?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
    </item>
    <item>
      <title>I reported a security vulnerability. Now what?</title>
      <dc:creator>Ryan</dc:creator>
      <pubDate>Wed, 03 Oct 2018 01:30:49 +0000</pubDate>
      <link>https://dev.to/ryan/i-reported-a-security-vulnerability-now-what-56bm</link>
      <guid>https://dev.to/ryan/i-reported-a-security-vulnerability-now-what-56bm</guid>
      <description>&lt;p&gt;I recently discovered a vulnerability for the first time. I found the product's security contact and sent some information. Ideally they will respond acknowledging the issue and provide a timeline for a patch.&lt;/p&gt;

&lt;p&gt;What if that doesn't happen? How long is appropriate to wait before following up? When do you promise public disclosure? What if they disagree that it is a vulnerability?&lt;/p&gt;

&lt;p&gt;Is there a guide for reporting vulnerabilities somewhere? I thought I'd be able to find one but I wasn't able to. A resource like that would be handy.&lt;/p&gt;

</description>
      <category>security</category>
    </item>
    <item>
      <title>I don't like exit intent popups.</title>
      <dc:creator>Ryan</dc:creator>
      <pubDate>Fri, 27 Jul 2018 16:43:02 +0000</pubDate>
      <link>https://dev.to/ryan/i-dont-like-exit-intent-popups-3gmc</link>
      <guid>https://dev.to/ryan/i-dont-like-exit-intent-popups-3gmc</guid>
      <description>&lt;p&gt;&lt;em&gt;Cover illustration adapted from wired.com&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You know the thing. Your cursor leaves the window, and suddenly a pop up appears with... something or other, honestly I don't read them. The idea is that if the user is about to leave your site, you should do something to try and retain them -- after all, the worst case is they leave anyway, right? But I always trigger these accidentally. Perhaps a site is too slow to load, so I open another tab while I wait (Shame if your site takes more than two seconds, by the way.) Or perhaps I'm just careless, or I have a nervous habit of moving my cursor. Whatever the case, there are lots of reasons my cursor might leave the window before I'm ready to leave. And now, the content I was waiting for has a giant box blocking it. I'm likely to abandon the site at this moment.&lt;/p&gt;

&lt;p&gt;But I wonder if I am the only one. A cursory search on this subject shows a few sites promoting exit intent because they are selling some code that will do it for you (of course), but also a few sites that cite some data showing an increase in conversions. There is surprisingly little hate for something that seems so annoying.&lt;/p&gt;

&lt;p&gt;So I'm left with a couple of questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is this &lt;em&gt;really&lt;/em&gt; a positive feature? And if so&lt;/li&gt;
&lt;li&gt;Is it ethical or wise to implement a feature that you personally find annoying, if data proves it's beneficial?&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>discuss</category>
      <category>ux</category>
    </item>
  </channel>
</rss>
