{"id":7327,"date":"2021-07-06T15:02:00","date_gmt":"2021-07-06T13:02:00","guid":{"rendered":"https:\/\/pagepro.co\/blog\/?p=7327"},"modified":"2024-10-14T16:42:53","modified_gmt":"2024-10-14T14:42:53","slug":"how-to-use-focus-indicator-and-focus-styles","status":"publish","type":"post","link":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/","title":{"rendered":"How To Use Focus Indicator and Focus Styles"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"introduction\">Introduction<\/h2>\n\n\n\n<p>Do you want your website to be easily accessible and to be used by all people, regardless of the device they are connecting from? Or maybe you are annoyed by this blue ring next to links, buttons? In this case, you will need the pseudo-class <strong>:focus<\/strong> and other similar classes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-a-focus-indicator\">What is a focus indicator?<\/h2>\n\n\n\n<p>Focus indicators are blue outlines that sometimes show up around buttons (when you click the TAB key by accident) or inputs when you\u2019re filling out a form. Focus indicators can receive focus in two ways &#8211; when users use the tab key or click into a focusable element. The: focus pseudo-class is used every time an element is active, regardless of the input device (mouse, keyboard, stylus, etc.). Let&#8217;s take a look at it from the technical side.<\/p>\n\n\n\n<p>The elements on which focus works by default are:<\/p>\n\n\n\n<ul>\n<li>buttons (&lt;button&gt;)<\/li>\n\n\n\n<li>links (&lt;a&gt;)<\/li>\n\n\n\n<li>form elements (&lt;input&gt;, &lt;textarea&gt;)<\/li>\n<\/ul>\n\n\n\n<p>And additionally, each element can be given the tab-index property, which will make this element focusable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-tab-index\">What is tab-index?<\/h2>\n\n\n\n<p>The &#8216;tabindex&#8217; attribute indicates that an element can be focused on, and determines how that focus is handled. It takes an integer as a value, and the resulting keyboard interaction differs depending on whether the integer is positive, negative, or 0.<\/p>\n\n\n\n<ul>\n<li>When &#8216;tabindex&#8217; is set to 0, the element is inserted into the tab order based on its location in the source code.<\/li>\n\n\n\n<li>When &#8216;tabindex&#8217; is set to -1, it becomes active but is not included in the tab order. In other words, it cannot be reached by someone using the Tab key to navigate through the content.<\/li>\n\n\n\n<li>A &#8216;tabindex&#8217; of 1 means that it will be the first item to be selected on the page. It doesn\u2019t matter how many focusable elements appear in the source order\/visual presentation before it.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-code-mind-cta c-cta-block\" style=\"background-color:;color:\"><div class=\"c-cta-block__content\"><p class=\"c-cta-block__title\">READY TP START YOUR NEW PROJECT? <\/p><div class=\"c-cta-block__action\"><a href=\"https:\/\/pagepro.co\/consultation.html\" class=\"c-cta-block__button ga-cta ga-cta-consultation theme-bg-3\">SCHEDULE A FREE CALL WITH OUR EXPERT. <\/a><\/div><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"should-we-change-default-styles-of-focus-indicator\">Should we change default styles of focus indicator?<\/h2>\n\n\n\n<p>The default focus indicator is ok in most cases, but when we want our website to look better, we can style the focus elements ourselves. The main things we should change when styling focus are:<\/p>\n\n\n\n<ul>\n<li>adding an outline<\/li>\n\n\n\n<li>creating an animation\/transition<\/li>\n\n\n\n<li>changing the background color<\/li>\n\n\n\n<li>changing text color &#8211; but in this case, it\u2019s best if the focus didn\u2019t change only the font color, but for example, also add an outline or underline to the texts<\/li>\n<\/ul>\n\n\n\n<p>The most important thing in styling focus is that it should be clearly visible and it should have high contrast to the page.<\/p>\n\n\n\n<div class=\"c-newsletter-block-acf\">\n    <p class=\"c-newsletter-block-acf__title c-newsletter__header\">\n        EXPERT INSIGHTS, FRICTIONLESSLY DELIVERED!     <\/p>\n    <p class=\"c-newsletter-block-acf__desc c-newsletter__header\">\n        Curated tech news delivered straight to your inbox every month.\r\n    <\/p>\n    <form method=\"post\" class=\"c-newsletter-block-acf__form js-newsletter-form c-newsletter__action\" name=\"newsletter-block-form\">\n        <input name=\"newsletter-email\" id=\"newsletter-email\" type=\"text\" class=\"c-newsletter-block-acf__input js-newsletter-input\" placeholder=\"Company Email\" \/>\n        <input name=\"newsletter-campaign\" id=\"newsletter-campaign\" type=\"hidden\" value=\"\" \/>\n        <div class=\"c-newsletter-block-acf__group\">\n            <input name=\"consent\" id=\"consent\" type=\"checkbox\" class=\"js-newsletter-consent\" \/>\n            <label class=\"c-newsletter-block-acf__label\" for=\"consent\">I accept the <a href=\"https:\/\/pagepro.co\/privacy-policy\">Privacy Policy<\/a> and agree to process my personal data by Pagepro for marketing purposes.<\/label>\n        <\/div>\n        <input type=\"submit\" class=\"c-newsletter-block-acf__button button js-newsletter-sub ga-newsletter-form-content\" value=\"Sign up\" \/>\n        <p class=\"theme-size-1 js-message-valid is-hidden is-invalid\"><\/p>\n    <\/form>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"selectors-that-will-make-our-focus-look-better\">Selectors that will make our focus look better<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"focus\"><span class=\"underline-accent\">:focus<\/span><\/h3>\n\n\n\n<p>The basic selector is of course <em>:focus<\/em>, which behaves like any other pseudo-class, so we can add most CSSes using it &#8211; although as I mentioned earlier, it&#8217;s better not to go crazy with it.<\/p>\n\n\n\n<pre class=\"wp-block-code-mind-code c-code\"><code class=\"css, scss\">a:focus { \noutline: 3px solid red; \n}<\/code><\/pre>\n\n\n\n<p>Remove outlines for mouse users only, if you truly must do so but it&#8217;s highly recommended not to because it prevents people using other devices from navigating the site.<\/p>\n\n\n\n<p><strong>Tip<\/strong>: When using external files like <a href=\"http:\/\/meyerweb.com\/eric\/tools\/css\/reset\/index.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">CSS Reset<\/a> to reset styles, we have to be careful because some of them are deleting an outline from focus.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"focus-within\"><span class=\"underline-accent\">:focus-within<\/span><\/h3>\n\n\n\n<p>Another selector is <em>:focus-within<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-code-mind-code c-code\"><code class=\"css, scss\">form:focus-within {\nbox-shadow: 0px 5px 5px #c4c4c4;\ntransform: scale(1.03); \n}<\/code><\/pre>\n\n\n\n<p>It adds styles to the parent when one of his children receives the focus, what is kind of unusual because it\u2019s not common in <a href=\"https:\/\/pagepro.co\/blog\/css-grid-layout-a-powerful-tool-for-designing-ui\/\" target=\"_blank\" rel=\"noreferrer noopener\">CSS<\/a> to be able to select a parent element based on the existence or state of child elements. It\u2019s pretty useful while styling forms.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-codepen wp-block-embed-codepen\"><div class=\"wp-block-embed__wrapper\">\n<iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" title=\"focus-within\" src=\"https:\/\/codepen.io\/czarekd\/embed\/preview\/yLMEKdp?default-tabs=css%2Cresult&#038;height=300&#038;host=https%3A%2F%2Fcodepen.io&#038;slug-hash=yLMEKdp#?secret=wgWePyePBd\" data-secret=\"wgWePyePBd\" scrolling=\"no\" frameborder=\"0\" height=\"300\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"198\" src=\"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-1024x198.png\" alt=\"focus indicator focus-within browser support\" class=\"wp-image-7330\" srcset=\"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-1024x198.png 1024w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-300x58.png 300w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-768x149.png 768w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-500x97.png 500w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-324x63.png 324w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers.png 1353w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>As you can see most browsers support focus-within, except IE, but we can use polyfill to fix it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"focus-visible\"><span class=\"underline-accent\">:focus-visible<\/span><\/h3>\n\n\n\n<p>Another selector that gives us new possibilities is<em> :focus-visible. <\/em>This selector fires when the browser determines that a focus event occurred through an input other than a mouse cursor or a finger tap.<\/p>\n\n\n\n<pre class=\"wp-block-code-mind-code c-code\"><code class=\"css, scss\">a:focus-visible { \nbackground-color: red; \n}<\/code><\/pre>\n\n\n\n<p>Here is a table that shows in what situations this selector is used:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td>Situation<\/td><td>Will :focus-visible fire?<\/td><\/tr><tr><td>User uses the keyboard to operate the page<\/td><td>Yes<\/td><\/tr><tr><td>An element needs a keyboard to function (like &lt;inputs&gt;)<\/td><td>Yes<\/td><\/tr><tr><td>User always wants to see focus via the settings<\/td><td>Yes<\/td><\/tr><tr><td>User navigates using the mouse or a finger on the screen<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-codepen wp-block-embed-codepen\"><div class=\"wp-block-embed__wrapper\">\n<iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" title=\":focus-visible\" src=\"https:\/\/codepen.io\/czarekd\/embed\/preview\/MWpPKWJ?default-tabs=css%2Cresult&#038;height=300&#038;host=https%3A%2F%2Fcodepen.io&#038;slug-hash=MWpPKWJ#?secret=jdFQqXJKju\" data-secret=\"jdFQqXJKju\" scrolling=\"no\" frameborder=\"0\" height=\"300\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" width=\"512\" height=\"101\" src=\"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers2.png\" alt=\"focus indicator focus-visible browser support\" class=\"wp-image-7331\" style=\"width:835px;height:165px\" srcset=\"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers2.png 512w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers2-300x59.png 300w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers2-500x99.png 500w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers2-324x64.png 324w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/figure>\n\n\n\n<p>Focus-visible is supported on almost all browsers except Internet Explorer and like in focus-within, we can use a polyfill to use it on older browsers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"outline-offset\"><span class=\"underline-accent\">outline-offset<\/span><\/h3>\n\n\n\n<p>The last thing I want to present is outline-offset. It is not a selector but a property that moves the outline away from the edge of the element&#8217;s border by a certain amount and in combination with the transition, it gives us further styling options. Outline-offset takes the value of length, and it can be:<\/p>\n\n\n\n<ul>\n<li>by default 0<\/li>\n\n\n\n<li>any valid length with a unit (including negative values)<\/li>\n<\/ul>\n\n\n\n<p>Note that outline-offset does not accept percentage values.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-codepen wp-block-embed-codepen\"><div class=\"wp-block-embed__wrapper\">\n<iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" title=\"outline-offset\" src=\"https:\/\/codepen.io\/czarekd\/embed\/preview\/xxqyZYa?default-tabs=css%2Cresult&#038;height=300&#038;host=https%3A%2F%2Fcodepen.io&#038;slug-hash=xxqyZYa#?secret=GTfU4pnu2b\" data-secret=\"GTfU4pnu2b\" scrolling=\"no\" frameborder=\"0\" height=\"300\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"167\" src=\"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-3-1024x167.png\" alt=\"focus indicator outline-offset browser support\" class=\"wp-image-7333\" srcset=\"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-3-1024x167.png 1024w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-3-300x49.png 300w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-3-768x125.png 768w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-3-500x82.png 500w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-3-324x53.png 324w, https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/browsers-3.png 1360w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In this case it is similar to the one mentioned above, but the outline offset does not have polyfill yet.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"conclusion\"><span class=\"underline-accent\">Conclusion<\/span><\/h3>\n\n\n\n<p>Focus is one of the most useful things to make our website easily accessible. It is worth remembering about it in order to enable the use of our website by as many people as possible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you want your website to be easily accessible and to be used by all people, regardless of the device they are connecting from? Or maybe you are annoyed by this blue ring next to links, buttons? In this case, you will need the pseudo-class :focus and other similar classes.<\/p>\n","protected":false},"author":13,"featured_media":7335,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[318],"tags":[59,23,69],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Use Focus Indicator and Focus Styles - Pagepro<\/title>\n<meta name=\"description\" content=\"Do you want your website to be accessible and used by anyone, regardless of the device? Learn how to use focus Indicator and focus Styles.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Use Focus Indicator and Focus Styles - Pagepro\" \/>\n<meta property=\"og:description\" content=\"Do you want your website to be accessible and used by anyone, regardless of the device? Learn how to use focus Indicator and focus Styles.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/\" \/>\n<meta property=\"og:site_name\" content=\"Pagepro\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/thisispagepro\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-06T13:02:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-14T14:42:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/Focus-indicator.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"682\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joanna Chmiel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joanna Chmiel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/\"},\"author\":{\"name\":\"Joanna Chmiel\",\"@id\":\"https:\/\/pagepro.co\/blog\/#\/schema\/person\/f5c17e95374689202f939d378ae505ba\"},\"headline\":\"How To Use Focus Indicator and Focus Styles\",\"datePublished\":\"2021-07-06T13:02:00+00:00\",\"dateModified\":\"2024-10-14T14:42:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/\"},\"wordCount\":880,\"publisher\":{\"@id\":\"https:\/\/pagepro.co\/blog\/#organization\"},\"keywords\":[\"best practices\",\"css\",\"tips\"],\"articleSection\":[\"Web Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/\",\"url\":\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/\",\"name\":\"How To Use Focus Indicator and Focus Styles - Pagepro\",\"isPartOf\":{\"@id\":\"https:\/\/pagepro.co\/blog\/#website\"},\"datePublished\":\"2021-07-06T13:02:00+00:00\",\"dateModified\":\"2024-10-14T14:42:53+00:00\",\"description\":\"Do you want your website to be accessible and used by anyone, regardless of the device? Learn how to use focus Indicator and focus Styles.\",\"breadcrumb\":{\"@id\":\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/pagepro.co\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Blog\",\"item\":\"https:\/\/pagepro.co\/blog\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How To Use Focus Indicator and Focus Styles\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/pagepro.co\/blog\/#website\",\"url\":\"https:\/\/pagepro.co\/blog\/\",\"name\":\"Pagepro\",\"description\":\"Frictionless Next.js, Expo &amp; Sanity Development Blog\",\"publisher\":{\"@id\":\"https:\/\/pagepro.co\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/pagepro.co\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/pagepro.co\/blog\/#organization\",\"name\":\"Pagepro\",\"url\":\"https:\/\/pagepro.co\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/pagepro.co\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2020\/08\/logo_pagepro-b66d228a1e-1.png\",\"contentUrl\":\"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2020\/08\/logo_pagepro-b66d228a1e-1.png\",\"width\":440,\"height\":200,\"caption\":\"Pagepro\"},\"image\":{\"@id\":\"https:\/\/pagepro.co\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/thisispagepro\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/pagepro.co\/blog\/#\/schema\/person\/f5c17e95374689202f939d378ae505ba\",\"name\":\"Joanna Chmiel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/pagepro.co\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/36f6118b3adb3b1dd7162ede2bfc9196?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/36f6118b3adb3b1dd7162ede2bfc9196?s=96&d=mm&r=g\",\"caption\":\"Joanna Chmiel\"},\"description\":\"Asia, a key member of the Pagepro team since 2017, shines as an expert in UI and Frontend development. Her role at Pagepro goes beyond mere coding; she brings life and functionality to user interfaces, ensuring that each project is not only visually appealing but also intuitively navigable and user-friendly.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/joanna-chmiel-319756164\/\"],\"url\":\"https:\/\/pagepro.co\/blog\/author\/joanna-dyszkiewicz\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Use Focus Indicator and Focus Styles - Pagepro","description":"Do you want your website to be accessible and used by anyone, regardless of the device? Learn how to use focus Indicator and focus Styles.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/","og_locale":"en_US","og_type":"article","og_title":"How To Use Focus Indicator and Focus Styles - Pagepro","og_description":"Do you want your website to be accessible and used by anyone, regardless of the device? Learn how to use focus Indicator and focus Styles.","og_url":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/","og_site_name":"Pagepro","article_publisher":"https:\/\/www.facebook.com\/thisispagepro","article_published_time":"2021-07-06T13:02:00+00:00","article_modified_time":"2024-10-14T14:42:53+00:00","og_image":[{"width":1200,"height":682,"url":"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2021\/06\/Focus-indicator.png","type":"image\/png"}],"author":"Joanna Chmiel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Joanna Chmiel","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/#article","isPartOf":{"@id":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/"},"author":{"name":"Joanna Chmiel","@id":"https:\/\/pagepro.co\/blog\/#\/schema\/person\/f5c17e95374689202f939d378ae505ba"},"headline":"How To Use Focus Indicator and Focus Styles","datePublished":"2021-07-06T13:02:00+00:00","dateModified":"2024-10-14T14:42:53+00:00","mainEntityOfPage":{"@id":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/"},"wordCount":880,"publisher":{"@id":"https:\/\/pagepro.co\/blog\/#organization"},"keywords":["best practices","css","tips"],"articleSection":["Web Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/","url":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/","name":"How To Use Focus Indicator and Focus Styles - Pagepro","isPartOf":{"@id":"https:\/\/pagepro.co\/blog\/#website"},"datePublished":"2021-07-06T13:02:00+00:00","dateModified":"2024-10-14T14:42:53+00:00","description":"Do you want your website to be accessible and used by anyone, regardless of the device? Learn how to use focus Indicator and focus Styles.","breadcrumb":{"@id":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pagepro.co\/blog\/how-to-use-focus-indicator-and-focus-styles\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pagepro.co\/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https:\/\/pagepro.co\/blog\/"},{"@type":"ListItem","position":3,"name":"How To Use Focus Indicator and Focus Styles"}]},{"@type":"WebSite","@id":"https:\/\/pagepro.co\/blog\/#website","url":"https:\/\/pagepro.co\/blog\/","name":"Pagepro","description":"Frictionless Next.js, Expo &amp; Sanity Development Blog","publisher":{"@id":"https:\/\/pagepro.co\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pagepro.co\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/pagepro.co\/blog\/#organization","name":"Pagepro","url":"https:\/\/pagepro.co\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pagepro.co\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2020\/08\/logo_pagepro-b66d228a1e-1.png","contentUrl":"https:\/\/pagepro.co\/blog\/wp-content\/uploads\/2020\/08\/logo_pagepro-b66d228a1e-1.png","width":440,"height":200,"caption":"Pagepro"},"image":{"@id":"https:\/\/pagepro.co\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/thisispagepro"]},{"@type":"Person","@id":"https:\/\/pagepro.co\/blog\/#\/schema\/person\/f5c17e95374689202f939d378ae505ba","name":"Joanna Chmiel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pagepro.co\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/36f6118b3adb3b1dd7162ede2bfc9196?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/36f6118b3adb3b1dd7162ede2bfc9196?s=96&d=mm&r=g","caption":"Joanna Chmiel"},"description":"Asia, a key member of the Pagepro team since 2017, shines as an expert in UI and Frontend development. Her role at Pagepro goes beyond mere coding; she brings life and functionality to user interfaces, ensuring that each project is not only visually appealing but also intuitively navigable and user-friendly.","sameAs":["https:\/\/www.linkedin.com\/in\/joanna-chmiel-319756164\/"],"url":"https:\/\/pagepro.co\/blog\/author\/joanna-dyszkiewicz\/"}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/posts\/7327"}],"collection":[{"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/comments?post=7327"}],"version-history":[{"count":11,"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/posts\/7327\/revisions"}],"predecessor-version":[{"id":18069,"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/posts\/7327\/revisions\/18069"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/media\/7335"}],"wp:attachment":[{"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/media?parent=7327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/categories?post=7327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pagepro.co\/blog\/wp-json\/wp\/v2\/tags?post=7327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}