- Put
<caption>
on all tables (even if you.visually-hide
it. Really important. - Put the unique part of page titles first. Like
<title>Contact Us | Thinkful</title>
. Better for tabs. - Use
<footer role="contentinfo">
because<footer>
has poor implicit role support - Whenever you do
aria-hidden="true"
also dotabindex="-1"
so it won't receive focus (otherwise it will get focus but they won't hear anything) - ARIA actually has better browser support than HTML5. Wow.
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
<?php | |
/** | |
* Duplicates a MODX User Group | |
* USAGE: | |
* php duplicateusergroup.php 1 New\ Group | |
* php duplicateusergroup.php 1 New\ Group newuser you@you.com password | |
*/ | |
$tstart = microtime(true); | |
set_time_limit(0); |
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
// layerName.jsx | |
// Copyright 2006-2008 | |
// Written by Jeffrey Tranberry | |
// Photoshop for Geeks Version 2.0 | |
/* | |
Description: | |
Using an alert(); to display current Layer's name. | |
Set the name of the current layer to a string "Timmy" | |
*/ |
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
// A husband forges out into the night... | |
// promising his wife to go to the store and come back with milk | |
const goToStore = new Promise((res, rej) => { | |
// do our code | |
// then when we are done, call res() | |
// if anything goes wrong, throw an error by calling rej() | |
const wentToStore = Math.random() <= .75; // 75% chance he remembers to go to the store | |
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
<table> | |
<thead> | |
<tr> | |
<th>Media</th> | |
<th>Filename</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td><img src="http://j4p.us/433U312j1Z0S/Screen%20Shot%202017-05-07%20at%203.24.10%20AM.png" alt="YOLO"></td><!-- fails axe-core https://dequeuniversity.com/rules/axe/2.1/th-has-data-cells --> |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { EurekaMediaBrowser, actions } from 'eureka-browser'; | |
import decoratedActions from './modxactions'; | |
module.exports = function(opts = window.EUREKA_CONFIG) { | |
const config = opts, | |
props = Object.assign({}, { |
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
<?php | |
/** | |
* cacheguard plugin for cacheguard extra | |
* | |
* Copyright 2013 by JP DeVries jp@modx.com | |
* Created on 06-21-2013 | |
* | |
* cacheguard is free software; you can redistribute it and/or modify it under the | |
* terms of the GNU General Public License as published by the Free Software | |
* Foundation; either version 2 of the License, or (at your option) any later |
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 isEven(num) { if num is a really large number this will require A LOT of recursive division | |
return num % 2 === 0; // infinite module divisions | |
}*/ | |
function isEven(num) { | |
num = parseInt(num.toString().slice(-1)); // the rightmost digit of any even number is also even so just check that | |
return num % 2 === 0; | |
} |
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
<form id="font-size-widget" class="widget"> | |
<h2 id="font-size"><noscript>Please enable JavaScript to </noscript>Choose a Font Size</h2> | |
<fieldset> | |
<legend>Font Size</legend> | |
<div> | |
<input type="radio" name="fontsize" id="fontsize__normal" value="normal" checked disabled> | |
<label for="fontsize__normal">Normal</label> | |
</div> |
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
$('.settings-table').each(function(){ | |
$(this).on('focusin click','tbody > tr:not(.setting-form)',function(e){ | |
$(this).addClass('open').siblings('.open').removeClass('open'); | |
}); | |
}); |
NewerOlder