Skip to content

Instantly share code, notes, and snippets.

APG Coding standards

Standards for developing contributing HTML, CSS, and JavaScript to W3 WAI-ARIA APG.

@smhigley
smhigley / createObserver.js
Last active September 20, 2024 04:36
MutationObserver quick test
function observeElement(element) {
const config = { attributes: true, childList: true, subtree: true };
const callback = function(mutationsList, observer) {
for(let mutation of mutationsList) {
if (mutation.type === 'childList') {
const additions = mutation.addedNodes;
const removals = mutation.removedNodes;
if (removals.length) {
console.log('Child nodes were removed:', ...removals);
}
@smhigley
smhigley / wcag2.1-testing-guidance.md
Last active April 21, 2022 15:38
Advice on how to test new WCAG 2.1 rules

Testing Guidance for new WCAG 2.1 guidelines

1.3.4: Orientation

Quick test: resize your browser or application window between a rough estimate of portrait and landscape aspect ratios, and verify that everything looks OK and works correctly in both.

Full test: open the website or app in a tablet, and rotate the tablet.

1.3.5: Identify Input Purpose

@smhigley
smhigley / combo-readonly.tsx
Last active March 21, 2019 07:26
Readonly Combobox using StencilJS
import { Component, Event, EventEmitter, Prop, State } from '@stencil/core';
import { getActionFromKey, getUpdatedIndex, MenuActions, uniqueId } from '../../shared/utils';
interface SelectOption {
name: string;
value: string;
}
@Component({
tag: 'combo-readonly',
@smhigley
smhigley / dojo2-variables.md
Last active July 21, 2017 16:05
Dojo2 Theme Variables

Colors

HEX values in the theme

Name Hex
white #ffffff
light-grey #f4f6f7
grey #d6dde2
dark-grey #5c6c7c