Skip to content

Tag: design

A11y 101: 1.4.5 Images of Text

I’ve been in developing websites for over twenty years. When I started in the industry, we had to create images of text if we wanted to use a specific font. This was necessary to make things work the way we wanted visually.

The problem of images of text is that screen readers can’t see the text. Like other images we need to provide alt text that reflects the text in the image. It was early in my career, so I tried to find a way to write. I used individual PNGs of letters with the alt text set to that letter. What I didn’t fully understand was assistive technology. My attempted method ended up with the AT announcing each letter. This is because they read each image as a separate unit of text. Spelling my name would be announced as, “N image, A image, T image.” This doesn’t help anyone.

20 years later…

The folks at the W3C’s CSS working group have been working overtime. They have provided us ways to import fonts from CDNs. We have the ability to clip with text. Drop shadows, gradients, transforms provide additional customization.

We also have SVGs. They allow us to put text directly into an image as text. This text is available to AT. This allows us to put stylized text on a path for display.

And…

We do not need to put text in our images anymore. And I’m not referring to logos. That another can of worms. We have multiple ways to add stylized text with unique fonts. We don’t need to use text in images anymore. Just don’t do it.

But…

I know what you are thinking, “My current platform doesn’t allow me to…” or “That requires me to work with IT to make changes and I don’t have many hours…”

There are always constraints. What I described earlier is a best case scenario where all conditions are right to make this problem go away. But that’s not how life works. You will need to use a custom font as an image of text at some point.

And it isn’t difficult. We treat it just like we do with other images. We use alternative text to supplement the image with a text equivalent. In the case of text in an image, that includes all the text.

If you alt text is over 150 characters, I want you to pause. When alt text gets really long it can overwhelm some users. Neuro-typical brains will probably be fine. But neuro-divergent users will have problems. This may be an area where you can break up the image into smaller images. Break the text up to match the images. You can also use figure and figcaption. Here, everything is wrapped in a figure. The alt text is placed on the image. The figcaption contains the rest of the explanatory text.

<figure>
  <img src="https://placekitten.com/200/300" alt="Text in the image." />
  <figcaption>The remainder of the the text described in the image to complete the message needed to express things.</figcaption>
</figure>

And the most important tip I can leave you with is:

Always put sentence ending punctuation at the end of your alt text.

When you don’t use closing punctuation, most AT browser combos will start reading the next item. They will read it as if it were a run-on sentence. This causes added confusion. With the punctuation in place, the AT will pause or announce the punctuation. This is determined by the user’s settings. In either case, the user understands the concepts better without the run-on sentence.

Have some thoughts on this topic? Let’s talk over on LinkedIn and BlueSky!

2 Comments

A11y 101: 1.4.4 Resize Text

Unless you have bionic eyes, at one point or another a computer screen will become difficult to read. For most of us, we’ll reach for glasses or call to make an appointment for an eye exam. But at some point, the glasses just aren’t enough.

I just got my first pair of bifocals. I’ve been using two pairs of glasses – one for distance and one for reading. Before I got the bifocals I had already increased the resolution of my monitor to 125%. All of this to put less strain on my eyes while reading.

And that is the core reason for 1.4.4 Resize Text.

Following WCAG’s QuickRef, we see:

Except for captions and images of text, text can be resized without assistive technology up to 200 percent without loss of content or functionality.

Without assistive technology our digital assets need to increase their font size to 200%. PDFs you can zoom in on to increase the font size. To test in a browser, press CTRL or CMD and the Plus key. The browser will show you the zoom level as you do this.

Now with the page zoomed to 200%, we need to look for the following:

  • Are any controls hidden or otherwise inaccessible?
  • Is any content cut off?
  • Do I need to scroll in two dimensions?
  • Is the design broken?

You should have no problems if you’ve ensured that your fonts and containers use relative sizing like EM, REM, or percentage. This also includes viewport width or height. Text and containers will resize smoothly.

It’s 2025. Not all applications are feasible on mobile, but we need to rid ourselves of this thinking. It’s 2025 and there are so many screens in the world, we will never know what the user has. We must make our interfaces flexible. Responsive design is not “feature” we add on to be nice. It is a requirement.

Users with low vision don’t start with third-party assistive tech. They start with what they can adjust on their device. When they zoom in from 1280×1024 to 200%, the view should match what is seen on a mobile device. Comparatively, this device would have a 640×512 pixel resolution.

Enjoy this post? Have questions on it? Find me on LinkedIn and BlueSky!

2 Comments

A11y 101: 1.4.3 Contrast (Minimum)

One of the most common issues I see when testing is the content not having enough contrast. With 1.4.3, we’re focus on the contrast of text. This can be text in an image or just on the page. Later we’ll talk about the contrast of active controls in 1.4.11.

Designers commonly complain that they can’t design with the restrictions that WCAG has in place for contrast. At the same time the great designers love restrictions. So your reception will vary when you work with a designer. Remember, they don’t get a choice about adhering to the contrast levels set out.

Defining Contrast

Outlined in WCAG, we have two contrast levels we need to look out for text. We divide text into “normal” or “body” text and “large” text. Body text is all text smaller than 18 point and not bold. If it is bold, it can be as small as 14 point. Everything bigger than that is large text.

This is body text at 14 point.

This is large text, bold at 14 point.

This is large text at 18 point.

1 point does not equal 1 pixel.
1 point is actually 1.3 CSS pixels.

If you are like me, you are looking at those blocks thinking that they don’t look like 14 and 18 pixels. Heck, this body text looks the same size as the 18 point. Well that is because I use a larger than normal font for easier reading. Additionally, 1 point does not equal 1 pixel. 1 point is actually 1.3 CSS pixels. This means 14 point is really 19 rendered pixels. Eighteen point comes out to 24 pixels.

How do we determine what size it is?

In Chrome and Firefox, the web inspector tools offer a “Computed” section. After highlighting the element in the code, switch to the computed tab and look for font-size. This will show the rendered pixel height regardless of what measurement you used to set the size. In addition to points, font sizes can be set with EM, REM, pixel, percentage, viewport height and width, just to name the most common.

Chrome's developer tools opened to the Computed tab. It shows a list of CSS properties and their values, including font-size set to 14.4px.

What are the contrast levels?

Now that we know how to measure our fonts, let’s look at the contrast levels. We have two remember. One for body text and one for large text. For body text, the contrast ratio is 4.5:1. For large text the contrast ratio is 3:1. There are many contrast checkers on the market, so feel free to find one and use it.

My personal favorite is Level Access’s Accessible Color Picker for Chrome. Full disclosure, I currently work for Level Access. However, I’m not pitching the company. This color contrast tester not only provides the contrast and if it passes A, AA, or AAA, but is also helps guide you to fixing the colors.

Level Access's Accessible Color Picker

On the side of the contrast values is a five by five grid. Your picked colors are in the middle. If you move up or down in the grid, options are shown for your background. Moving left or right in the grid changes the foreground. These options may have better contrast.

As a developer using this tool, I look for contrast pairs that don’t work. When I find an issue, I will suggest a color combo from these suggestions that does work. Then the designer just needs to approve, moving the process forward.

What is APCA?

The WCAG is imperfect. It is a volunteer organization of hundreds trying their best to develop accessible rules the majority can agree on. On of the flaws is in the algorithm for finding contrast. There are combos that fall below WCAG standards that are no issue for people with color blindness. There are also combos that meet the criteria, but are unusable because they irritate eyes.

When the efforts to bring WCAG to the next level beyond 2.2, those involved began investigating other contrast algorithms. APCA is one of those. It looks like it will be how we evaluate contrast in the future. However, if you are building a website today it doesn’t matter. The current rules and laws all point back to WCAG 2.x and the algorithm used in that is not APCA. To comply with the current law, you must test colors under the current algorithm. This is true even if you use APCA to choose your colors. If you can use combos that pass both, you are future protecting yourself.

Have questions on this topic? Find me on LinkedIn and BlueSky to chat!

2 Comments

A11y 101: 1.4.1 Use of Color

Color is important. Color allows us to discern whether our fruit is ripe. We use color to control traffic. We spend time in school teaching kids their colors. We ask them to “Identify the red one.” But not all of us see color the same way, and some can’t see it at all. We cannot rely on it to be the sole means of communication.

A little color theory

Light hits an object, and the object applies a filter. This filter absorbs or reflects bands of the light spectrum. The filter is influenced by the materials used to make the object. This could be a pigment, but blue pigment is very rare in nature. When you see blue in animals, it is usually due to the structure not blocking blue light.

The eyes are made up of cones that absorb light. Humans have 3 cones, red, blue, and green. How much light hits each cone type also helps determine the color. Imagine a brand new tennis ball in full light glowing neon yellow. What happens if we cut the light in half? Is it still neon yellow? What if there is just enough light to see the ball? What color is it then?

Or was the tennis ball really neon green? Color blindness is the result of damage to the cones or them not fully developing. There are brain and optical nerve injuries that can cause it as well. To put it short:

My navy blue is not the same as your navy blue.

Trying not to put the horse before Decartes, but our brains are amazing machines. It takes in a extreme volume of stimuli and builds the world around us. While we teach each other a standard that allows us to participate in a society. But when you view blue (or any color), you don’t just get blue light, you get color influence. The colors surrounding your object will change how the colors appear.

These two circles are the same color. But they don’t look like it due to the backgrounds.

Two grey circles of the same color against different backgrounds. One background is pink and the other is purple.

My wife has suffered several strokes and TBIs. We don’t see the same colors. It’s especially noticeable in the transition zones between colors. She asked me to grab something for her, but I couldn’t find it. She told me it was orange. Looking around I thought I found it, but it was red. She swears up and down it is orange. We’ve repeated this discussion with pinks, blues, and greens as well.

We each interpret colors differently. Therefore, it is vitally important that color is not the only way of communicating important information.

Like this article? Then please share. If you want to discuss it, find me on LinkedIn or BlueSky. If you liked my philosophical joke, leave a note and use the “polyphony.”

1 Comment

A11y 101: 1.3.4 Orientation

It’s not the 80’s. We don’t live in a world where “the fold” exists any longer. We’re not locked to a 4:3 viewing experience. Our movies are most commonly 16:9 ratio. Our TVs and phones have followed this pattern. In short, we need to pay attention to how our sites look on various screen dimensions. We won’t know what the viewer is using.

What does that mean though?

We need to be flexible in our designs. Most of the time when we design a website or application we do so with a primary orientation. For all devices other than tablets and phones, this is in landscape mode. But for phones and tablets we primarily design for the portrait mode.

There are times when a user may have their device stuck in a position that they are unable to change. When this situation occurs, if our design is locked into the Portrait orientation, we make it very difficult for some users. It would be much more usable in landscape for this moment or by the user. Therefore we should make it work in both ways.

The primary example of this is someone using a mounted iPad on their wheelchair. They could have it in portrait mode, yet not have the strength to turn the device.

Are there any exceptions?

But of course! There are certain tasks that the orientation can’t change. Usually you hear about digitally depositing checks. The thinking here is using the phone in landscape mode is required to get the right photo. This is a crap example. I can just as easily take that photo in landscape as long as I can square it in the view. A better example might be needing you to turn your phone landscape to read and interact with a chart. Another would be watching a video. If shot for mobile device apps like TikTok, it doesn’t work as well in portrait.

Mobile Apps

Mobile platforms have the ability to do dynamic layouts now. These layouts allow the user to change their display orientation without affecting their use of the product. However, using a dynamic layout requires you start coding with that in mind. Trying to fix the layout after the fact is much more difficult.

Have some thoughts you’d like to discuss? Maybe other exception examples? Reach out to me on BlueSky or LinkedIn.

1 Comment

A11y 101: 1.3.3 Sensory Characteristics

I have a bad habit of saying, “this is easy” or simple. It’ll only take a moment. Like I said, a bad habit that I try hard to break. Why? Just because it is easy to me doesn’t mean it is to you. I was about to start this off with, “This is pretty much straight forward and don’t reference anything requiring senses.”

And I realize, that this isn’t that simple. I’ve been doing this for over two decades as of this writing. Today may be your first day. English may not be your first language. Maybe you can’t relate to the idea of senses.

What do we mean by Sensory Characteristics?

All animals on the planet have the ability to experience their environment. They do this with their senses. Senses are built in detectors to assess our environment. In the accessibility industry, we create solutions. These solutions are for people who may have malfunctioning senses.

When we are little, we are taught about our 5 major senses: Sight, Taste, Touch, Hearing, and Scent. But we also have senses that can detect electrical stimuli, heat, cold, our awareness in space. If you tell someone to find the green button, you’ve violated the success criteria.

So how do we avoid it?

First, we make sure that everything has a proper accessible name. Next, we make sure it unique to the page we are on. It’s super easy to say, “click the submit button” in your instructions if there is only one submit button.

Of course we want to keep the page as simple as possible, so we probably won’t use instructions like that. We wouldn’t say, “click the triangle.” Instead, we should let the construction of the page tell us what to do next.

This looks like first coding the HTML so that if nothing else loads everything is presented and understandable. You can’t position items in a visual order or paint them pretty colors. You also can’t make them do magic. Therefore, we need to rely on the content itself. If your content can’t stand on it’s own, rewrite it.

With the content corrected, we can build out the site. Paint it, position it, then test it. Does it still make senses in the reading order? Focus order?

Lastly, teach the team. Make it an internal standard. Put in monitoring just in case someone makes a mistake.

Want to discuss this more? Come say hi on BlueSky and LinkedIn.

Comments closed

A11y 101: 1.3.2 Meaningful Sequence

The order of consumption of media affects its meaning.

As an 80s kid, I learned that the placement of a comma can change a sentence’s meaning. Of course we learned it through dirty jokes:

  • i helped my uncle jack off a horse
  • I helped my uncle Jack, off a horse.
  • I helped my uncle, jack off a horse.
  • I helped my uncle, Jack, off a horse.

Even the order makes a big difference:

  • I helped my uncle off a horse, Jack.
  • I helped Jack, my uncle, off a horse.

When we write and layout our document, we need to consider the rendered HTML and CSS. We also need to consider the HTML on its own. Some of your users will use tools to absorb the content in different manners.

We need to ensure a meaningful sequences when at the word, sentence, paragraph, article, and component level. We want to develop a meaningful order at the document level also. Usually we do this through landmarks or the use of headings to designate areas of the content. Depending on the relationships of the content, areas could dictate the understanding of the document. So does the header, footer, or main have to follow a certain order? Our instinct is to go header, main, footer. What if our HTML was Main, header, footer and we use CSS to visually move the navigation?

But should we?

Stepping in from the document level, there are things to consider within each component – visual presentation and content presentation. Look at these two cards:

See the Pen 1.3.2 Meaningful Sequence by Nat Tarnoff (@nattarnoff) on CodePen.

Without looking (I saw you look at the HTML tab), you might guess how this is coded. You’d likely think it is Card Title, CTA, image, paragraph, list. And you’d be pretty close. Next you’re thinking, “Ah, image first, that’s how cards are done.”

Both cards have this structure:

<div class="card" id="card1">
    <h2>Card Title</h2>
    <img src="https://placecats.com/millie_neo/300/200" alt="Millie & Neo resting on the cat tree."/>
    <p>Kool kats & kittens at the library!</p>
    <ul>
      <li>Where: Main Street Library</li>
      <li>When: 1pm to 4pm</li>
      <li>Day: Saturday 1/23</li>
    </ul>
    <button type="button">RSVP</button>
  </div>

We can move the content around using CSS. Are the details are more important than the image or the tagline? We try Title, Details, CTA, paragraph, and image. When we are at this stage of developing the code, it’s important to just focus on how the page reads. The two versions of the HTML do not effectively change the meaning of any of the content. Nor do they interfere with the visual display.

How do we fix the meaningful sequence?

We start by looking at individual pieces of content. Let’s start with a button. A button will fire an action, so I need to give it an accessible name to reflect that. I can add a pre-icon, and post-icon, and I know I’ll have at least two states. If I have visible text, then the icons don’t need alt text.

Step two, after styling the most basic of elements, we pair them together. We’re going to use our button to make a search component. This means I need a label, an input, and a way to fire the search. We’re keeping this simple to begin. We’ll use a button and a post action so the page refreshes with results. Most developers will code this label, input, button. But they don’t have to be in that order.

<div class="search-widget">
<input type="search" id="search" aria-labelledby="title"/>
<button id="title" type="submit"><img src="magnifier.png" alt="Search" /></button>
</div>

An easily recognizable or learnable icon can be used as a label as above. We of course provide the alt text. We can use the alt text of the icon in the button as the label for the form. We can change the order visually and it has no effect on how a non-visual user would understand it.

Break up content into the smallest functional pieces. Make sure each piece is understood fully within itself in a meaningful sequence. Then start layering those into the page document in the order to use them. A sales page would have account information first. Then it would include the client’s dashboard. Next, it provides access to individual child accounts. Finally, it lists leads and sales. There is a sidebar to do some research or note taking. We probably have some account screen for the sales person as well. Within each of those sections they’ll have an order that makes sense.

But at a page level the “main” content will be the what the user wants the most. So we put it first. Don’t run away yet. Initially, the order of the main section doesn’t matter. As this user gets used to it, they may want to show and hide different widgets. They might even want to move them. Let’s put a plan in place for that. We don’t want to forget our sidebar, main nav, or account information. These need to be placed in based on order of importance to the user at the code level. When you turn to CSS to position and decorate, is when we get the visual design.

Its always best to do user research on new products. An application like we describe above will benefit from interviewing the potential users. Then within the design, marketing, executive, and client teams conduct some card sorting exercises. Keep repeating this as you develop and design the application. You may find you need to change your design or users didn’t think like you thought they would.

Have more questions? Let’s discuss it over on LinkedIn or BlueSky!

Comments closed

A11y 101: WCAG 1.2.5 Audio Description (Prerecorded)

This week we’re still talking about video. They say a picture can say one thousand words. Video is thousands of images that tells us more than what the audio alone says. Most video on the web these days is between 24 and 30 frames per second. That potentially would put a one minute video at roughly 1.8 million words. Even if 30 frames equal one picture, you are still responsible for up to 60,000 words. How do we do this?

Comments closed

Designing with Empathy

This weekend I had the pleasure of speaking at the inaugural edition of Open Source & Feelings. It was an amazing conference tackling some really hard topics. I received really great feedback from the audience on my “Designing with Empathy” talk and several asked for the transcript as they couldn’t take notes fast enough. So here is the talk broken out with what was on the slides as well as the script I tried to follow. The video is coming, and I will add that when available.

When I first pitched this talk, I was thinking it was about accessibility because that’s usually what I speak about. As I wrote it. And rewrote it. And rewrote it. It evolved into being something bigger, higher level, and more important than just accessibility. It became about thinking of others and building experiences that we can all be proud of.


Trigger Warning

Some slides contain content that may trigger motion sickness

#DZY

Some of my slides contain motion that could make you feel ill. I’ll give you a warning before they occur.

Empathetic design makes badass users.

Comments closed