Design Name | Accessible Name | Code Example | Reference Materials | Notes |
---|---|---|---|---|
Floating action button (fab) | Button | <button> |
don't give it a tabindex higher than zero | |
Slider | Input, Range | <input type='range'/> |
||
Switch | Checkbox | <input type="checkbox"> |
||
Breadcrumb | Link | <a href="some-step"> |
||
Stepper | there isn't one | focus on describing the experience and make the step contents semantic, maybe use anchor links | ||
Tabs | ARIA Tabpanel, Tablist, Tab | Tabs example | ||
Card | doesn't exist | focus on making its content semantic, and if it's a list of cards, make sure the list is semantic and parsable, or use article if it makes sense | ||
Accordion | doesn't exist | Accordion example | focus on making its content semantic and navigable |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://www.opengis.net/kml/2.2"> | |
<Document> | |
<name>Stories</name> | |
<NetworkLink> | |
<name>9ft in Common - Alleys</name> | |
<Link> | |
<href><![CDATA[https://www.google.com/maps/d/kml?mid=1cvS3_dA3XbGEn-W-6bBeNqs28foQ0VOV&lid=ELaBumgGKz4]]></href> | |
</Link> | |
</NetworkLink> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://www.opengis.net/kml/2.2"> | |
<Document> | |
<name>Stories</name> | |
<Style id="icon-1846-424242-normal"> | |
<IconStyle> | |
<color>ff424242</color> | |
<scale>1</scale> | |
<Icon> | |
<href>https://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png</href> |
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
enum Status { | |
none, | |
running, | |
stopped, | |
paused | |
} | |
void main() { | |
print(Status.values); | |
Status.values.forEach((value) => print('value: $value, index: ${value.index}')); |
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
if('serviceWorker' in navigator){ | |
navigator.serviceWorker | |
.register('./service-worker.js') | |
.then(function(){ | |
window.isUpdateAvailable = new Promise(function (resolve, reject) { | |
if ('serviceWorker' in navigator && ['localhost', '127'].indexOf(location.hostname) === -1) { | |
navigator.serviceWorker.register('service-worker.js').then(function (reg) { | |
reg.onupdatefound = function () { | |
var installingWorker = reg.installing; | |
installingWorker.onstatechange = function () { |
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
var gulp = require('gulp'); | |
var swPrecache = require('sw-precache'); | |
gulp.task('generate-service-worker', function(callback) { | |
var rootDir = 'app'; | |
swPrecache.write(`${rootDir}/service-worker.js`, { | |
staticFileGlobs: ['app/**/*.{js,html,css,png,jpg,gif,svg,eot,ttf,woff,woff2,mp3,json}'], | |
maximumFileSizeToCacheInBytes: ['52428800'] | |
}, callback); |
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
{ | |
"name":"Rhythm of the Stride", | |
"short_name":"R.O.A.S.", | |
"icons":[ | |
{ | |
"src":"images/icons/icon-512x512.png", | |
"sizes":"512x512", | |
"type":"image/png" | |
}, | |
{ |
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
var kb = require("ble_hid_keyboard"); | |
NRF.setServices(undefined, { hid : kb.report }); | |
var reset_timer; | |
var next = "n"; | |
var prev = "p"; | |
function sendPrev(){ | |
sendCharPrev(); | |
LED2.set(); |
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
var kb = require("ble_hid_keyboard"); | |
NRF.setServices(undefined, { hid : kb.report }); | |
var next = "n"; | |
var prev = "p"; | |
function sendPrev(){ | |
sendCharPrev(); | |
LED2.set(); | |
setTimeout("LED2.reset()",1000); | |
} |
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
new Promise(function(resolve, reject) { | |
setTimeout(function() { | |
var firstVal = 1; | |
// in the promise what you resolve is what gets returned | |
resolve(firstVal); | |
console.log('the initial promise renders: ', firstVal); | |
}, 3000); // faking some longer process | |
}) | |
.then(function(firstVal) { | |
var secondVal = firstVal + 1; |
NewerOlder