Everyone can perceive, understand, navigate, and interact with the Web, and they can contribute to the Web.
Marcy Sutton, Developer @Substantial
Angular.js Accessibility & Material Design
“The tree is done! Pic courtesy of BlindChick photography…bad focus is strictly the blind girl’s fault.” Sarah Outwater on Facebook
cursor: pointer;element.on('click')outline: none;
<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>
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
Accessible Scroll UI Demo
$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%;
}