Skip to content

Instantly share code, notes, and snippets.

View tjvantoll's full-sized avatar

TJ VanToll tjvantoll

View GitHub Profile
@tjvantoll
tjvantoll / dabblet.css
Created July 12, 2012 14:51
CSS3 Purple Button
button {
color: #fff;
font-size: 1em;
font-weight: bold;
text-align: center;
font-family: Verdana, Geneva, sans-serif;
text-shadow: 0.07em 0.07em 0.12em #888;
display: inline-block;
height: 2.2em;
@tjvantoll
tjvantoll / index.html
Created August 1, 2012 13:41
A web page created at CodePen.io.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Basic Browser Form for Validation &middot; CodePen</title>
<!--
Copyright (c) 2012 TJ VanToll, http://codepen.io/tjvantoll
Permission is hereby granted, free of charge, to any person obtaining
@tjvantoll
tjvantoll / index.html
Created August 1, 2012 13:41
A web page created at CodePen.io.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Basic Browser Form for Validation &middot; CodePen</title>
<!--
Copyright (c) 2012 TJ VanToll, http://codepen.io/tjvantoll
Permission is hereby granted, free of charge, to any person obtaining
@tjvantoll
tjvantoll / run-qunit.js
Created August 23, 2012 01:47
QUnit Test Runner that Logs Test Failures
var system = require('system');
/**
* Wait until the test condition is true or a timeout occurs. Useful for waiting
* on a server response or for a ui change (fadeIn, etc.) to occur.
*
* @param testFx javascript condition that evaluates to a boolean,
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
* as a callback function.
* @param onReady what to do when testFx condition is fulfilled,
@tjvantoll
tjvantoll / formAttribute.js
Created July 2, 2013 18:00
Polyfill for Form Attribute on Submit Buttons
/**
* The form attribute can be used to associate a submit button with a form, even
* if the button is not a child of the <form> itself.
*
* This polyfill detects support with Modernizr and polyfills the functionality
* using jQuery.
*/
(function() {
// Via Modernizr
diff --git a/themes/base/jquery.ui.theme.css b/themes/base/jquery.ui.theme.css
index 2c30043..71bd156 100644
--- a/themes/base/jquery.ui.theme.css
+++ b/themes/base/jquery.ui.theme.css
@@ -76,7 +76,11 @@
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
-.ui-state-hover a:visited {
+.ui-state-hover a:visited,
@tjvantoll
tjvantoll / menu_events.js
Created August 2, 2013 20:38
Test for #9469.
test( "#9469: Stopping propagation in a select event should not suppress subsequent select events.", function() {
expect( 1 );
var element = $( "#menu1" ).menu({
select: function( event, ui ) {
log();
event.stopPropagation();
}
});
click( element, "1" );
@tjvantoll
tjvantoll / gist:6268602
Created August 19, 2013 12:29
activate event docs update
diff --git a/entries/accordion.xml b/entries/accordion.xml
index dc66356..9b7ed64 100644
--- a/entries/accordion.xml
+++ b/entries/accordion.xml
@@ -120,7 +120,10 @@
</options>
<events>
<event name="activate">
- <desc>Triggered after a panel has been activated (after animation completes). If the accordion was previously collapsed, <code>ui.oldHeader</code> and <code>ui.oldPanel</code> will be empty jQuery objects. If the accordion is collapsing, <code>ui.newHeader</code> and <code>ui.newPanel</code> will be empty jQuery objects.</desc>
+ <desc>
@tjvantoll
tjvantoll / screen-reader-abstract.md
Last active December 27, 2015 09:48
Demystifying Screen Readers for Web Developers

Demystifying Screen Readers for Web Developers

Most web developers have a small armada of browsers and devices to test their sites on, yet few have ever used a single screen reader. This has led to accessibility information being treated as some form of wizardry; developers conjecture about what's best for disabled users without actually testing their theories out.

This is a shame, because in general, screen readers are not hard to use. And as it turns out, the best way to verify your site is accessible is to use it as an impaired user would.

In this talk we'll break down these barriers by showing how the most popular screen readers on Windows, OS X, iOS and Android actually work. We'll also look at a number of accessibility best practices - but instead of preaching these practices as facts, we'll show the effect each has on real users on real screen readers.

@tjvantoll
tjvantoll / TestServlet.java
Created November 19, 2013 21:39
Hello World, JEE Style
package com.tj;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class TestServlet extends HttpServlet {