ah teaches web design & development (Usefulness lecture)

Usefulness

Lecture outline

More depth on accessibility and usability online. Lecture slides will be made available on the day of the lecture (Oct 27).

Teamwork reflection

While we wait for folks to arrive please:

  1. Grab a teamwork reflection form from the front of the class.
  2. Grab a seat separate from your teammate.
  3. Fill in the teamwork reflection and submit it back at the front.

Usefulness

Where usability meets utility

P2 Scope

Just some reminders

We are expecting the site to be built out fully, with no broken links, but:

  • Only showing us 2-3 items (and having all other links direct to those items) is ok
  • Only showing us one flow through the purchase process (and having all links direct there) is ok
  • Having forms act as links instead of actually collecting information is ok
  • Duplicated content such as the same product image (x20) is not ok

Usefulness vs Usability

Including utility

Nielsen Norman Group and usability:

Moving Up

Experiencing an interface

Maslow's hierarchy of needs converted to web-design consideration

Designing for Emotion (Walter, 2011)

Functional

The user must be able to complete their task.

Utility Concerns

The user's revenge

0.1 second, 1 second and 10 seconds are the numbers to remember for, making something feel instantaneous, keeping the user's flow of thought, and keeping the user's attention.

"Response Times: the 3 Important Limits" (Nielsen Norman Group)

Accessibility

The web is built to be accessible by default, we tend to be the ones who break it.

Design Ethics

Considering your users

"...it is essential that the Web is accessible in order to provide equal access and equal opportunity to people with disabilities."
Social Factors in Developing Web Accessibility (W3C Web Accessibility Initiative)

Designing without your audience

"...when someone rushes to write about a subject they have not properly researched it can create problems that become difficult to shake off. It's like bad code. Once it's live, it can spread because people trust that the work was done in the first place to ensure it it right."
Dyslexic Myths Presented as Truths (Williams, 2021)

Tools for Accessibility

Some of what we use to access web content

Including (but not limited to):

Limitations to Senses

How these become affected

  1. Feeling: Muscular or fine-motor issues
  2. Seeing: Blind, colour-blind, dyslexia
  3. Hearing: Deafness

Web Content Accessibility Guidelines (WCAG)

These are guidelines meant to help keep the web accessible. There are three levels you can aim for:

Validator

WCAG Level-A (Beginner)

All the citeria for level-A accessibility:

Accessible SEO

Remember what Google sees...

"Google is blind. Google doesn't use a mouse. Google relies on structural cues in the content to make more sense of the page."
SEO and Accessibility Overlap by Liam McGee

Alts, Captions and Images

Key thing: use them

<figure>
<img src="Forms.jpg" alt="Four kittens sitting on a pillow looking off to the side" >
<figcaption>KITTEN!</figcaption>
</figure>

Closed Captioning

HTML offers us ways to embed accessible captioning for video or audio.

WEBVTT FILE

1
00:00:01.000 --> 00:00:03.000
[UPBEAT MUSIC STARTS]

2
00:00:14.024 --> 00:00:17.105
[ROWAN] My favourite thing about
SIAT is probably the vast array of

3
00:00:17.105 --> 00:00:19.091
really smart creative people here.

Keeping it Accessible

Some key points:

VirginAmerica.com Voiceover Demo

Using ARIA Roles

Accessible Rich Internet Applications (ARIA) roles provide further context for different elements. We only need to use them once existing semantics are insufficient.

<label for="search_box">Search:</label>
<input role="search" id="search_box" type="text">

<div aria-hidden="true" class="background_box"></div>

Further reading at Using WAI-ARIA Landmarks.

Keyboard Accessibility

a:hover { /* When we hover */ }
a:active { /* When we press down */ }
a:focus { /* When we select with a keyboard */ }

Touch Accessibility

Areas of touch accessibility on phones
Areas of touch accessibility on tablets
Areas of touch accessibility on laptops

"Responsive Navigation" (Luke Wroblewski)

Testing Accessibility

Tools of the trade

There are a variety of online tools for testing accessibility concerns — W3C has a good list — including things such as colour contrast, disabling javascript and keyboard navigability.

We cannot automate all accessibility testing. Next week we will do accessibility audits.

Reliable

The user must be able to complete their task, repeatedly.

Web Page Speed Testing

Responsive Images

The future of responsive images is aiming towards allowing the device to select resolution

<img src="original.jpg" srcset="low-res.jpg x1, 2x-res.jpg x2, 3x-res.jpg x3" alt="Photo of a kitten perched on a log">

Usability

The user must be able to complete their task with relative ease, repeatedly.

Inexpensive usability testing

Introducing heuristics

Nielsen's Heuristics

  1. Visibility of system status
  2. Match between system/real world
  3. User control and freedom
  4. Consistency and standards
  5. Error prevention
  6. Recognition rather than recall
  7. Flexibility and efficiency of use
  8. Aesthetic and minimalist design
  9. Help users recognize/diagnose/recover errors
  10. Help and documentation

"Ten Usability Heuristics" (Nielsen Normal Group)

Two different airline forms; one long and detailed, one brief and succinct

How do these effect efficiency of use? (Image from Luke Wroblewski)

P2: Company
JavaScript exercise

JavaScript (JS)

Today we will build ourselves a Javascript drop-down. There are some aspects of JavaScript we should talk about before getting into using it.

Think of each file as a program

Thinking of each JS file as a separate program can help to organize your enhancements, as well as keep them from breaking due to strange interactions.

Developer tools is your friend

You will not be able to effectively debug JS without the developer tools console. Always have it open when working on any JS for your website.

Know your DOM and selectors

You need to know what you are selecting, and how we move through the DOM.

<!-- How could we select the second <a> tag in CSS? -->
<div class="column">
<nav id="navi-main">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
</nav>
</div>

Progressively enhance

The page should work with or without JS. Some examples:

JS syntax

/* Variables and values */
let variable_name = value;
let string_to_output = 'Hello world!';

/* Data types */
let string_variable = 'A string';
let number_variable = 10;
let boolean_variable = true;
let array_variable = ['Array','of','values'];
let object_variable = document.querySelector('.second-link');

/* Objects and methods */
object.method(arguments);
console.log('Message for the console');

/* Variables and properties */
const object_property = object.property; // A variable we cannot change the value of
const second_link_html = second_link.innerHTML;

Today's tutorial

What we will need to do:

  1. Output messages to the console
  2. Create variables
  3. Capture HTML elements in variables
  4. Change HTML attribute values
  5. Change CSS classes
  6. If/then statements
1/1