Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcy Sutton marcysutton

View GitHub Profile
View gist:c221a5b855bccbfd32bc7442738e3d49
var jsdom = require('jsdom');
// Some html page
var html = [
'<html>',
'<body>',
'<p>An image without an alt tag! <img src="some.jpg" /></p>',
'<h2>Not an h1</h2>',
'<h5>blabla</h5>',
'<h4></h4>',
@marcysutton
marcysutton / merging.md
Last active Nov 29, 2016
Bitbucket merge hell
View merging.md

Merging a pull request

To apply a pull request, make sure your local develop branch is up to date. Then, create a new branch for that pull request:

git checkout -b some-user-feature

Run the following commands to apply all commits from that pull request on top of your branch's local history:

@marcysutton
marcysutton / string-wildcard-replacement.js
Created Mar 17, 2015
JavaScript string manipulation
View string-wildcard-replacement.js
var str = '1?101?011';
var repl = ['0', '1'];
var pattern = /\?/g;
var numMatches = str.match(pattern).length;
for(var j=0; j<numMatches; j++){
for(var i=0; i<repl.length; i++){
console.log(str.replace(pattern, repl[i]));
}
}
View Gruntfile.js
module.exports = function (grunt) {
'use strict'
require('load-grunt-tasks')(grunt)
grunt.initConfig({
mochaTest: {
test: {
options: {
@marcysutton
marcysutton / ISSUE_TEMPLATE.md
Last active Mar 15, 2017
Accessibility Github Issue Template
View ISSUE_TEMPLATE.md

Issue Description

// What is the nature of the issue? Which browser and/or Assistive Technology?

How to reproduce / Current behavior

// Step-by-step instructions explaining how to reproduce the problem. Environment required, explicit identification of the component in question

How to validate (Acceptance Criteria) / Expected behavior

// A set of assumptions which, when tested, verify that the accessibility requirement was met.

Additional information

View cascadia-fest-marcysutton.md

The Pacific Northwest conference CascadiaJS grew into something new and amazing this year: a 3-day web conference now called Cascadia Fest. Following the JS Fest format, talks were grouped into server and browser JavaScript days, and a brand-new CSS day. 400 attendees and their families along with speakers and volunteer staff came to the beach for 34 talks and 6 free workshops at Semiahmoo Resort, across Birch Bay from Canada. The venue was right between Vancouver BC and Seattle, both previous locations, as well as Portland.

Cascadia Fest awarded 10 diversity scholarships this year, making a big impact in the community. As Northwest native, I love the message & perspectives at Cascadia Fest: common themes reflect the community’s values. Speakers talk about compelling side projects and talking through the learning process, while admitting vulnerability. They enlighten us about being polite citizens in open source and beyond, elevating our skills, and investing in our careers an

@marcysutton
marcysutton / developer-guide.md
Last active Mar 14, 2018
ngAria Developer Guide
View developer-guide.md

The goal of ngAria is to improve Angular's default accessibility by enabling common ARIA attributes that convey state or semantic information for assistive technologies used by persons with disabilities.

##Including ngAria

Using ngAria is as simple as requiring the ngAria module in your application. ngAria hooks into standard AngularJS directives and quietly injects accessibility support into your application at runtime.

@marcysutton
marcysutton / accessible-uis.md
Last active Jun 25, 2018
Accessible UIs - State of A11y
View accessible-uis.md

How to accessibility!

Definition of done

Education

  • Awareness
  • Design and UX
@marcysutton
marcysutton / enzyme-test.js
Last active Oct 7, 2019
React A11y Testing
View enzyme-test.js
import {expect} from 'chai';
import App from '../app/components/App';
import a11yHelper from "./a11yHelper";
describe('Accessibility', function () {
this.timeout(10000);
it('Has no errors', function () {
let config = {};
You can’t perform that action at this time.