SlideShare a Scribd company logo
@coolfields1
Accessibility Hacks
For life's little inaccessible moments…
@coolfields
A bit about me
2
I’m a…
• Web Accessibility
Consultant
• WordPress
Developer
Photo by Mike Pead
@coolfields
What I'm going to cover
Some small tweaks we can make when building accessible WP
themes for ourselves and our clients.
Specifically I'll be looking at:
• Using SVG images in an accessible way.
• CSS techniques that help with accessibility.
@coolfields
Using SVG
• SVG images are vector graphics, as opposed to raster or bitmapped
images like jpeg, png or gif.
• SVG images are described by the lines and blocks and other shapes,
combined to make up an entire images.
• This means that they can be infinitely scaled without any pixellation.
• And the file sizes are generally smaller than corresponding jpeg, png
or gif.
• But can they be accessed by assistive technology users?

Recommended for you

TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單

The document discusses new features in HTML5 including semantic elements, form elements, and microdata. Some key points: 1. HTML5 introduces new semantic elements like <header>, <footer>, <nav>, <article>, and <section> to define different parts of a page and improve semantics and accessibility. 2. New form input types are added like email, url, tel, number, date to support validation and new UI widgets. Attributes like placeholder, autofocus, and autocomplete improve the form experience. 3. Microdata builds on microformats to embed structured data using attributes like itemscope, itemtype, and itemprop to identify items, properties and values for search engines and APIs

html5semantic web
Next generation Graphics: SVG
Next generation Graphics: SVGNext generation Graphics: SVG
Next generation Graphics: SVG

This document provides an overview and summary of Scalable Vector Graphics (SVG). It begins with a brief introduction to SVG concepts like basic shapes. It then discusses the history and evolution of SVG standards over time. It outlines how SVG is commonly used today in areas like logos, icons, charts and graphics. Examples are given of tools for editing, optimizing and automating SVG. Reasons for using SVG like crisp images, scriptability, animations and small file sizes are explained. The document discusses how SVG is used and its potential in Drupal. It concludes with an overview of the future SVG 2 standard and resources for learning more about SVG.

html5csssvg
SVG - Scalable Vector Graphic
SVG - Scalable Vector GraphicSVG - Scalable Vector Graphic
SVG - Scalable Vector Graphic

Scalable Vector Graphics (SVG) is an open standard, XML-based vector image format for two-dimensional graphics.

svgvector graphic
@coolfields
SVG Hack 1 - SVG files
@coolfields
Adding SVG files to web pages
Uses the trusty <img> element with the alt attribute to give
the accessible label…
<img src="https://path/images/home.svg"
alt="My logo">
So we're done here aren't we??
@coolfields
Using role="img" with SVG files
Well, SVG support within screen reader is still in its infancy,
so we need a helping hand from ARIA here...
<img src="https://path/images/home.svg"
alt="My logo" role="img">
This ensures that all screen readers can 'see' this image.
@coolfields
SVG files as links
Now the destination is the important bit, so that's what the
alt attribute should refer to.
<a href="/">
<img src="https://path/images/home.svg"
role="img" alt="Home Page">
</a>

Recommended for you

SVG Icons and Screen Reader Accessibility
SVG Icons and Screen Reader AccessibilitySVG Icons and Screen Reader Accessibility
SVG Icons and Screen Reader Accessibility

SVG is often used for content, linked icons, and buttons. Learn which coding methods perform best across a variety of screen reader and browser combinations. By @DennisL

webdevaccessibilitysvg
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks

Here are some of the stuff I learnt while making it, and if you are working on responsive design, you should probably keep this as reference. Note: You are free to download, edit, distribute and use this work in any way you want.

appapplicationwebdesign
Top 10 HTML5 features
Top 10 HTML5 featuresTop 10 HTML5 features
Top 10 HTML5 features

HTML5 contains many new interesting features that make the platform a capaple development platform. Sockets, SVG, geolocation, local storage and many more are included in the platform. In this one hour session, we will look at cool implementations of 10 features of HTML5

htmljavascripthtml5
@coolfields
SVG Hack 2 - Inline SVG
@coolfields
Inline SVG in web pages
Example of inline SVG…
<svg version="1.1" width="100" height="75">
<rect width="75" height="50" rx="20" ry="20"
fill="#90ee90" stroke="#228b22"
stroke-fill="1" />
</svg>
@coolfields
The challenge of inline SVG…
• Inline SVG is invisible to screen readers
• There is no <img> element
• And there is no alt attribute you can use to give it some
alternate text.
@coolfields
Using <title> with inline SVG
To solve the issue, use the <title> element within the <svg>
wrapper.
But also, connect it with the aria-labelledby attribute so all
screen readers can access the text in the <title> element.
And we still need the role="img" too.

Recommended for you

WAI-ARIA is More Than Accessibility
WAI-ARIA is More Than AccessibilityWAI-ARIA is More Than Accessibility
WAI-ARIA is More Than Accessibility

WAI-ARIA provides semantics and accessibility information to web pages and applications developed with technologies like HTML, JavaScript, and CSS. It defines roles, states, and properties that can be applied to elements to define their purpose and relationships. This allows assistive technologies like screen readers to better understand the structure, functionality and relationships within complex JavaScript-driven applications and dynamic content.

wai-aria
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...

This document introduces the Accessible Rich Internet Applications (ARIA) specification. It discusses: 1) The need for ARIA to make complex web applications accessible to assistive technologies like screen readers, as traditional HTML elements may not adequately convey semantics. 2) Common interactive widgets and how ARIA attributes like role, state, and properties help expose their purpose and functionality. 3) Best practices for applying ARIA, including using native HTML where possible, and ensuring custom interactive elements are keyboard navigable and have accessible names. The document provides examples of how to make common structures and widgets like buttons, menus, sliders accessible with ARIA. It emphasizes ARIA enhances, rather than replaces, traditional

javascriptwai-ariaaccessibility
Real World Web components
Real World Web componentsReal World Web components
Real World Web components

The document discusses web components, which include HTML templates, custom elements, shadow DOM, and HTML imports. Web components allow the creation of reusable custom elements with their own styles and DOM structure. They provide encapsulation and help avoid issues with global namespaces. While browser support is still emerging for some features, polyfills exist and frameworks like Polymer make web components accessible today. Web components represent an important evolution of the web that will improve how code is structured and shared.

polymerangularweb-components
@coolfields
Using <title> with inline SVG
So we end up with this…
<svg version="1.1" width="100" height="75" aria-
labelledby="title" role="img">
<title id="title">Green rectangle</title>
<rect width="75" height="50" rx="20" ry="20"
fill="#90ee90" stroke="#228b22" stroke-fill="1"
/>
</svg>
@coolfields
Using <title> with inline SVG
Using the <title> element in <svg> container has an unexpected effect
in some browsers…
A hover over tooltip. A bit like you get with the title attribute on other
HTML elements...
@coolfields
Using <desc> with inline SVG
So alternatively, use <desc> element within the <svg> wrapper.
Once again, use aria-labelledby.
<svg version="1.1" width="100" height="75" aria-
labelledby="desc01" role="img">
<desc id="desc01">Green rectangle</desc>
<rect width="75" height="50" rx="20" ry="20"
fill="#90ee90" stroke="#228b22" stroke-fill="1"
/>
</svg>
@coolfields
Inline SVG in web pages
How do screen readers interpret this?

Recommended for you

Steph's Html5 and css presentation
Steph's Html5 and css presentationSteph's Html5 and css presentation
Steph's Html5 and css presentation

This presentation discusses using CSS to style HTML elements on a webpage. It focuses on positioning and styling an image. Specifically, it demonstrates how to add a border around an image, change the image size, position the image using static, relative, fixed and absolute positioning, float images left and right, and group images using the HTML <div> tag. It also mentions testing the CSS styling in Google Chrome and Internet Explorer browsers.

html5css
Game Development Using HTML 5
Game Development Using HTML 5Game Development Using HTML 5
Game Development Using HTML 5

The document discusses HTML5 game development. It covers various topics like game concepts, HTML5 components for games, developing a game step-by-step and advanced topics. It focuses on HTML5 canvas for graphics, local storage for data, and describes functions for animations, interactions, controls and other elements needed for game development. The document provides examples for drawing, colors, images and text on the canvas.

game development using html 5
Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012

The document discusses improvements and changes to the Sizzle selector engine in jQuery 1.8. Key points include: - Matching and filtering performance improved by around 10% on average. - ID selections rooted at an element improved by 300%. - Bugs were fixed in how different browsers handle certain selectors with querySelectorAll and matchesSelector. - Support for combining multiple combinators in selectors was improved. - More changes are planned prior to release, including implementing a compiler to avoid re-looping elements.

jquery jqcon javascript sizzle keynote
@coolfields
Inline SVG and links
What if your inline SVG needs to be a link?
@coolfields
Inline SVG and links
Best solution - wrap link around SVG
<a href="/">
<svg version="1.1" width="100" height="75" aria-
labelledby="desc01" role="img">
<desc id="desc01">Home page</desc>
<rect width="75" height="50" rx="20" ry="20"
fill="#90ee90" stroke="#228b22" stroke-fill="1" />
</svg>
</a>
@coolfields
The difference for screen readers
How do screen readers interpret all this?
@coolfields
Getting SVG into WordPress pages
• No native support for SVG in Media Manager.
• We'd need to paste SVG into pages/posts.
• Or need to rely on a plugin…
• There are a few available, but these next two seem the most
popular.
• But can they give us accessible SVG??

Recommended for you

How to build a static website in two and a half days with Nuxt and Tailwind CSS
How to build a static website in two and a half days with Nuxt and Tailwind CSSHow to build a static website in two and a half days with Nuxt and Tailwind CSS
How to build a static website in two and a half days with Nuxt and Tailwind CSS

The document discusses building a static website in two and a half days using Nuxt and Tailwind CSS. Nuxt allows building static sites with Vue components, and Tailwind CSS is a utility-first CSS framework. The author had no experience with either but was able to create responsive pages for a podcast site that met requirements. Key features of Nuxt include pre-rendering, layouts, and assets handling. Tailwind CSS provides utilities for layout, typography, backgrounds and more. PurgeCSS was used to remove unused CSS and reduce file sizes.

vuevue.jsnuxt
Html5
Html5Html5
Html5

The document discusses HTML5 and provides an agenda for an HTML5 training session. It introduces HTML5 and covers new HTML5 elements, the <canvas> element for drawing graphics, and how to draw paths, boxes, circles and text on the canvas using JavaScript. It also briefly mentions HTML5 features for media, storage, and forms.

Angular Js Advantages - Complete Reference
Angular Js Advantages - Complete ReferenceAngular Js Advantages - Complete Reference
Angular Js Advantages - Complete Reference

Angular Js Advantages.Developed by Google - Most Popular, SPA (Single Page Applications), Data Binding,Code Reduction, Easy to Test.

webuiweb development
@coolfields
SVG Support plugin
https://wordpress.org/plugins/svg-support/
Does not include role in <img> tag, but does include alt.
Does not include role in <svg> tag, does not include <title> element in
inline SVG.
Plugin author is aware and has responded positively to my comments:
https://wordpress.org/support/topic/suggestions-for-improving-
accessibility/
@coolfields
Safe SVG plugin
https://wordpress.org/plugins/safe-svg/
Does not include role in <img> tag, but does include alt.
Does not cater for inline SVG.
Plugin author contacted very recently.
@coolfields
CSS Accessibility Hacks
CSS techniques can be used to help ensure accessibility within
websites:
• Providing extra context for links, buttons and other
elements
• Help with testing accessibility during theme development
• Accessibility help for content authors once a site is live
@coolfields
CSS Hack 1 - Screen reader text

Recommended for you

jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages

This document discusses using jQuery with XPages. It begins with an introduction to jQuery, explaining that it is a popular JavaScript library that simplifies document manipulation, events, animation, and AJAX. It then compares jQuery to Dojo and provides guidance on when each should be used. The document demonstrates how jQuery works via its API and methods. It also explains how to add jQuery to an XPages application either directly in code or via a theme. Finally, it discusses jQuery plugins and how they can provide ready-made functionality to solve requirements.

xpagesjqueryjavascript
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5

The document discusses the history and evolution of HTML and web technologies from 1991 to present. It provides an overview of new semantic elements, multimedia capabilities, and client-side storage APIs introduced in HTML5. It also addresses techniques for detecting HTML5 support and workarounds for unknown elements in older browsers like Internet Explorer.

htmlhtml5
2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now

The final spec of html5 won't be ready until 2022, but you don't have to wait that long to start using it today and build really advanced web apps.

@coolfields
Why screen reader text
What's it for?
A way of providing extra information for screen reader users that is not
seen by sighted users.
Can be used to:
• Provide real text when icons are used
• Provide skip links
• Disambiguate links like 'Read more' on a blog index page
@coolfields
How to use screen reader text
Define a class in your CSS
.accessibleHidden{
border: 0;
clip: rect(0 0 0 0);
height: 1px;
width: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
position: absolute !important;
}
@coolfields
How to use screen reader text
Use the class in your HTML
<span class="accessibleHidden">This is hidden from
sighted users, but accessible by screen
readers</span>
Don't use these styles, as they will hide content from screen
readers as well:
• display:none
• visibility:hidden
@coolfields
It's used in WordPress themes

Recommended for you

"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...

Responsive web design challenges web designers to apply a new mindset to their design processes, as well as to techniques they are using in design and coding. This talk provides an overview of various practical techniques, tips and tricks that you might want to be aware of when working on a new responsive design project.

Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques

Responsive Web design challenges Web designers to adapt a new mindset to their design and coding processes. This talk provides an overview of various practical techniques, tips and tricks that you might want to be aware of when working on a new responsive design project.

cssweb design and developmentresponsive
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty gritty

This document provides an overview of HTML5 best practices for mobile design. It begins with introductions and outlines the session agenda. The presenter then discusses high-level principles like universal design and progressive enhancement. Specific techniques covered include viewport meta tags, media queries, scalable images, HTML5 tags, and touch-friendly guidelines. CSS topics include grids, backgrounds, gradients, and transitions. JavaScript behaviors like navigation, forms, and geolocation are also reviewed. Useful frameworks, polyfills, and testing tools are presented. The overall message is that mobile design requires an adaptive, user-centered approach through careful content structuring, responsive presentation, and unobtrusive behavior.

@coolfields
It's used in WordPress admin
Screen reader text can be found in the WP admin screens.
@coolfields
Wouldn't aria-label do the same?
To a point, yes. aria-label can be used on elements with set
roles - like links, buttons, dialogues, etc.
But aria-label won't work for plain text items…
• Alternatives to icons in product comparison tables
• Explaining what values mean on pages.
@coolfields32
CSS Hack 2 - Testing accessibility
during development
@coolfields
Ensuring landmarks are used properly
Wait, landmarks? What are they?
• A way of defining discrete regions of a page.
• For example banner, navigation, main content, etc.
• Increasingly used by screen reader users to help them
navigate around pages.
• Sometimes indicated by role="navigation", role="main",
etc

Recommended for you

Web Accessibility for the 21st Century
Web Accessibility for the 21st CenturyWeb Accessibility for the 21st Century
Web Accessibility for the 21st Century

You know it's important for your web project to be accessible to people who use all kinds of assistive technology to access the internet. But all the guidelines for web accessibility you can find don't go much beyond "make sure all your images have alt text", and all the resources you can find treat "accessibility" as a synonym for "making your site work in a screen reader". You know there are other things you should be doing and other forms of assistive technology you should be accomodating, but all the best practices documents are a complicated morass of contradicting information (if you can find best practices documents at all.) Have no fear! This tutorial gives you a number of concrete steps to take to make things more accessible. This presentation has downloadable notes and exercises available at http://denise.dreamwidth.org/tag/a11y . Video of the talk should be available later.

accessibility
D3.js and SVG
D3.js and SVGD3.js and SVG
D3.js and SVG

The document is a presentation about D3 and SVG technologies. It includes sections on networking opportunities, an interactive presentation format, polls about experience levels with D3 and SVG, examples of force-directed graphs and animated SVGs using D3, and details on implementing drag and drop as well as mouseover highlighting in a D3 visualization. The presentation source code is provided on GitHub and other examples are referenced, including alternatives to SVG. It concludes with another poll and a question and answer period.

svgd3javascript
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4

Here are the steps to build a basic horizontal navigation menu bar: 1. Create an unordered list <ul> with class="menu" 2. Add list items <li> for each menu item 3. Style the <ul> with display:inline-block and border-bottom 4. Style the <li> with display:inline-block, padding and hover effect 5. Add a class="current" to highlight the active page 6. Use a border-left on .current to create a left arrow Let me know if any part needs more explanation! Building menus is a common task and these techniques will serve you well.

girl develop it cincinnatigdi cincinnatigirl develop it
@coolfields
Ensuring landmarks are used properly
And if you think you're not using them, you probably are anyway -
if you use these HTML5 elements:
• <nav>
• <main>
and in certain situations…
• <header>, <footer>
• <section>, <article>
These are all understood as landmarks, by screen readers.
@coolfields
Ensuring landmarks are used properly
<header role="banner">
<nav role="navigation">
<footer role="contentinfo">
<main role="main"> <aside role=
"complementary">
<form role="search">
@coolfields
Ensuring landmarks are used properly
The key thing is if you're using them, they need to be used
properly.
And all content on the page needs to be in at least one
landmark, or screen reader users may miss key bits.
You can use a browser extension to highlight the landmarks
on a page, but it's not always possible to see whether or not
all content is within one.
@coolfields
Enter accessibility.css
In your dev environment you could have a CSS file that
could be temporarily attached to your pages - say
accessibility.css…

Recommended for you

Html5
Html5Html5
Html5

The document summarizes an upcoming presentation on HTML5 and PHP. It lists the group members and covers the following topics in the presentation agenda: HTML5 elements like Canvas, SVG, drag/drop, geo-location, video, audio; PHP syntax, variables, and strings; and differences between SVG and Canvas. It provides code examples and explanations for several HTML5 elements and features including Canvas, SVG, drag/drop, geo-location, video, audio, and form handling.

Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck

presportal.ru is the biggest Russian knowledge bank about presentations. We publish best presentations.

presportal.rupresentation
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.

This document summarizes Vitaly Friedman's talk on responsive design techniques and tricks. The talk covered resolution independence using SVG/icon fonts, content choreography with Flexbox, compressive images that maintain quality at different sizes, conditional loading of assets based on breakpoints, and lazy loading of JavaScript and social buttons. It also discussed maintaining aspect ratios for images and videos across screens, and serving different video files for different devices. The overall message was that responsive design requires a new mindset and pragmatic solutions rather than rigid rules.

web designweb developmentgraphic design
@coolfields
accessibility.css
main, nav, header, footer,
section[aria-labelledby], section[aria-label], form[aria-
labelledby], form[aria-label],
[role="banner"], [role="navigation"], [role="main"],
[role="contentinfo"], [role="complementary"],
[role="search"], [role="form"],
[role="region"][aria-label],
[role="region"][aria-labelledby] {
background-color: rgba(255,0,0,0.1);
outline:3px solid red;
color:#000;
}
@coolfields
accessibility.css
Now we want to 'unselect' <header> and <footer> elements that are
contained within <main>, <article>, <nav> and <section> - these
are not counted as landmarks by browsers and screen readers.
main header, article header, aside header,
nav header, section header,
main footer, article footer, aside footer,
nav footer, section footer {
background-color: transparent;
outline:none;
}
@coolfields
What does that look like?
Note that the
breadcrumb
navigation is not
contained within
any of the
landmarks.
@coolfields
So what else could we do?
Images without alt attributes:
img:not([alt]) {
outline: solid 3px red;
}
SVG files without the role="img" attribute:
img[href$=".svg"]:not([role="img"]) {
outline: solid 3px red;
}

Recommended for you

Html5 CSS3 jQuery Basic
Html5 CSS3 jQuery BasicHtml5 CSS3 jQuery Basic
Html5 CSS3 jQuery Basic

The document provides an overview of new features in HTML5, including several new semantic elements (e.g., <header>, <nav>, <article>), multimedia elements (<video>, <audio>), form controls, and APIs (e.g., geolocation, local storage). It also compares the <canvas> and <svg> elements, and discusses features like offline application caching, drag and drop, and web workers.

The Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesThe Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG Files

Mario Heiderich gave a presentation on active content injection using SVG files. He discussed how SVG files are XML-based and support scripting, allowing execution of JavaScript. This enables security issues like XSS. Browser implementations of SVG are inconsistent, with different levels of script support depending on how SVG files are deployed (inline, via <img>, etc). Exploits discussed SVG vulnerabilities in Firefox, Opera, and Chromium. Defense is difficult due to lack of documentation and filters, and new vectors are found weekly. Future work proposed a SVG purifier and raising awareness of issues.

xsssecurityfirefox
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - Ebook

Today’s designers when asked about HTML5 do hesitate to answer because of the lack of knowledge about HTML5.A Free Ebook On HTML 5 Step by Step Guide..

html 5 ebookshtml5 web developmenthtml 5
@coolfields
So what else could we do?
Empty links:
a:not([name]):empty {
outline: solid 3px red;
}
Empty buttons:
button:empty {
outline: solid 3px red;
}
@coolfields
So what else could we do?
Images where the title attribute has been used:
img[title] {
outline: solid 3px red;
}
@coolfields
So what else could we do?
Links with title attributes, or that open a new window:
a[title], a[target] {
outline: solid 3px gold;
}
Images with empty alt attributes:
img[alt=""] {
outline: solid 3px gold;
}
@coolfields
What does that look like?
Link with title attribute
present
Button with no content

Recommended for you

Html5
Html5Html5
Html5

This document provides an introduction to HTML5 and its new features. It discusses HTML5 as the successor to HTML 4.01 and XHTML 1.1, bringing new tags, features, and APIs. These include new structural elements, forms and validation, native audio and video, canvas, web storage, offline applications, geolocation, and drag and drop. It also outlines some of the new and updated HTML5 elements and semantic elements such as article, aside, footer, nav, progress, and meter. Finally, it provides examples of applications that can utilize various HTML5 features.

Html5
Html5Html5
Html5

This document provides an introduction to HTML5 and its new features. It discusses HTML5 as the successor to HTML 4.01 and XHTML 1.1, bringing new tags, features, and APIs. These include new structural elements, forms and validation, native audio and video, Canvas API, web storage, offline applications, geolocation, and drag and drop. It also outlines some of the new and updated HTML5 elements and semantic elements such as article, aside, footer, nav, progress, and meter. Examples are given of how to implement these new features in HTML5.

CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3

CSS3 provides new features for layout, typography, visual effects and graphics. Some key features include multiple column layout, rounded corners, box shadows, opacity, gradients, reflections, transforms and animations. Browser support for CSS3 is evolving with many properties requiring vendor prefixes. CSS3 brings more powerful and flexible options for designing user interfaces beyond what is possible with CSS2.

css
@coolfields46
CSS Hack 3 - Helping your
content authors get things right
@coolfields
Content authors can spoil the party
A WordPress website with a fully accessible theme won't stay accessible
for long if your content authors aren't aware how they can affect
accessibility of pages and posts.
Examples:
• Empty headings
• Forgetting to add meaningful alternate text for images
• Links that open a new window/tab
• Links with title attributes
So how can CSS help here?
@coolfields
Hooking into post/page preview
Most content authors will preview their posts or pages before submitting
them for review or putting them live.
So let's have some diagnostic CSS definitions in our main CSS file that
will show up when users preview.
Sadly, there is no 'preview' class that is included in the <body> element
by default.
But we could use the 'logged-in' class…
@coolfields
The logged-in class

Recommended for you

Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3

HTML5 and CSS3 offer some great features that everyone is clamoring to use. However, not everyone can simply rip apart their site and redo all of their markup and styling across the board. There are some quick wins, especially with CSS3, to be had that you can integrate into your site without rewriting your whole entire site.

htmlcss
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]

End-users are shallow and vein when it comes to applications. Whether you are selling apps in the marketplace, or trying to engage business users, without a sexy user experience, it can be hard to get people interested. HTML5, although very practical and functional as a platform, can do wonders when it comes to making sexy software. In this session, we will take a deeper dive into the HTML5 tools that can make your application a looker and really look good. We will learn how to take a regular HTML5 application and turn it into a rich user experience that stands out in the crown in HTML5 application using features like SVG, Canvas, and Audio/Video.

htmlcssjavas
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)

I based my presention on the great "HTML5 for Web designers" by Jeremy Keith. Awesome and pragmatic book, the way I like it. Get your copy on: http://books.alistapart.com/products/html5-for-web-designers

htmlaudiowhatwg
@coolfields
Adding some warnings with CSS…
Looking for images with blank alt attribute, and links that
open a new window.
.logged-in img[alt=""],
.logged-in a[target] {
outline: solid 3px gold;
}
@coolfields
More serious issues…
.logged-in a[title],
.logged-in img:not([alt]),
.logged-in img[title],
.logged-in img[src$=".svg"]:not([role="img"]),
.logged-in svg:not([role="img"]) {
outline: solid 3px red;
}
@coolfields
Empty elements
h1:empty, h2:empty, h3:empty,
h4:empty, h5:empty, h6:empty,
a:not([name]):empty,
button:empty {
display:block;
position:relative;
min-width: 5em;
min-height: 1em;
outline: solid 3px red;
}
@coolfields
Going even further…
h1:empty::after, h2:empty::after, h3:empty::after,
h4:empty::after, h5:empty::after, h6:empty::after {
position: absolute;
outline: solid 3px red;
min-width: 10px;
min-height: 1em;
top: 0;
color: red;
content: "Empty Header";
}

Recommended for you

Front end full stack development module 1pptx
Front end full stack development module 1pptxFront end full stack development module 1pptx
Front end full stack development module 1pptx

The document provides information about the CSE3150 module which covers HTML5 and CSS3. It includes the following topics: - Module I syllabus covers HTML5 syntax, attributes, events, forms, storage, canvas, and web sockets as well as CSS3 colors, gradients, and transforms. - An assignment to develop an HR policy website is given. - Comparisons between HTML4 and HTML5 are provided focusing on new elements, multimedia, forms, storage and responsive design in HTML5. - Information about code editors such as VS Code, Sublime Text, Atom, Brackets, and WebStorm is listed.

Useful Accessibility Tools Version 3 - Jul 2021
Useful Accessibility Tools Version 3 - Jul 2021Useful Accessibility Tools Version 3 - Jul 2021
Useful Accessibility Tools Version 3 - Jul 2021

A collection of tools used to check websites for accessibility, and it some cases improve the accessibility of a website. All the tools are free, so have a go.

accessibilityweb accessibilitywebsites
So how do i know if my wordpress website is accessible - WordPress Accessibil...
So how do i know if my wordpress website is accessible - WordPress Accessibil...So how do i know if my wordpress website is accessible - WordPress Accessibil...
So how do i know if my wordpress website is accessible - WordPress Accessibil...

Testing websites for accessibility can be a daunting undertaking if it's not something you're familiar with. The WCAG 2.1 accessibility guidelines can be hard to follow. But actually, many aspects of digital accessibility are not that complicated. In this talk I move away from the impenetrable guidelines, and introduce a simpler series of yes/no questions that anyone can answer about their own website. In the time available it can't cover every single potential accessibility problem, but instead I focus on some of the most common, and most serious accessibility issues that I've found when reviewing websites. Where possible, I'll also talk about how you can fix any issues founds.

accessibilitywordpressweb
@coolfields
So let's try it out
Link with title attribute
present
Image with empty alt
attribute
Link that opens new window
Empty header
@coolfields
What else could we do?
• Empty table cells - especially if header cells.
• Over to you…
@coolfields
Thanks for listening
Any questions?
graham.armfield@coolfields.co.uk
@coolfields 56

More Related Content

What's hot

HTML5 Essential Training
HTML5 Essential TrainingHTML5 Essential Training
HTML5 Essential Training
Kaloyan Kosev
 
HTML5 and SVG
HTML5 and SVGHTML5 and SVG
HTML5 and SVG
yarcub
 
html5_css3
html5_css3html5_css3
TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單
偉格 高
 
Next generation Graphics: SVG
Next generation Graphics: SVGNext generation Graphics: SVG
Next generation Graphics: SVG
David Corbacho Román
 
SVG - Scalable Vector Graphic
SVG - Scalable Vector GraphicSVG - Scalable Vector Graphic
SVG - Scalable Vector Graphic
Akila Iroshan
 
SVG Icons and Screen Reader Accessibility
SVG Icons and Screen Reader AccessibilitySVG Icons and Screen Reader Accessibility
SVG Icons and Screen Reader Accessibility
Dennis Lembree
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks
Gautam Krishnan
 
Top 10 HTML5 features
Top 10 HTML5 featuresTop 10 HTML5 features
Top 10 HTML5 features
Gill Cleeren
 
WAI-ARIA is More Than Accessibility
WAI-ARIA is More Than AccessibilityWAI-ARIA is More Than Accessibility
WAI-ARIA is More Than Accessibility
偉格 高
 
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
Patrick Lauke
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web components
Jarrod Overson
 
Steph's Html5 and css presentation
Steph's Html5 and css presentationSteph's Html5 and css presentation
Steph's Html5 and css presentation
stephy123123
 
Game Development Using HTML 5
Game Development Using HTML 5Game Development Using HTML 5
Game Development Using HTML 5
osa_ora
 
Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012
livelogos
 
How to build a static website in two and a half days with Nuxt and Tailwind CSS
How to build a static website in two and a half days with Nuxt and Tailwind CSSHow to build a static website in two and a half days with Nuxt and Tailwind CSS
How to build a static website in two and a half days with Nuxt and Tailwind CSS
Vanessa Böhner
 
Html5
Html5Html5
Angular Js Advantages - Complete Reference
Angular Js Advantages - Complete ReferenceAngular Js Advantages - Complete Reference
Angular Js Advantages - Complete Reference
EPAM Systems
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
Mark Roden
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
Ravi Raj
 

What's hot (20)

HTML5 Essential Training
HTML5 Essential TrainingHTML5 Essential Training
HTML5 Essential Training
 
HTML5 and SVG
HTML5 and SVGHTML5 and SVG
HTML5 and SVG
 
html5_css3
html5_css3html5_css3
html5_css3
 
TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單TOSSUG HTML5 讀書會 新標籤與表單
TOSSUG HTML5 讀書會 新標籤與表單
 
Next generation Graphics: SVG
Next generation Graphics: SVGNext generation Graphics: SVG
Next generation Graphics: SVG
 
SVG - Scalable Vector Graphic
SVG - Scalable Vector GraphicSVG - Scalable Vector Graphic
SVG - Scalable Vector Graphic
 
SVG Icons and Screen Reader Accessibility
SVG Icons and Screen Reader AccessibilitySVG Icons and Screen Reader Accessibility
SVG Icons and Screen Reader Accessibility
 
Responsive Web Design: Tips and Tricks
Responsive Web Design: Tips and TricksResponsive Web Design: Tips and Tricks
Responsive Web Design: Tips and Tricks
 
Top 10 HTML5 features
Top 10 HTML5 featuresTop 10 HTML5 features
Top 10 HTML5 features
 
WAI-ARIA is More Than Accessibility
WAI-ARIA is More Than AccessibilityWAI-ARIA is More Than Accessibility
WAI-ARIA is More Than Accessibility
 
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
WAI-ARIA - an introduction to accessible rich internet applications (1 day wo...
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web components
 
Steph's Html5 and css presentation
Steph's Html5 and css presentationSteph's Html5 and css presentation
Steph's Html5 and css presentation
 
Game Development Using HTML 5
Game Development Using HTML 5Game Development Using HTML 5
Game Development Using HTML 5
 
Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012Sizzle jQCon San Francisco 2012
Sizzle jQCon San Francisco 2012
 
How to build a static website in two and a half days with Nuxt and Tailwind CSS
How to build a static website in two and a half days with Nuxt and Tailwind CSSHow to build a static website in two and a half days with Nuxt and Tailwind CSS
How to build a static website in two and a half days with Nuxt and Tailwind CSS
 
Html5
Html5Html5
Html5
 
Angular Js Advantages - Complete Reference
Angular Js Advantages - Complete ReferenceAngular Js Advantages - Complete Reference
Angular Js Advantages - Complete Reference
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
 

Similar to Accessibility Hacks Wordcamp Manchester October 2018

2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
Gonzalo Cordero
 
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
Yandex
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
Vitaly Friedman
 
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
Mario Noble
 
Web Accessibility for the 21st Century
Web Accessibility for the 21st CenturyWeb Accessibility for the 21st Century
Web Accessibility for the 21st Century
dreamwidth
 
D3.js and SVG
D3.js and SVGD3.js and SVG
D3.js and SVG
Karol Depka Pradzinski
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Erin M. Kidwell
 
Html5
Html5Html5
Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck
Vera Kovaleva
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
GaziAhsan
 
Html5 CSS3 jQuery Basic
Html5 CSS3 jQuery BasicHtml5 CSS3 jQuery Basic
Html5 CSS3 jQuery Basic
Ravi Yelluripati
 
The Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesThe Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG Files
Mario Heiderich
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - Ebook
Scottperrone
 
Html5
Html5Html5
Html5
gjoabraham
 
Html5
Html5Html5
Html5
gjoabraham
 
CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
Robyn Overstreet
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
Brian Moon
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
David Wesst
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
François Massart
 
Front end full stack development module 1pptx
Front end full stack development module 1pptxFront end full stack development module 1pptx
Front end full stack development module 1pptx
MaruthiPrasad96
 

Similar to Accessibility Hacks Wordcamp Manchester October 2018 (20)

2022 HTML5: The future is now
2022 HTML5: The future is now2022 HTML5: The future is now
2022 HTML5: The future is now
 
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
 
Web Accessibility for the 21st Century
Web Accessibility for the 21st CenturyWeb Accessibility for the 21st Century
Web Accessibility for the 21st Century
 
D3.js and SVG
D3.js and SVGD3.js and SVG
D3.js and SVG
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
Html5
Html5Html5
Html5
 
Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
 
Html5 CSS3 jQuery Basic
Html5 CSS3 jQuery BasicHtml5 CSS3 jQuery Basic
Html5 CSS3 jQuery Basic
 
The Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesThe Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG Files
 
HTML 5 Step By Step - Ebook
HTML 5 Step By Step - EbookHTML 5 Step By Step - Ebook
HTML 5 Step By Step - Ebook
 
Html5
Html5Html5
Html5
 
Html5
Html5Html5
Html5
 
CSS and CSS3
CSS and CSS3CSS and CSS3
CSS and CSS3
 
Ease into HTML5 and CSS3
Ease into HTML5 and CSS3Ease into HTML5 and CSS3
Ease into HTML5 and CSS3
 
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
Rich and Beautiful: Making Attractive Apps in HTML5 [Wpg 2013]
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
Front end full stack development module 1pptx
Front end full stack development module 1pptxFront end full stack development module 1pptx
Front end full stack development module 1pptx
 

More from Graham Armfield

Useful Accessibility Tools Version 3 - Jul 2021
Useful Accessibility Tools Version 3 - Jul 2021Useful Accessibility Tools Version 3 - Jul 2021
Useful Accessibility Tools Version 3 - Jul 2021
Graham Armfield
 
So how do i know if my wordpress website is accessible - WordPress Accessibil...
So how do i know if my wordpress website is accessible - WordPress Accessibil...So how do i know if my wordpress website is accessible - WordPress Accessibil...
So how do i know if my wordpress website is accessible - WordPress Accessibil...
Graham Armfield
 
Useful Accessibility Tools - WordCamp Brighton
Useful Accessibility Tools - WordCamp BrightonUseful Accessibility Tools - WordCamp Brighton
Useful Accessibility Tools - WordCamp Brighton
Graham Armfield
 
Accessibility Hacks Version 2
Accessibility Hacks Version 2Accessibility Hacks Version 2
Accessibility Hacks Version 2
Graham Armfield
 
Useful Accessibility Tools - WP Pompey April 2019
Useful Accessibility Tools - WP Pompey April 2019Useful Accessibility Tools - WP Pompey April 2019
Useful Accessibility Tools - WP Pompey April 2019
Graham Armfield
 
How to Build an Accessible WordPress Theme
How to Build an Accessible WordPress ThemeHow to Build an Accessible WordPress Theme
How to Build an Accessible WordPress Theme
Graham Armfield
 
Useful Accessibility Tools
Useful Accessibility ToolsUseful Accessibility Tools
Useful Accessibility Tools
Graham Armfield
 
Assistive technology Demo WordCamp Bristol
Assistive technology Demo WordCamp BristolAssistive technology Demo WordCamp Bristol
Assistive technology Demo WordCamp Bristol
Graham Armfield
 
Designing for Accessibility - WordCamp London 2017
Designing for Accessibility - WordCamp London 2017Designing for Accessibility - WordCamp London 2017
Designing for Accessibility - WordCamp London 2017
Graham Armfield
 
Designing for Accessibility - Front End North - September 2016
Designing for Accessibility - Front End North - September 2016Designing for Accessibility - Front End North - September 2016
Designing for Accessibility - Front End North - September 2016
Graham Armfield
 
Obscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite UsefulObscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite Useful
Graham Armfield
 
Themes Plugins and Accessibility - WordCamp London March 2015
Themes Plugins and Accessibility - WordCamp London March 2015Themes Plugins and Accessibility - WordCamp London March 2015
Themes Plugins and Accessibility - WordCamp London March 2015
Graham Armfield
 
Can WordPress help make the web more accessible - eaccess15 - Feb 2015
Can WordPress help make the web more accessible - eaccess15 - Feb 2015Can WordPress help make the web more accessible - eaccess15 - Feb 2015
Can WordPress help make the web more accessible - eaccess15 - Feb 2015
Graham Armfield
 
Themes, Plugins and Accessibility
Themes, Plugins and AccessibilityThemes, Plugins and Accessibility
Themes, Plugins and Accessibility
Graham Armfield
 
Wordpress and Web Accessibility Wordcamp UK 2014
Wordpress and Web Accessibility Wordcamp UK 2014Wordpress and Web Accessibility Wordcamp UK 2014
Wordpress and Web Accessibility Wordcamp UK 2014
Graham Armfield
 
So What is This Thing Called WordPress?
So What is This Thing Called WordPress?So What is This Thing Called WordPress?
So What is This Thing Called WordPress?
Graham Armfield
 
So How Do I Know if My Website is Accessible?
So How Do I Know if My Website is Accessible?So How Do I Know if My Website is Accessible?
So How Do I Know if My Website is Accessible?
Graham Armfield
 
Handling User Generated Content in WordPress
Handling User Generated Content in WordPressHandling User Generated Content in WordPress
Handling User Generated Content in WordPress
Graham Armfield
 
So, How Do I Know if my WordPress Website is Accessible?
So, How Do I Know if my WordPress Website is Accessible?So, How Do I Know if my WordPress Website is Accessible?
So, How Do I Know if my WordPress Website is Accessible?
Graham Armfield
 
Web Accessibility: What it is, Why it's important
Web Accessibility: What it is, Why it's importantWeb Accessibility: What it is, Why it's important
Web Accessibility: What it is, Why it's important
Graham Armfield
 

More from Graham Armfield (20)

Useful Accessibility Tools Version 3 - Jul 2021
Useful Accessibility Tools Version 3 - Jul 2021Useful Accessibility Tools Version 3 - Jul 2021
Useful Accessibility Tools Version 3 - Jul 2021
 
So how do i know if my wordpress website is accessible - WordPress Accessibil...
So how do i know if my wordpress website is accessible - WordPress Accessibil...So how do i know if my wordpress website is accessible - WordPress Accessibil...
So how do i know if my wordpress website is accessible - WordPress Accessibil...
 
Useful Accessibility Tools - WordCamp Brighton
Useful Accessibility Tools - WordCamp BrightonUseful Accessibility Tools - WordCamp Brighton
Useful Accessibility Tools - WordCamp Brighton
 
Accessibility Hacks Version 2
Accessibility Hacks Version 2Accessibility Hacks Version 2
Accessibility Hacks Version 2
 
Useful Accessibility Tools - WP Pompey April 2019
Useful Accessibility Tools - WP Pompey April 2019Useful Accessibility Tools - WP Pompey April 2019
Useful Accessibility Tools - WP Pompey April 2019
 
How to Build an Accessible WordPress Theme
How to Build an Accessible WordPress ThemeHow to Build an Accessible WordPress Theme
How to Build an Accessible WordPress Theme
 
Useful Accessibility Tools
Useful Accessibility ToolsUseful Accessibility Tools
Useful Accessibility Tools
 
Assistive technology Demo WordCamp Bristol
Assistive technology Demo WordCamp BristolAssistive technology Demo WordCamp Bristol
Assistive technology Demo WordCamp Bristol
 
Designing for Accessibility - WordCamp London 2017
Designing for Accessibility - WordCamp London 2017Designing for Accessibility - WordCamp London 2017
Designing for Accessibility - WordCamp London 2017
 
Designing for Accessibility - Front End North - September 2016
Designing for Accessibility - Front End North - September 2016Designing for Accessibility - Front End North - September 2016
Designing for Accessibility - Front End North - September 2016
 
Obscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite UsefulObscure Wordpress Functions That Are Actually Quite Useful
Obscure Wordpress Functions That Are Actually Quite Useful
 
Themes Plugins and Accessibility - WordCamp London March 2015
Themes Plugins and Accessibility - WordCamp London March 2015Themes Plugins and Accessibility - WordCamp London March 2015
Themes Plugins and Accessibility - WordCamp London March 2015
 
Can WordPress help make the web more accessible - eaccess15 - Feb 2015
Can WordPress help make the web more accessible - eaccess15 - Feb 2015Can WordPress help make the web more accessible - eaccess15 - Feb 2015
Can WordPress help make the web more accessible - eaccess15 - Feb 2015
 
Themes, Plugins and Accessibility
Themes, Plugins and AccessibilityThemes, Plugins and Accessibility
Themes, Plugins and Accessibility
 
Wordpress and Web Accessibility Wordcamp UK 2014
Wordpress and Web Accessibility Wordcamp UK 2014Wordpress and Web Accessibility Wordcamp UK 2014
Wordpress and Web Accessibility Wordcamp UK 2014
 
So What is This Thing Called WordPress?
So What is This Thing Called WordPress?So What is This Thing Called WordPress?
So What is This Thing Called WordPress?
 
So How Do I Know if My Website is Accessible?
So How Do I Know if My Website is Accessible?So How Do I Know if My Website is Accessible?
So How Do I Know if My Website is Accessible?
 
Handling User Generated Content in WordPress
Handling User Generated Content in WordPressHandling User Generated Content in WordPress
Handling User Generated Content in WordPress
 
So, How Do I Know if my WordPress Website is Accessible?
So, How Do I Know if my WordPress Website is Accessible?So, How Do I Know if my WordPress Website is Accessible?
So, How Do I Know if my WordPress Website is Accessible?
 
Web Accessibility: What it is, Why it's important
Web Accessibility: What it is, Why it's importantWeb Accessibility: What it is, Why it's important
Web Accessibility: What it is, Why it's important
 

Recently uploaded

一比一原版(city毕业证书)英国剑桥大学毕业证如何办理
一比一原版(city毕业证书)英国剑桥大学毕业证如何办理一比一原版(city毕业证书)英国剑桥大学毕业证如何办理
一比一原版(city毕业证书)英国剑桥大学毕业证如何办理
taqyea
 
Cyber Security Course & Guide. X.GI. pdf
Cyber Security Course & Guide. X.GI. pdfCyber Security Course & Guide. X.GI. pdf
Cyber Security Course & Guide. X.GI. pdf
RohitRoshanBengROHIT
 
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
taqyea
 
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
taqyea
 
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
taqyea
 
How to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer ExperienceHow to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer Experience
Serva AppLabs
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
taqyea
 
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
taqyea
 
About Alibaba company and brief general information regarding how to trade on...
About Alibaba company and brief general information regarding how to trade on...About Alibaba company and brief general information regarding how to trade on...
About Alibaba company and brief general information regarding how to trade on...
Erkinjon Erkinov
 
10th International Conference on Networks, Mobile Communications and Telema...
10th International Conference on Networks, Mobile Communications and   Telema...10th International Conference on Networks, Mobile Communications and   Telema...
10th International Conference on Networks, Mobile Communications and Telema...
ijp2p
 
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
taqyea
 
Quiz Quiz Hota Hai (School Quiz 2018-19)
Quiz Quiz Hota Hai (School Quiz 2018-19)Quiz Quiz Hota Hai (School Quiz 2018-19)
Quiz Quiz Hota Hai (School Quiz 2018-19)
Kashyap J
 
Megalive99 Situs Betting Online Gacor Terpercaya
Megalive99 Situs Betting Online Gacor TerpercayaMegalive99 Situs Betting Online Gacor Terpercaya
Megalive99 Situs Betting Online Gacor Terpercaya
Megalive99
 
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
taqyea
 
University of Otago degree offer diploma Transcript
University of Otago degree offer diploma TranscriptUniversity of Otago degree offer diploma Transcript
University of Otago degree offer diploma Transcript
ubufe
 
Bai-Tập-Tiếng-Anh-On-Tập-He lớp 1- lớp 5 hot nhất
Bai-Tập-Tiếng-Anh-On-Tập-He lớp 1- lớp 5  hot nhấtBai-Tập-Tiếng-Anh-On-Tập-He lớp 1- lớp 5  hot nhất
Bai-Tập-Tiếng-Anh-On-Tập-He lớp 1- lớp 5 hot nhất
Thiên Đường Tình Yêu
 
一比一原版(aber毕业证)亚伯大学毕业证如何办理
一比一原版(aber毕业证)亚伯大学毕业证如何办理一比一原版(aber毕业证)亚伯大学毕业证如何办理
一比一原版(aber毕业证)亚伯大学毕业证如何办理
taqyea
 
Future Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on WebsitesFuture Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on Websites
Serva AppLabs
 
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
taqyea
 
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
ffg01100
 

Recently uploaded (20)

一比一原版(city毕业证书)英国剑桥大学毕业证如何办理
一比一原版(city毕业证书)英国剑桥大学毕业证如何办理一比一原版(city毕业证书)英国剑桥大学毕业证如何办理
一比一原版(city毕业证书)英国剑桥大学毕业证如何办理
 
Cyber Security Course & Guide. X.GI. pdf
Cyber Security Course & Guide. X.GI. pdfCyber Security Course & Guide. X.GI. pdf
Cyber Security Course & Guide. X.GI. pdf
 
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
一比一原版(ucb毕业证书)英国伯明翰大学学院毕业证如何办理
 
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
 
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
 
How to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer ExperienceHow to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer Experience
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
一比一原版(uom毕业证)曼彻斯特大学毕业证如何办理
 
About Alibaba company and brief general information regarding how to trade on...
About Alibaba company and brief general information regarding how to trade on...About Alibaba company and brief general information regarding how to trade on...
About Alibaba company and brief general information regarding how to trade on...
 
10th International Conference on Networks, Mobile Communications and Telema...
10th International Conference on Networks, Mobile Communications and   Telema...10th International Conference on Networks, Mobile Communications and   Telema...
10th International Conference on Networks, Mobile Communications and Telema...
 
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
 
Quiz Quiz Hota Hai (School Quiz 2018-19)
Quiz Quiz Hota Hai (School Quiz 2018-19)Quiz Quiz Hota Hai (School Quiz 2018-19)
Quiz Quiz Hota Hai (School Quiz 2018-19)
 
Megalive99 Situs Betting Online Gacor Terpercaya
Megalive99 Situs Betting Online Gacor TerpercayaMegalive99 Situs Betting Online Gacor Terpercaya
Megalive99 Situs Betting Online Gacor Terpercaya
 
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
 
University of Otago degree offer diploma Transcript
University of Otago degree offer diploma TranscriptUniversity of Otago degree offer diploma Transcript
University of Otago degree offer diploma Transcript
 
Bai-Tập-Tiếng-Anh-On-Tập-He lớp 1- lớp 5 hot nhất
Bai-Tập-Tiếng-Anh-On-Tập-He lớp 1- lớp 5  hot nhấtBai-Tập-Tiếng-Anh-On-Tập-He lớp 1- lớp 5  hot nhất
Bai-Tập-Tiếng-Anh-On-Tập-He lớp 1- lớp 5 hot nhất
 
一比一原版(aber毕业证)亚伯大学毕业证如何办理
一比一原版(aber毕业证)亚伯大学毕业证如何办理一比一原版(aber毕业证)亚伯大学毕业证如何办理
一比一原版(aber毕业证)亚伯大学毕业证如何办理
 
Future Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on WebsitesFuture Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on Websites
 
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)英国爱丁堡大学毕业证如何办理
 
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
 

Accessibility Hacks Wordcamp Manchester October 2018

  • 1. @coolfields1 Accessibility Hacks For life's little inaccessible moments…
  • 2. @coolfields A bit about me 2 I’m a… • Web Accessibility Consultant • WordPress Developer Photo by Mike Pead
  • 3. @coolfields What I'm going to cover Some small tweaks we can make when building accessible WP themes for ourselves and our clients. Specifically I'll be looking at: • Using SVG images in an accessible way. • CSS techniques that help with accessibility.
  • 4. @coolfields Using SVG • SVG images are vector graphics, as opposed to raster or bitmapped images like jpeg, png or gif. • SVG images are described by the lines and blocks and other shapes, combined to make up an entire images. • This means that they can be infinitely scaled without any pixellation. • And the file sizes are generally smaller than corresponding jpeg, png or gif. • But can they be accessed by assistive technology users?
  • 6. @coolfields Adding SVG files to web pages Uses the trusty <img> element with the alt attribute to give the accessible label… <img src="https://path/images/home.svg" alt="My logo"> So we're done here aren't we??
  • 7. @coolfields Using role="img" with SVG files Well, SVG support within screen reader is still in its infancy, so we need a helping hand from ARIA here... <img src="https://path/images/home.svg" alt="My logo" role="img"> This ensures that all screen readers can 'see' this image.
  • 8. @coolfields SVG files as links Now the destination is the important bit, so that's what the alt attribute should refer to. <a href="/"> <img src="https://path/images/home.svg" role="img" alt="Home Page"> </a>
  • 9. @coolfields SVG Hack 2 - Inline SVG
  • 10. @coolfields Inline SVG in web pages Example of inline SVG… <svg version="1.1" width="100" height="75"> <rect width="75" height="50" rx="20" ry="20" fill="#90ee90" stroke="#228b22" stroke-fill="1" /> </svg>
  • 11. @coolfields The challenge of inline SVG… • Inline SVG is invisible to screen readers • There is no <img> element • And there is no alt attribute you can use to give it some alternate text.
  • 12. @coolfields Using <title> with inline SVG To solve the issue, use the <title> element within the <svg> wrapper. But also, connect it with the aria-labelledby attribute so all screen readers can access the text in the <title> element. And we still need the role="img" too.
  • 13. @coolfields Using <title> with inline SVG So we end up with this… <svg version="1.1" width="100" height="75" aria- labelledby="title" role="img"> <title id="title">Green rectangle</title> <rect width="75" height="50" rx="20" ry="20" fill="#90ee90" stroke="#228b22" stroke-fill="1" /> </svg>
  • 14. @coolfields Using <title> with inline SVG Using the <title> element in <svg> container has an unexpected effect in some browsers… A hover over tooltip. A bit like you get with the title attribute on other HTML elements...
  • 15. @coolfields Using <desc> with inline SVG So alternatively, use <desc> element within the <svg> wrapper. Once again, use aria-labelledby. <svg version="1.1" width="100" height="75" aria- labelledby="desc01" role="img"> <desc id="desc01">Green rectangle</desc> <rect width="75" height="50" rx="20" ry="20" fill="#90ee90" stroke="#228b22" stroke-fill="1" /> </svg>
  • 16. @coolfields Inline SVG in web pages How do screen readers interpret this?
  • 17. @coolfields Inline SVG and links What if your inline SVG needs to be a link?
  • 18. @coolfields Inline SVG and links Best solution - wrap link around SVG <a href="/"> <svg version="1.1" width="100" height="75" aria- labelledby="desc01" role="img"> <desc id="desc01">Home page</desc> <rect width="75" height="50" rx="20" ry="20" fill="#90ee90" stroke="#228b22" stroke-fill="1" /> </svg> </a>
  • 19. @coolfields The difference for screen readers How do screen readers interpret all this?
  • 20. @coolfields Getting SVG into WordPress pages • No native support for SVG in Media Manager. • We'd need to paste SVG into pages/posts. • Or need to rely on a plugin… • There are a few available, but these next two seem the most popular. • But can they give us accessible SVG??
  • 21. @coolfields SVG Support plugin https://wordpress.org/plugins/svg-support/ Does not include role in <img> tag, but does include alt. Does not include role in <svg> tag, does not include <title> element in inline SVG. Plugin author is aware and has responded positively to my comments: https://wordpress.org/support/topic/suggestions-for-improving- accessibility/
  • 22. @coolfields Safe SVG plugin https://wordpress.org/plugins/safe-svg/ Does not include role in <img> tag, but does include alt. Does not cater for inline SVG. Plugin author contacted very recently.
  • 23. @coolfields CSS Accessibility Hacks CSS techniques can be used to help ensure accessibility within websites: • Providing extra context for links, buttons and other elements • Help with testing accessibility during theme development • Accessibility help for content authors once a site is live
  • 24. @coolfields CSS Hack 1 - Screen reader text
  • 25. @coolfields Why screen reader text What's it for? A way of providing extra information for screen reader users that is not seen by sighted users. Can be used to: • Provide real text when icons are used • Provide skip links • Disambiguate links like 'Read more' on a blog index page
  • 26. @coolfields How to use screen reader text Define a class in your CSS .accessibleHidden{ border: 0; clip: rect(0 0 0 0); height: 1px; width: 1px; margin: -1px; padding: 0; overflow: hidden; position: absolute !important; }
  • 27. @coolfields How to use screen reader text Use the class in your HTML <span class="accessibleHidden">This is hidden from sighted users, but accessible by screen readers</span> Don't use these styles, as they will hide content from screen readers as well: • display:none • visibility:hidden
  • 28. @coolfields It's used in WordPress themes
  • 29. @coolfields It's used in WordPress admin Screen reader text can be found in the WP admin screens.
  • 30. @coolfields Wouldn't aria-label do the same? To a point, yes. aria-label can be used on elements with set roles - like links, buttons, dialogues, etc. But aria-label won't work for plain text items… • Alternatives to icons in product comparison tables • Explaining what values mean on pages.
  • 31. @coolfields32 CSS Hack 2 - Testing accessibility during development
  • 32. @coolfields Ensuring landmarks are used properly Wait, landmarks? What are they? • A way of defining discrete regions of a page. • For example banner, navigation, main content, etc. • Increasingly used by screen reader users to help them navigate around pages. • Sometimes indicated by role="navigation", role="main", etc
  • 33. @coolfields Ensuring landmarks are used properly And if you think you're not using them, you probably are anyway - if you use these HTML5 elements: • <nav> • <main> and in certain situations… • <header>, <footer> • <section>, <article> These are all understood as landmarks, by screen readers.
  • 34. @coolfields Ensuring landmarks are used properly <header role="banner"> <nav role="navigation"> <footer role="contentinfo"> <main role="main"> <aside role= "complementary"> <form role="search">
  • 35. @coolfields Ensuring landmarks are used properly The key thing is if you're using them, they need to be used properly. And all content on the page needs to be in at least one landmark, or screen reader users may miss key bits. You can use a browser extension to highlight the landmarks on a page, but it's not always possible to see whether or not all content is within one.
  • 36. @coolfields Enter accessibility.css In your dev environment you could have a CSS file that could be temporarily attached to your pages - say accessibility.css…
  • 37. @coolfields accessibility.css main, nav, header, footer, section[aria-labelledby], section[aria-label], form[aria- labelledby], form[aria-label], [role="banner"], [role="navigation"], [role="main"], [role="contentinfo"], [role="complementary"], [role="search"], [role="form"], [role="region"][aria-label], [role="region"][aria-labelledby] { background-color: rgba(255,0,0,0.1); outline:3px solid red; color:#000; }
  • 38. @coolfields accessibility.css Now we want to 'unselect' <header> and <footer> elements that are contained within <main>, <article>, <nav> and <section> - these are not counted as landmarks by browsers and screen readers. main header, article header, aside header, nav header, section header, main footer, article footer, aside footer, nav footer, section footer { background-color: transparent; outline:none; }
  • 39. @coolfields What does that look like? Note that the breadcrumb navigation is not contained within any of the landmarks.
  • 40. @coolfields So what else could we do? Images without alt attributes: img:not([alt]) { outline: solid 3px red; } SVG files without the role="img" attribute: img[href$=".svg"]:not([role="img"]) { outline: solid 3px red; }
  • 41. @coolfields So what else could we do? Empty links: a:not([name]):empty { outline: solid 3px red; } Empty buttons: button:empty { outline: solid 3px red; }
  • 42. @coolfields So what else could we do? Images where the title attribute has been used: img[title] { outline: solid 3px red; }
  • 43. @coolfields So what else could we do? Links with title attributes, or that open a new window: a[title], a[target] { outline: solid 3px gold; } Images with empty alt attributes: img[alt=""] { outline: solid 3px gold; }
  • 44. @coolfields What does that look like? Link with title attribute present Button with no content
  • 45. @coolfields46 CSS Hack 3 - Helping your content authors get things right
  • 46. @coolfields Content authors can spoil the party A WordPress website with a fully accessible theme won't stay accessible for long if your content authors aren't aware how they can affect accessibility of pages and posts. Examples: • Empty headings • Forgetting to add meaningful alternate text for images • Links that open a new window/tab • Links with title attributes So how can CSS help here?
  • 47. @coolfields Hooking into post/page preview Most content authors will preview their posts or pages before submitting them for review or putting them live. So let's have some diagnostic CSS definitions in our main CSS file that will show up when users preview. Sadly, there is no 'preview' class that is included in the <body> element by default. But we could use the 'logged-in' class…
  • 49. @coolfields Adding some warnings with CSS… Looking for images with blank alt attribute, and links that open a new window. .logged-in img[alt=""], .logged-in a[target] { outline: solid 3px gold; }
  • 50. @coolfields More serious issues… .logged-in a[title], .logged-in img:not([alt]), .logged-in img[title], .logged-in img[src$=".svg"]:not([role="img"]), .logged-in svg:not([role="img"]) { outline: solid 3px red; }
  • 51. @coolfields Empty elements h1:empty, h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, a:not([name]):empty, button:empty { display:block; position:relative; min-width: 5em; min-height: 1em; outline: solid 3px red; }
  • 52. @coolfields Going even further… h1:empty::after, h2:empty::after, h3:empty::after, h4:empty::after, h5:empty::after, h6:empty::after { position: absolute; outline: solid 3px red; min-width: 10px; min-height: 1em; top: 0; color: red; content: "Empty Header"; }
  • 53. @coolfields So let's try it out Link with title attribute present Image with empty alt attribute Link that opens new window Empty header
  • 54. @coolfields What else could we do? • Empty table cells - especially if header cells. • Over to you…
  • 55. @coolfields Thanks for listening Any questions? graham.armfield@coolfields.co.uk @coolfields 56

Editor's Notes

  1. I work with organisations to help them improve the accessibility of their digital offerings. Do accessibility testing and guide designers and developers in solutions to the issues found. WordPress developer – have built many accessible websites using WordPress. I've delivered presentations to WordCamps in London, Sheffield, Edinburgh, Lancaster, Bournemouth – and a number of WordPress meetup groups. This is me in Sheffield a couple of years ago. The presentation is called So, How Do I Know if My WordPress Website is Accessible and focusses on easy accessibility tests that you can do on your own WordPress website. If you've not seen me do that one – and I know that some of you have - the slides are still on Slideshare , and the deck has been viewed over 12,000 times now.