Skip to content

Instantly share code, notes, and snippets.

View 1Copenut's full-sized avatar

Trevor Pierce 1Copenut

View GitHub Profile
@1Copenut
1Copenut / radio-group.html
Last active August 1, 2017 20:54
a11y - Form - Required radio button group
View radio-group.html
<h1 id="radio-group-title">A Decent Way to Group Radio Buttons</h1>
<form action="#" aria-labelledby="radio-group-title">
<fieldset role="radiogroup" aria-required="true">
<legend>This fieldset is required</legend>
<label>
<input type="radio" name="test-group" id="test-group-1" required="true" value="true">Yes
</label>
<label>
<input type="radio" name="test-group" id="test-group-2" required="true" value="false">No
</label>
@1Copenut
1Copenut / sr-only.css
Last active September 15, 2021 14:26
a11y - CSS - Visually hidden, screen reader accessible text
View sr-only.css
/*
* SOURCE:
* Much respect to Chris Coyier of CSS-Tricks
* https://css-tricks.com/places-its-tempting-to-use-display-none-but-dont/
*
* TESTED:
* OSX VoiceOver
* Windows 7 NVDA
*
* USE CASES:
View keybase.md

Keybase proof

I hereby claim:

  • I am 1copenut on github.
  • I am continuum (https://keybase.io/continuum) on keybase.
  • I have a public key ASDcTLmn1yr51bRwfKw37S72aNcUOROa9Q8_WlSwe98i8Ao

To claim this, I am signing this object: