RhianaH
Rhiana is a front end developer specialising in making web sites and applications accessible for people with disabilities. Combining her background in educational psychology and a love of computers.
Content
Style
Functionality
JS Enabled
JS Disabled
* Average result, numbers vary by country and device
All your users are non-JS while they’re downloading your JS.
<noscript>
<p>
This can be added to your HTML and
only show if no JS is detected
</p>
</noscript>
>
JS
CSS
&_submenu {
&:hover {
> .Nav_dropdown {
display: block;
}
}
}
&_toggle {
&:focus, &:focus-within {
+ .Nav_dropdown {
display: block;
}
}
}
OK
.Modal {
z-index: -1;
opacity: 0;
pointer-events: none;
&:target {
opacity: 1;
pointer-events: auto;
z-index: 999;
}
}
<a class="btn" href="#open-modal">
Open Modal
</a>
<div class="Modal" id="open-modal">
...
</div>
<dialog open>
...
</dialog>
aria-model="true"
2018
2012
Bootstrap collapse accordions added to version 2
Accordions are in jQuery UI version 1.5
2008
<input type="checkbox"
id="toggle-1"
class="Accordion_input"
name="accordion"
value="0"/>
<label for="toggle-1"
class="Accordion_label">
Toggle 1
</label>
&_input {
// Not display: none; for sr a11y
@include hiddenInput;
&:checked {
~ .Accordion_body {
display: block;
}
}
}
<details>
<summary>
Accodion Title
</summary>
Accordion Body text
</details>
2018
Multi column layout officially added to CSS 3 spec
.Masonry {
column-count: 3;
column-gap: 20px;
&_object {
// Otherwise will wrap like a newspaper
break-inside: avoid;
margin-bottom: 20px;
}
}
2019
transition is in CSS4 working draft
2006
.fadeIn() added in jQuery
2010
Scriptaculous animation library
.Transition {
background-color: #BF55EC;
transition: background-color 0.3s;
&:hover {
background-color: #007A7C;
}
}
<label>
<input type="radio"/>
</label>
<div aria-expanded="false">
...
</div>
$('input[type="checkbox"]').on('change', function() {
var $content = $(this).siblings('.content')
var $is_checked = $(this).prop('checked')
$content.attr('aria-expanded', $is_checked)
})
Slides: https://slides.com/rhianaheath/deck-11
Twitter: @RhianaHeath
By RhianaH
MelbCSS September 2019, WebDirections Summit October 2019
Rhiana is a front end developer specialising in making web sites and applications accessible for people with disabilities. Combining her background in educational psychology and a love of computers.