Skip to content

Instantly share code, notes, and snippets.


Jonathan Neal jonathantneal

View GitHub Profile
View Accessible-Breadcrumbs-Markup.markdown

Accessible Breadcrumbs Markup

Screen Readers

On MacOS X Mountain Lion, VoiceOver 6 reads "Breadcrumbs with 3 items, navigation. Link, Home. Link, Library. Visited link, Data."

On Windows XP, Windows Eyes reads "Two links. Link, Home. Link, Library. Visited Link, Data."

On Windows XP, NVDA 2012.3 reads "Navigation landmark. Link, Home. Link, Library. Visited Link, Data."

jonathantneal /
Last active August 29, 2015 13:56
What’s in a language?

What’s in a language?


English is the default language of the web.

If you serve multilingual content, you should know about the Content-Language header and the lang attribute.

The Content-Language header describes the language understood by your audience. It may contain multiple languages, but in practice, you should keep individual pages monolingual.

jonathantneal / longpoll.js
Created March 28, 2014 23:02
Simple longpoll functionality between JavaScript and PHP
View longpoll.js
function longpoll(src, onload, onerror) {
// create modified header
var ifModifiedSince;
// create request
function onrequest() {
var xhr = new XMLHttpRequest();'GET', src);
jonathantneal / README.xml
Created April 12, 2014 16:49
Match <script type="text/template"> variations
View README.xml
jonathantneal / javascript.php
Created April 15, 2014 00:02
Javascript-like PHP syntax
View javascript.php
class jObject {
// Private
private $__ = null;
function __construct() {
call_user_func_array(array($this, '__init'), func_get_args());
jonathantneal /
Last active August 29, 2015 14:01
Welcome to IE9

Now that the bar has been set to Internet Explorer 9, I’m excited to bring some CSS to your attention.

Select things by their hierarchy: :first-child, :last-child, :only-child, :nth-child, :nth-last-child

Or by type: :first-of-type, :last-of-type, :only-of-type, :nth-of-type, :nth-last-of-type

Or not:

jonathantneal /
Created June 11, 2014 16:49
Chapman University Homepage Update

Chapman University Homepage Update


Create a fast, accessible, dynamic environment for visitors to learn more about Chapman University.

Big Goals

  • Minimize load time
  • Improve accessibility
jonathantneal / README.vm.html
Created June 17, 2014 15:24
Import CSS to cache
View README.vm.html
#set($css_cache = {})
#macro (importCSS $path)
## if the path does not yet exist as a key in the cache
#if (!$css_cache.containsKey($path))
## load the path contents
#set($css = $_.locateFile($path))
## if the file exists, cache the contents using the path as the key
#if ($css)
jonathantneal /
Created June 29, 2014 06:44
Fragmention edge cases

Fragmention edge cases

#the+end // returns [ blockquote , em , p , blockquote ]
	- the end -
jonathantneal / README-MF.html
Last active August 29, 2015 14:03
Marginalia Markup
View README-MF.html
<article class="h-entry">
<h3 class="p-name"><span>in reply to</span> <a class="u-in-reply-to" href="{{in_reply_to_link}}">{{in_reply_to_link}}</a></h3>
<p><span>by</span> <a class="p-author h-card" href="{{author_link}}"><img class="u-photo" src="{{author_image}}" alt=""> {{author}}</a></p>