This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, document){ | |
'use strict'; | |
var slice = [].slice; | |
var removeClass = function(elem){ | |
elem.classList.remove('focus-within'); | |
}; | |
var update = (function(){ | |
var running, last; | |
var action = function(){ | |
var element = document.activeElement; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code goes here | |
function createRenderElement(parentElement, name, attrs) { | |
var el = document.createElement(name); | |
// insertion in DOM before applying attributes doesn't work in Firefox | |
//parentElement.appendChild(el); | |
for (var i = 0; i < attrs.length; i += 2) { | |
el.setAttribute(attrs[i], attrs[i + 1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// directional-scss | |
$dir: ltr !default; | |
// Default $dir if not valid | |
@if $dir != ltr and $dir != rtl { | |
$dir: ltr; | |
} | |
@function if-ltr($if, $else: null) { | |
@if $dir != rtl { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Accessibility Solutions - Focus - Roving Focus</title> | |
<link rel="stylesheet" href="presentation.css" /> | |
<link rel="stylesheet" href="roving-focus.css" /> | |
</head> |