On Github marcysutton / a-web-for-everybody
Everyone can perceive, understand, navigate, and interact with the Web, and they can contribute to the Web.
Millions of people have disabilities that affect their use of the Web.
Web accessibility also benefits people without disabilities.
Marcy Sutton, Developer @SubstantialAngular.js Accessibility & Material Design
We design and build websites, web apps, mobile experiences, digital products, and we take pride in our craft. But sometimes we only build things for ourselves.And you know why? Because mobile devices improve quality of life.
Accessibility shouldn't be an afterthought.
<core-item style="cursor:pointer;">Inbox</core-item> // NOPE.
<button ng-click="clickHandler()">Inbox</button> // YEP!
<md-button role="button" tabIndex="0"
ng-click="heckYeah()" ng-keypress="heckYeah()">
Inbox
</md-button>
Challenge the concept of "interactive". PERCEIVABLE and OPERABLE. Robust. Understandable.
What does this thing do?
<div role="img" style="background-image..."
The current condition of this particular thing
<md-input aria-disabled="true"...
<md-checkbox aria-label="Subscribe"...
Don't overdo it with ARIA.
.navlist--main > li > a
color: $white
display: block
&:hover
text-decoration: underline
.navlist--main > li > a
color: $white
display: block
&:hover, &:focus
text-decoration: underline
$scope.$watch('airportIsSelected', function(newValue){
if(newValue){
$('html,body').animate({
scrollTop: peoplePicker.offset().top
}, 600);
peoplePicker.find('button').first().focus();
$rootScope.$broadcast('statusUpdated', self.selectedAirport);
}
});
<status-bar aria-live="polite"></status-bar>
function statusBarDirective($scope, $element, $attrs) {
element.attr({
'role' : 'region'
});
$scope.$on('statusUpdated', function(scope, message) {
$element.html(message.text);
});
}
class App.FocusManager
constructor: ->
$('body').on 'focusin', (e) =>
@oldFocus = $(e.target)
App.bind 'rendered', (e) =>
return unless @oldFocus
@_focusById() if @oldFocus.data('focus-id')
_focusById: ->
focusId = @oldFocus.data('focus-id')
newFocus = document.querySelector("##{focusId}")
MyApp.focus(newFocus) if newFocus
<div role="img" style="background: url(corner-creek.gif)"
aria-label="Corner Creek Kentucky Bourbon"></div>
[role=img] {
background-size: cover;
background-position: center right;
height: 100%;
width: 100%;
}
A Web for Everybody@marcysutton / MarcySutton.com