Skip to content

Instantly share code, notes, and snippets.

View lemnis's full-sized avatar

Lisa Martens lemnis

  • Spain
View GitHub Profile
@lemnis
lemnis / getComputedRole.js
Created November 24, 2017 15:45
Calculates which role should used by a screen reader following the HTML ARIA spec
/**
* Follows https://www.w3.org/TR/2017/WD-html-aria-20171013/#docconformance
*/
/**
* All aria roles
* @type {Array}
*/
var roles = [
"alert", "alertdialog", "application", "article", "banner", "button", "cell",
@lemnis
lemnis / dabblet.css
Created February 4, 2018 16:47
Untitled
.btn {
background: firebrick;
margin: 10vh;
color: white;
padding: 1em;
border: none;
-webkit-transition: .3s all;
transition: .3s all;
}
.btn:hover {
@lemnis
lemnis / bashing.md
Created April 19, 2018 10:08
Bashing on the web

input[type='number'] doesn't support the pattern property, even though iOS uses it.

You should use <input type="number" pattern="[0-9]*">.

What it does

  • Show a numeric keyboard for iOS
  • Remove the ability to enter decimal numbers within iOS

What it doesn't do