Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Saturday, July 25, 2020

Is Your Website Stressing Out Visitors?

Stress isn’t just something that makes people feel uncomfortable. It stimulates the urge to “fight” or “flight”. The very last thing you want is to design a website that stresses visitors out, leading them to dread the experience or abandon it entirely. There are many things that might invoke this response from your visitors, including the design. In the following guide, we’re going to look at some ways to de-stress your design.
Stress is a nasty thing and many of us deal with it on a regular basis. Our jobs, school, homes, relationships, and even things going on around the world can trigger feelings of panic, unease, and depression. And those are just chronic stressors. Think about the small things that send your body into instant fight-or-flight mode on a daily basis (e.g. traffic jams, unhelpful customer service reps, getting sick when you have a big project due).
The last thing you want is for someone to visit one of the websites you’ve built, only to feel like they:
  • Need to battle their way through it, or
  • Leave immediately and never come back.
There are a variety of ways a website can cause stress and leave visitors wondering if their response should be to fight or flight. Slow loading times. Overwhelming navigations. Excessive 404 errors. You get the point. But the design itself could be a problem, too.
If your bounce rates are really high and performance isn’t an issue, then this is something you need to look into. Today, we’re going to look at some ways for web designers to take traditional stress-busting tips and apply them to websites.

How To De-stress Your Web Design

Most stress relief guides provide a similar set of tips. But how exactly do you apply something like “Get outside for fresh air” to a website?
Here are some ideas:

1. Draw from Nature

There’s a reason why stress relief articles always suggest that people get outside. There’s something about nature that’s very calming.
If you think about the way we live our lives today — always on, always connected, always trying to make a better life for ourselves — it’s the exact opposite of nature. That’s probably why we’re so attracted to its simplicity and healing qualities in times of stress.
Companies with “natural” initiatives (think REI or CLIF) can get away with using imagery containing nature scenes and drawing on the feel-good vibes associated with them.

For other companies, however, you’re going to have to think outside the box as nature photographs won’t make sense for most.
Something I’d recommend instead is to look at your color palette.
One of the great things about spending time in nature is the abundance of color you’ll find. Look at any travel blog or social media account and you’ll find proof of this immediately.

There is such a vast array of colors in nature that you could draw from.
That said, nature’s colors aren’t always peaceful or safe. Take, for instance, aposematism. This is the ability animals have to signal that there’s danger here — and they do it with color.
“The function of aposematism is to prevent attack, by warning potential predators that the prey animal has defenses such as being unpalatable or poisonous.”
The most commonly seen colors in aposematism are:
  • Red,
  • Yellow,
  • Black,
  • White.
Generally, when these colors are used, it’s in high contrast to the surrounding colors and scenery, so it’s not like the actual appearance of red or black is alarming. It has to do with the context.
What I’d recommend is that you take a look at your website and note if there are any colors sending the wrong signals.
Does a dark mode-like design seem too ominous for the lighter personality of the brand? Are red accents reminiscent of blood against the stark white background? Does the bright yellow coloring feel out of place?

I suspect the web designer went out of their way to imbue the website with the sharp black and red accent colors that appear here. Bear Grylls doesn’t run some feel-good travel show. He’s always putting himself (and others) in life-or-death situations. So, in this case, the aposematism-inspired color palette is a good choice.
For your website, though, I highly doubt you want your visitors to associate the brand with danger or death. So, spend some time studying nature photography (the stuff that makes you feel good) as well as reading up on color psychology to fix the signals your website is sending to visitors.

2. Create a Predictable Rhythm

Yoga is one of those activities often recommended for people experiencing stress. As the Mayo Clinic explains:
“Yoga brings together physical and mental disciplines that may help you achieve peacefulness of body and mind. This can help you relax and manage stress and anxiety.”
At the core of yoga, is a composite of physical poses and steady breathing. If you’ve ever practiced it before, you know how good it feels when you get into the rhythm of it. Breathing in… and breathing out.
Yoga isn’t the only mindfulness practice that draws on steady breathing to calm the nerves.
If you’ve ever used a meditation app like Calm before, you’re familiar with breath exercises





As you focus on breathing in, holding that breath and releasing, your body and mind relax. Breathing exercises also help people calm hyperventilation and other erratic breathing patterns that get the heart rate up and send the mind racing.
So, how does this correlate to your website? Well, what we need to do is identify elements and interactions that feel unpredictable and shocking — ones that make visitors feel as if they have no control over the experience, like they can’t slow down and take it one bit at a time.
Rhythm and repetition play an important role in this, but you know this already. That’s why button shapes and colors are designed consistently site-wide. That’s why you choose no more than two or three fonts to establish a rhythm and dictate hierarchy in your content. That’s why you build mobile-first websites within a grid (even if the design sometimes appears asymmetrical).
The thing is, when new design patterns or elements become popular, it’s easy for these good and calming practices to go out the window.
Take, for instance, websites that use scroll-triggered animations like Unleashed.





While it’s certainly an attractive website and one that’s going to stand out from the competition, it presents an uneven experience from start to finish. Visitors are more likely to focus on the surprises that wait for them around the corner instead of on reading the content on the site (which is difficult with the way it’s presented).
This website is all about building anticipation; not value.

The big difference here is that hover-triggered animations don’t have to come at the expense of the predictability of the design or your visitors’ comfort levels.
Just be mindful of this. While it might seem like trying something new is what your site needs to stand out, don’t forget that you’re designing primarily for the user experience. And if users aren’t responding well to the creative choices you’ve made, it’s time to bring back a more stable rhythm to it.

3. Remove the Excess Noise

For a long time now, researchers have studied and reported on the damaging and stress-inducing effects environmental noise can have on people.
“Babisch established the modern noise reaction model, postulating an ‘indirect pathway,’ in which disturbance of sleep, communication and activity by low-level noise exposure causes changes of emotional and cognitive parameters and annoyance, followed by chronic stress reactions and adverse health effects.”
That’s no surprise to anyone who’s lived in a major city or visited one before. They’re polluted with sounds of people honking and shouting, loud buses or trains passing by, construction workers chipping away at the streets and buildings. At a certain point, it eventually gets to be too much.
This is one of the reasons why white noise machines, nature sounds and classical music are a popular means of drowning out the excess noise in our environments. They take all of the harshness and overwhelming nature of our surroundings and mute it or, at the very least, turn it down to a minimum.
When a website is designed with too much “noise”, a similar solution is needed.
But how do we define noise on websites? It’s not as though we all have auto-playing music on them anymore (at least, I hope not).
The big thing is to look for things that don’t belong there. If your design is overcrowded, remove the elements that contribute little to the user experience and conversion rate.
For example, how frequently do people engage with your live chat window? If it’s not happening frequently or the interactions aren’t meaningful, just get rid of it. The same goes for other non-essential elements. Banner ads. Auto-play on videos. Exit-intent pop-ups.
Is the interruption to the user’s experience really worth it?

When visitors enter the home page, they’re asked: “Do you want more traffic?”
Let’s say the answer to that is “no” because the visitor has come here to read more about marketing and SEO on the blog. However, the top of the blog page again asks them the same question.

Logic would dictate that clicking “No, I have enough traffic” would remove the banner from view since no “X” is available to dismiss it. Instead, visitors who click it are taken away from the blog and returned to the home page to start the loop all over again.
This type of website friction is no different than an environmental noise or irritant — kind of like a child asking “But why?” over and over again until you give them the answer they want. Eventually, visitors are going to get fed up with the pressure to convert and leave for good (maybe not in Patel’s case, but definitely on a website for lesser-known brands).
If you notice your visitors ignoring the noise you’ve placed before them on the website, don’t try and jam it down their throats even further. Just get rid of it.

They’re either going to suffer through the experience and be left with a sour taste in their mouth… or they’re going to immediately bounce off the site and be left with a sour taste in their mouth.
If you want to remove the stress from your web design, look to traditional stress relief activities to iron out the issues. If you can turn your website into a relaxing and welcoming environment — while still pushing all the right buttons to drive visitors to conversion — you’ll lower your bounce rates as well as visitors’ stress levels.




Wednesday, July 22, 2020

Are fake product reviews finally coming to an end?

 

The U.S. Federal Trade Commission (FTC) recently announced steps to crack down on fake product reviews online. But will this really improve review quality on Amazon? And even more importantly, will it level the playing field for Amazon sellers?

The proposed rules would impose a fine of up to $50,000 for each time a consumer sees a fake review. The fine would be paid by the brand that obtained the false review – not by the platform on which the review appeared.

This could flat-out bankrupt online sellers caught violating the rules.

Fake reviews are a tremendous problem online. PIRG, a U.S. consumer advocacy group, told the FTC earlier this year that as many as 40 percent of online reviews are deceptive or totally fake.


But these FTC rules are unlikely to change things on Amazon, for a lot of reasons. First, let’s talk about Amazon’s attitude toward fake reviews.

Platform manipulation is growing

Certain categories on Amazon are virtually saturated with fake reviews. For example, search the term “meat thermometers.” You’ll see a mess of clearly bought-and-paid-for product reviews, as well as hijacked reviews (more on those later). Another particularly fraught category is supplements, where Black Hat sellers make a mess of the platform with all kinds of platform manipulation.

Amazon has been enforcing against sellers for review manipulation and platform manipulation for years. In some cases, seller accounts are suspended – and it’s “two strikes and you’re out.” In other words, if a seller is caught for platform manipulation twice, there is no coming back to Amazon. In other cases, the discoverability of ASINs is reduced, if Amazon suspects fake reviews. And sometimes, Amazon eliminates the ability for an ASIN or brand to receive reviews at all.

What counts as platform manipulation on Amazon?

  • Asking for a 5-star review
  • Offering compensation or a free product for a review
  • Offering deep discounts for a review
  • Using chatbots to encourage reviews in return for compensation or discounts
  • Cherry-picking, which means asking only happy customers for reviews (such as those who provided positive store feedback)
  • Asking friends, family or employees for reviews
  • Upvoting your own reviews, or downvoting competitors’ reviews
  • Leaving bad reviews on competitors’ products

… and so much more

It’s so wrong yet so true

Unfortunately, Amazon isn’t great at catching fake reviews. Nor is it good at helping sellers who are attacked by Black Hats with fake bad reviews.

It’s an unfortunate truth. There are moles working at Amazon. These in-house bad guys take bribes to provide information. Report a competitor for fake reviews, and suddenly the Black Hat seller knows who you are and has a list of your top ASINs. Then the Black Hat goes on attack. So that begs the question. What are sellers to do when their competitors are not playing by the rules?

We know sellers who have reported fake reviews with their seller accounts, reported fake reviews with their buyer accounts, and escalated fake reviews to executives at Amazon. Sometimes, the fake reviews or bad ASINs come down. Most of the time, they don’t. But the worst is when an account or ASIN is attacked with fake positive reviews and then taken down. Then, Amazon expects the innocent seller to prove they didn’t do it. It can be almost impossible to prove a negative!

Hijacked! Have you checked your listings and reviews lately?

Review hijacking is a tremendous problem on Amazon. What is review hijacking? Imagine you’re shopping for black markers. When you look through the reviews on the listing detail page, the reviews are clearly about pencils. How did this happen?

Black Hat sellers made this happen. They changed the listing detail page so that it would be about a different product – but still retain a large number of positive reviews.

The next time you’re shopping on Amazon, read the reviews. Make sure the products you’re buying have real reviews about the correct items. As a seller, make sure your ASINs haven’t been hijacked. Check the reviews. It happens more often than you think.

Unfortunately, Amazon doesn’t detect a huge number of hijacked reviews. And they don’t always act to take down these reviews, even when notified about them by customers and sellers.

Will the FTC’s proposed regulations change this? I wonder.

If Amazon won’t enforce, what’s a seller to do?

But here is the ultimate problem with the FTC’s new rules – and Amazon’s potential reaction to them. The FTC can’t effectively enforce against international sellers.

Once again, sellers from China, Russia and other nations will be able to act as Black Hats with no threat of recourse – especially those with a stable of hundreds (or thousands) of Amazon seller accounts? The flood of fake reviews from overseas sellers will continue, while U.S. sellers face bankruptcy for breaking the rules. The only solution? Better detection and enforcement by Amazon. Yet after years and years, the e-commerce giant still hasn’t figured out how to solve this problem. What’s a seller to do?

All we can do is follow the rules. Build a better mousetrap. Stay on the lookout for nefarious players and competitors, and dutifully manage your ASINs and reviews.

Until Amazon catches up and enforces fairly, we have few options beyond product superiority, better marketing of our products and being intensely diligent with every detail page and their reviews.

So, are fake reviews coming to an end? It’s unlikely in the short term. The encouraging truth is that Amazon tends to act – and act quickly – when facing public pressure, potential litigation and government intervention.

We can only hope.

Friday, July 17, 2020

A Practical Guide To Testing React Applications With Jest

 Building a well-functioning application requires good testing; otherwise, knowing whether your application works as expected would be a matter of guesswork and luck. Jest is one of the best tools available for testing React applications. In this article, you will learn everything you need to create a solid test for your React components and application.

 

In this article, I’m going to introduce you to a React testing tool named Jest, along with the popular library Enzyme, which is designed to test React components. I’ll introduce you to Jest testing techniques, including: running tests, testing React components, snapshot testing, and mocking. If you are new to testing and wondering how to get started, you will find this tutorial helpful because we will start with an introduction to testing. By the end, you’ll be up and running, testing React applications using Jest and Enzyme. You should be familiar with React in order to follow this tutorial.

A Brief Introduction To Testing

Testing is a line-by-line review of how your code will execute. A suite of tests for an application comprises various bit of code to verify whether an application is executing successfully and without error. Testing also comes in handy when updates are made to code. After updating a piece of code, you can run a test to ensure that the update does not break functionality already in the application.

Why Test?

It’s good to understand why we doing something before doing it. So, why test, and what is its purpose?

  1. The first purpose of testing is to prevent regression. Regression is the reappearance of a bug that had previously been fixed. It makes a feature stop functioning as intended after a certain event occurs.
  2. Testing ensures the functionality of complex components and modular applications.
  3. Testing is required for the effective performance of a software application or product.

Testing makes an app more robust and less prone to error. It’s a way to verify that your code does what you want it to do and that your app works as intended for your users.

 

Let’s go over the types of testing and what they do.

Unit Test

In this type of test, individual units or components of the software are tested. A unit might be an individual function, method, procedure, module, or object. A unit test isolates a section of code and verifies its correctness, in order to validate that each unit of the software’s code performs as expected.

In unit testing, individual procedures or functions are tested to guarantee that they are operating properly, and all components are tested individually. For instance, testing a function or whether a statement or loop in a program is functioning properly would fall under the scope of unit testing.

Component Test

Component testing verifies the functionality of an individual part of an application. Tests are performed on each component in isolation from other components. Generally, React applications are made up of several components, so component testing deals with testing these components individually.

For example, consider a website that has different web pages with many components. Every component will have its own subcomponents. Testing each module without considering integration with other components is referred to as component testing.

Testing like this in React requires more sophisticated tools. So, we would need Jest and sometimes more sophisticated tools, like Enzyme, which we will discuss briefly later.

Snapshot Test

A snapshot test makes sure that the user interface (UI) of a web application does not change unexpectedly. It captures the code of a component at a moment in time, so that we can compare the component in one state with any other possible state it might take.

We will learn about snapshot testing in a later section.

Advantages and Disadvantages of Testing

Testing is great and should be done, but it has advantages and disadvantages.

Advantages

  1. It prevents unexpected regression.
  2. It allows the developer to focus on the current task, rather than worrying about the past.
  3. It allows modular construction of an application that would otherwise be too complex to build.
  4. It reduces the need for manual verification.

Disadvantages

  1. You need to write more code, as well as debug and maintain.
  2. Non-critical test failures might cause the app to be rejected in terms of continuous integration.

Introduction to Jest

Jest is a delightful JavaScript testing framework with a focus on simplicity. It can be installed with npm or Yarn. Jest fits into a broader category of utilities known as test runners. It works great for React applications, but it also works great outside of React applications.

Enzyme is a library that is used to test React applications. It’s designed to test components, and it makes it possible to write assertions that simulate actions that confirm whether the UI is working correctly.

Jest and Enzyme complement each other so well, so in this article we will be using both.

Process Of Running A Test With Jest

In this section, we will be installing Jest and writing tests. If you are new to React, then I recommend using Create React App, because it is ready for use and ships with Jest.

npm init react-app my-app

We need to install Enzyme ****and enzyme-adapter-react-16 with react-test-renderer (the number should be based on the version of React you’re using).

npm install --save-dev enzyme enzyme-adapter-react-16 react-test-renderer

Now that we have created our project with both Jest and Enzyme, we need to create a setupTest.js file in the src folder of the project. The file should look like this:

import { configure } from "enzyme";
import Adapter from "enzyme-adapter-react-16";
configure({ adapter: new Adapter() });

This imports Enzyme and sets up the adapter to run our tests.

Before continuing, let’s learn some basics. Some key things are used a lot in this article, and you’ll need to understand them.

  • it or test You would pass a function to this method, and the test runner would execute that function as a block of tests.
  • describe This optional method is for grouping any number of it or test statements.
  • expect This is the condition that the test needs to pass. It compares the received parameter to the matcher. It also gives you access to a number of matchers that let you validate different things. You can read more about it in the documentation.
  • mount This method renders the full DOM, including the child components of the parent component, in which we are running the tests.
  • shallow This renders only the individual components that we are testing. It does not render child components. This enables us to test components in isolation.

Creating A Test File

How does Jest know what’s a test file and what isn’t? The first rule is that any files found in any directory with the name __test__ are considered a test. If you put a JavaScript file in one of these folders, Jest will try to run it when you call Jest, for better or for worse. The second rule is that Jest will recognize any file with the suffix .spec.js or .test.js. It will search the names of all folders and all files in your entire repository.

Let’s create our first test, for a React mini-application created for this tutorial. You can clone it on GitHub. Run npm install to install all of the packages, and then npm start to launch the app. Check the README.md file for more information.

Let’s open App.test.js to write our first test. First, check whether our app component renders correctly and whether we have specified an output:

it("renders without crashing", () => {
  shallow(<App />);
});

it("renders Account header", () => {
  const wrapper = shallow(<App />);
  const welcome = <h1>Display Active Users Account Details</h1>;
  expect(wrapper.contains(welcome)).toEqual(true);
});

In the test above, the first test, with shallow, checks to see whether our app component renders correctly without crashing. Remember that the shallow method renders only a single component, without child components.

The second test checks whether we have specified an h1 tag output of “Display Active User Account” in our app component, with a Jest matcher of toEqual.

Now, run the test:

npm run test 
/* OR */
npm test

The output in your terminal should like this:

  PASS  src/App.test.js
  √ renders without crashing (34ms)
  √ renders Account header (13ms)

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total
Snapshots:   0 total
Time:        11.239s, estimated 16s
Ran all test suites related to changed files.

Watch Usage: Press w to show more.

As you can see, our test passed. It shows we have one test suite named App.test.js, with two successful tests when Jest ran. We’ll talk about snapshot testing later, and you will also get to see an example of a failed test.

Skipping Or Isolating A Test

Skipping or isolating a test means that when Jest runs, a specific marked test is not run.

it.skip("renders without crashing", () => {
  shallow(<App />);
});

it("renders Account header", () => {
  const wrapper = shallow(<App />);
  const header = <h1>Display Active Users Account Details</h1>;
  expect(wrapper.contains(header)).toEqual(true);
});

Our first test will be skipped because we’ve used the skip method to isolate the test. So, it will not run or make any changes to our test when Jest runs. Only the second one will run. You can also use it.only().

It’s a bit frustrating to make changes to a test file and then have to manually run npm test again. Jest has a nice feature called watch mode, which watches for file changes and runs tests accordingly. To run Jest in watch mode, you can run npm test -- --watch or jest --watch. I would also recommend leaving Jest running in the terminal window for the rest of this tutorial.

Mocking Function

A mock is a convincing duplicate of an object or module without any real inner workings. It might have a tiny bit of functionality, but compared to the real thing, it’s a mock. It can be created automatically by Jest or manually.

Why should we mock? Mocking reduces the number of dependencies — that is, the number of related files that have to be loaded and parsed when a test is run. So, using a lot of mocks makes tests execute more quickly.

Mock functions are also known as “spies”, because they let you spy on the behavior of a function that is called directly by some other code, rather than only testing the output.

There are two ways to mock a function: either by creating a mock function to use it in test code, or by writing a manual mock to override a module dependency.

Manual mocks ****are used to stub out functionality with mock data. For example, instead of accessing a remote resource, like a website or a database, you might want to create a manual mock that allows you to use fake data.

We will use a mock function in the next section.

 

Testing React Components

The section will combine all of the knowledge we have gained so far in understanding how to test React components. Testing involves making sure the output of a component hasn’t unexpectedly changed to something else. Constructing components in the right way is by far the most effective way to ensure successful testing.

One thing we can do is to test components props — specifically, testing whether props from one component are being passed to another. Jest and the Enzyme API allow us to create a mock function to simulate whether props are being passed between components.

We have to pass the user-account props from the main App component to the Account component. We need to give user-account details to Account in order to render the active account of users. This is where mocking comes in handy, enabling us to test our components with fake data.

Let’s create a mock for the user props:

const user = {
  name: "Adeneye David",
  email: "david@gmail.com",
  username: "Dave",
};

We have created a manual mock function in our test file and wrapped it around the components. Let’s say we are testing a large database of users. Accessing the database directly from our test file is not advisable. Instead, we create a mock function, which enables us to use fake data to test our component.

describe("", () => {
  it("accepts user account props", () => {
    const wrapper = mount(<Account user={user} />);
    expect(wrapper.props().user).toEqual(user);
  });
  it("contains users account email", () => {
    const wrapper = mount(<Account user={user} />);
    const value = wrapper.find("p").text();
    expect(value).toEqual("david@gmail.com");
  });
});

We have two tests above, and we use a describe layer, which takes the component being tested. By specifying the props and values that we expect to be passed by the test, we are able to proceed.

In the first test, we check whether the props that we passed to the mounted component equal the mock props that we created above.

For the second test, we pass the user props to the mounted Account component. Then, we check whether we can find the <p> element that corresponds to what we have in the Account component. When we run the test suite, you’ll see that the test runs successfully.

We can also test the state of our component. Let’s check whether the state of the error message is equal to null:

it("renders correctly with no error message", () => {
  const wrapper = mount();
  expect(wrapper.state("error")).toEqual(null);
});

In this test, we check whether the state of our component error is equal to null, using a toEqual() matcher. If there is an error message in our app, the test will fail when run.

In the next section, we will go through how to test React components with snapshot testing, another amazing technique.

Snapshot Testing

Snapshot testing captures the code of a component at a moment in time, in order to compare it to a reference snapshot file stored alongside the test. It is used to keep track of changes in an app’s UI.

The actual code representation of a snapshot is a JSON file, and this JSON contains a record of what the component looked like when the snapshot was made. During a test, Jest compares the contents of this JSON file to the output of the component during the test. If they match, the test passes; if they don’t, the test fails.

To convert an Enzyme wrapper to a format that is compatible with Jest snapshot testing, we have to install enzyme-to-json:

npm install --save-dev enzyme-to-json

Let’s create our snapshot test. When we run it the first time, the snapshot of that component’s code will be composed and saved in a new __snapshots__ folder in the src directory.

it("renders correctly", () => {
  const tree = shallow(<App />);
  expect(toJson(tree)).toMatchSnapshot();
});

When the test above runs successfully, the current UI component will be compared to the existing one.

Now, let’s run the test:

npm run test

When the test suite runs, a new snapshot will be generated and saved to the __snapshots__ folder. When we run a test subsequently, Jest will check whether the components match the snapshot.

As explained in the previous section, that shallow method from the Enzyme package is used to render a single component and nothing else. It doesn’t render child components. Rather, it gives us a nice way to isolate code and get better information when debugging. Another method, named mount, is used to render the full DOM, including the child components of the parent component, in which we are running the tests.

We can also update our snapshot, Let’s make some changes to our component in order to make our test fail, which will happen because the component no longer corresponds to what we have in the snapshot file. To do this, let’s change the <h3> tag in our component from <h3> Loading...</h3> to <h3>Fetching Users...</h3>. When the test runs, this what we will get in the terminal:

 FAIL  src/App.test.js (30.696s)
  × renders correctly (44ms)

  ● renders correctly

    expect(received).toMatchSnapshot()
    Snapshot name: `renders correctly
1

    - Snapshot
    + Received

      
        
          Display Active Users Account Details
        
        
    -     Loading...
    +     Fetching Users...
        
      

       7 | it("renders correctly", ()
=> {
       8 |   const wrapper = shallow();
    >  9 |   expect(toJson(wrapper)).toMatchSnapshot();
         |                           ^      10 | });
      11 |
      12 | /* it("renders without crashing", () => {

      at Object. (src/App.test.js:9:27)

 › 1 snapshot failed.
Snapshot Summary
 › 1 snapshot failed from 1 test suite. Inspect your code changes or press `u` to update them.

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   1 failed, 1 total
Time:        92.274s
Ran all test suites related to changed files.

Watch Usage: Press w to show more.

If we want our test to pass, we would either change the test to its previous state or update the snapshot file. In the command line, Jest provides instruction on how to update the snapshot. First, press w in the command line to show more, and then press u to update the snapshot.

› Press u to update failing snapshots.

When we press u to update the snapshot, the test will pass.

Conclusion

I hope you’ve enjoyed working through this tutorial. We’ve learned some Jest testing techniques using the Enzyme testing library. I’ve also introduced you to the process of running a test, testing React components, mocking, and snapshot testing. If you have any questions, you can leave them in the comments section below, and I’ll be happy to answer every one and work through any issues with you.

Resources And Further Reading

 

 

Tuesday, July 14, 2020

Why Amazon “deal sites” put 3P accounts at risk

 

Sellers should avoid flipping heavily discounted items

Internet deal sites let users buy heavily discounted products on Amazon. That’s why new third-party sellers embrace these sites. It’s cheap inventory to get started. What could go wrong?

Unfortunately, this is a very high-risk strategy it’s best to avoid.

Why these deal sites exist

Deal sites and rebate sites are not for the convenience or happiness of the Amazon customer. These sites exist to help private-label sellers launch their products on Amazon. They are also used to increase Best Seller Rank (BSR) or gain product reviews.

There is an unspoken agreement between these sellers and the deal site customers. Most of the customers on deal sites understand that a product review is expected in return for the steep discount. When sales are made and reviews posted, a product’s Best Seller Rank rises. This, in turn, helps the product pop up higher in organic search results.

In most cases, the sellers using these deal sites are offering significant discounts – so much that they are violating Amazon policies against Platform Manipulation. As a result of these discounts, the sellers are losing money on sales made via the discount sites. In return, they hope to drive more buyers to their products.

Deal sites What makes deal-buying dangerous

Third-party sellers purchase these deals and then flip them on their own Amazon accounts. But this is a risky strategy:

  1. Amazon does not always accept invoices from Amazon-to-Amazon flips that involve third-party sellers.
  2. Private-label sellers can easily file intellectual property complaints against other sellers who pop up on their listings – especially if their distribution is Amazon-only.

The private-label sellers are not going to remove their intellectual property complaints, once filed against you. This makes it particularly difficult to get the ASIN or account reinstated – whichever is the case.

What to do instead

There are lots of places to source products. Yes, they are more challenging than deal sites, retail arbitrage and online arbitrage. But they can help you develop a sustainable business:

  • Manufacturers
  • Distributors
  • Wholesalers

5 ways to avoid variation abuse

 

Amazon is super-strict on variations; follow these rules to stay safe from variation abuse

A couple of times a year, Amazon goes on a quest to clean up the catalog. For many sellers, this can result in warnings for variation abuse. Too often, brand owners and sellers are violating Amazon’s variation rules and don’t even realize it. Other times, sellers are using variations to circumvent Amazon’s rules. 

What is a variation? In short, it’s a family of ASINs that are for the same product. An “anchor” ASIN is called the parent, and similar ASINs are called “children.” These child listings are connected with one another, instead of being distinct and separate. For example, a parent ASIN might be for a men’s t-shirt with a pocket. A child ASIN would be that exact t-shirt, in green sized large.

Amazon Variation Abuse

Why do sellers violate variation rules? There are a few motivating factors:

  1. Boosting Best Seller Rank (BSR) across all variations. If one child listing is particularly popular, sellers will try to tack other children onto the listing in hopes of getting great sales for that product as well.
  2. Launching a new product. Being pegged to a popular existing product makes product launches easier.
  3. Circumventing brand gating rules. If they can’t get approval to list against a specific brand, some sellers play games with variations as a workaround of Amazon’s regulations.

    Amazon is super-strict on variations; follow these rules to stay safe from variation abuse

    A couple of times a year, Amazon goes on a quest to clean up the catalog. For many sellers, this can result in warnings for variation abuse. Too often, brand owners and sellers are violating Amazon’s variation rules and don’t even realize it. Other times, sellers are using variations to circumvent Amazon’s rules. 

    What is a variation? In short, it’s a family of ASINs that are for the same product. An “anchor” ASIN is called the parent, and similar ASINs are called “children.” These child listings are connected with one another, instead of being distinct and separate. For example, a parent ASIN might be for a men’s t-shirt with a pocket. A child ASIN would be that exact t-shirt, in green sized large.

    Amazon Variation Abuse

    Why do sellers violate variation rules? There are a few motivating factors:

  4. Boosting Best Seller Rank (BSR) across all variations. If one child listing is particularly popular, sellers will try to tack other children onto the listing in hopes of getting great sales for that product as well.
  5. Launching a new product. Being pegged to a popular existing product makes product launches easier.
  6. Circumventing brand gating rules. If they can’t get approval to list against a specific brand, some sellers play games with variations as a workaround of Amazon’s regulations.

Follow these five strategies to ensure you aren’t busted for variation abuse.

  1. Understand what makes a variation. For almost all product categories on Amazon, the only acceptable variations are for color, size and quantity. In the t-shirt example above, you could offer the shirt in a range of colors, a range of sizes, and a variety of multi-packs. In some categories, there are additional specific acceptable variations, such as flavor. You can find these in the style guide for each category.
  2. Do not group products by your preference. Imagine that you are selling puzzles. You have five puzzles that feature animals and 5 puzzles that feature cars. You decide to set up variation families based on animals and cars. While this makes sense to you, it is not acceptable to Amazon.
  3. Do not abuse the variant. Many sellers change the meaning of the approved variation. For example, they will create “red” and “yellow” variations for a lotion, when the true difference is scent. Sellers abuse this variation because they believe the two scents should be on the same listing. Remember, your opinion doesn’t override Amazon’s rules.
  4. Ensure everything on the child listings matches, except the variant. If you have created a valid variation family, the child listings must be identical except for the acceptable variants. The listing title, bullets, description and photos should be the same – except where you point out the color, size or quantity. When you mouse-over the variant attributes and click through the child listings, the content should remain essentially identical.
  5. Don’t use a variation to create a bundle.  Sellers fall into this temptation in the effort to differentiate themselves from listings with a lot of competition. Or, they create unauthorized variation bundles to try and “launch” or bring attention to a bundle. Keep in mind, all elements of the product must be the same across a variation family. For example, you cannot offer a product with a case and without a case on the same variation.

Follow these five strategies to ensure you aren’t busted for variation abuse.

  1. Understand what makes a variation. For almost all product categories on Amazon, the only acceptable variations are for color, size and quantity. In the t-shirt example above, you could offer the shirt in a range of colors, a range of sizes, and a variety of multi-packs. In some categories, there are additional specific acceptable variations, such as flavor. You can find these in the style guide for each category.
  2. Do not group products by your preference. Imagine that you are selling puzzles. You have five puzzles that feature animals and 5 puzzles that feature cars. You decide to set up variation families based on animals and cars. While this makes sense to you, it is not acceptable to Amazon.
  3. Do not abuse the variant. Many sellers change the meaning of the approved variation. For example, they will create “red” and “yellow” variations for a lotion, when the true difference is scent. Sellers abuse this variation because they believe the two scents should be on the same listing. Remember, your opinion doesn’t override Amazon’s rules.
  4. Ensure everything on the child listings matches, except the variant. If you have created a valid variation family, the child listings must be identical except for the acceptable variants. The listing title, bullets, description and photos should be the same – except where you point out the color, size or quantity. When you mouse-over the variant attributes and click through the child listings, the content should remain essentially identical.
  5. Don’t use a variation to create a bundle.  Sellers fall into this temptation in the effort to differentiate themselves from listings with a lot of competition. Or, they create unauthorized variation bundles to try and “launch” or bring attention to a bundle. Keep in mind, all elements of the product must be the same across a variation family. For example, you cannot offer a product with a case and without a case on the same variation.

Amazon FBA Reimbursements – Amazon Owes You Money!

 rvice for the seller’s products.

Utilizing FBA helps your business be more efficient and makes your products eligible for Amazon Prime. But even though Amazon is one of the most respected online retailers, sellers don’t always get credited for inventory that slips through the cracks.

If you want to get a fast estimate of how much you can get refunded, check out our Amazon FBA Refund Calculator.

Why does Amazon owe FBA sellers money?

All of these situations can result in reimbursements:

  • Customer was refunded more than the price they paid
  • Item got lost or damaged in Amazon’s fulfillment center
  • Item was destroyed without permission
  • Amazon overcharged for the weight or dimensional fee
  • Amazon reimbursed the customer but not the correct amount
  • Item was damaged by carrier or Amazon
  • Replacement was sent to customer or a refund was granted, but the order was never returned
  • Amazon claims they have reimbursed the seller, even though they haven’t
  • Amazon claims they restocked the item into your inventory, but they haven’t
  • The wrong item is restocked into your inventory

How do Amazon FBA sellers file an Amazon reimbursement claim?

What NOT to do

You want to approach your Amazon reimbursement claims with caution. Simple mistakes can result in your Amazon seller account getting shut down.

The most important thing you should NOT do is use an automated FBA reimbursement tool to try to collect your refund. Amazon policy prohibits using automated tools to open cases. In addition, opening up too many cases at once can result in a warning or account suspension.

So this might leave you wondering, how do I get reimbursed from Amazon?

What you should do

To maximize your dollars, rely on an Amazon reimbursement service. Here at Riverbend Consulting, we take a deep dive into your account’s history to find missing and lost inventory, missing returns, and other reimbursements that Amazon miscalculated over the last 18 months. In addition, we review your inbound FBA shipments for the last 90 days to ensure all inventory is present and accounted for.

We only get paid a percentage of what you get back, incentivizing us to find every last penny for your account.

Riverbend is a team of former Amazon employees and Amazon experts who have a deep understanding of how Amazon works from the inside.

We don’t automate any part of the reimbursement process, ensuring that you have the best possible reimbursement experience – and no risk of warnings or enforcement against you.

NY Lockdown – What it means for your Self-fulfilled Amazon Business

 

What should Self-fulfilled Amazon Business owners think with New York Governor Andrew Cuomo announcing the mandate that all employees of non-essential businesses must stay home? It’s natural to have fears that this will directly impact your merchant-fulfilled Amazon business, especially if you already took a hit with Amazon’s temporary FBA moratorium of inbound items that they deem “Non-Essential Household Goods.”

We here at Riverbend had the same concerns, so the moment we were made aware of the announcement we started researching what this means for you and your employees.

We have good news!

Per New York State’s designation of “Essential Services”, warehouse/distribution and fulfillment make the cut as “Essential!” Mail and delivery services also fall under this designation. 

A full list of New York Essential Services can be found here: 

https://esd.ny.gov/guidance-executive-order-2026

Of course, the health and wellbeing of you and your employees is the highest priority and sheltering in place at home may be the right choice for some or all of you. However, if you are able to take orders, know that this New York Executive Order does not prevent your warehouse operations and order fulfillment to continue at whatever capacity you can currently execute.

If your Amazon business needs additional support through this trying time, know that Riverbend Consulting is here to help. We can assist in monitoring your account to ensure that your shipping metrics or Seller Fulfilled Prime status stays healthy among a host of other services that may help you keep your account up and running.

UPS, USPS and the making of an Amazon shipping nightmare

 

Sellers are no stranger to Amazon shipping challenges.

But lately, some new hassles are rearing their ugly heads. One of these seems to be a technical error, while the other may signal long-term policy changes for Amazon shipping.

UPS covering FBA inbound shipment stickers

Two prep centers have reached out to me about this bizarre issue. It appears that a limited number of UPS hubs – one in Michigan and one in California – are having a technical issue. Any non-UPS barcode on the outside of a package is causing issues with scanning and routing.

Their solution is wreaking havoc for 3P sellers sending shipments to FBA fulfillment centers. UPS is covering all non-UPS barcodes – including the critical sticker scanned by Amazon upon a box’s arrival.  

But wait – isn’t UPS a partnered carrier? Shouldn’t they avoid angering Amazon and its sellers?

There have long been whispers that some UPS higher-ups aren’t thrilled with their Amazon relationship. Plus, the staff at the hubs are just trying to route and deliver packages. Non-UPS barcodes, in their minds, aren’t their problems.

What’s a seller to do? If your packages are routed through Michigan or California, consider jumping to FedEx. In many geographical locations, they offer the same or better pricing for inbound FBA shipments.

Amazon messing with SFP delivery times

Amazon doesn’t trust the U.S. Postal Service for on-time delivery.

That’s become all too obvious with recent changes to the “buy shipping” feature for Seller Fulfilled Prime. Amazon’s algorithm appears to no longer include Saturday as a transit day. In addition, it is taking the most conservative-possible estimate on delivery estimates. And finally, First-Class mail is no longer an option for SFP orders – even if they would arrive before the promise date.

For example, in my own seller account, Amazon insisted I buy UPS Ground to ship a package literally 20 miles away. I’m confident that USPS First Class Mail would have delivered the next day, or at worst, the day after that. But I wasn’t given that option to purchase either that or Priority Mail. Craziness.

Many SFP sellers are finding themselves priced out of the two-day shipping market.

There are two options for dealing with this difficulty:

  1. Ask Seller Support to generate a transit time map based on your location. They can provide a list of regions that matches those in shipping settings. It will give the likelihood of two-day delivery using Priority Mail, based on distance and other factors. Then, you can dramatically limit your SFP settings, so that you will most likely only offer products to those who will receive packages on-time with Priority Mail.
  2. I hate to sound like an ad for FedEx. But if you ship enough volume, it’s worth investigating their One Rate program for Seller Fulfilled Prime. In many cases, the rates are comparable to Priority Mail. Keep in mind, however, that shipping out the same day the order is received will always help hold down your shipping expenses.

4 reasons your UPCs have more power than you thought

 

Whether you are a seasoned seller or just starting, you have likely come across Amazon’s requirements to assign GS1 Universal Product Codes (UPCs) to your product listings. Even though we interact with UPC barcodes at retail stores almost daily, you might not know how identifying your products with them can help grow and scale your business online.


Below are the 4 reasons your UPCs have more power. You should think about your UPCs beyond just fulfilling an Amazon requirement.

Reason #1: GS1 GTINs and barcodes are part of a global system of standards

GS1 US is a part of GS1, a global identification and supply chain standards organization that has worked with the retail industry, among others, for more than 50 years to set standards collaboratively. It is a neutral not for-profit that has helped companies add visibility and traceability to their supply chains.

These benefits are achieved through the use of the GS1 System of Standards, which includes the Global Trade Item Number (GTIN). This number, which you can find at the bottom of any UPC/EAN barcode, is a unique product identifier that enables businesses to price, order, and invoice products that circulate through the global supply chain.

By becoming a member of GS1 US, you can create your own GS1 GTINs, which allows the product to be directly associated with your company, and that number is embedded into a UPC barcode (be aware that some marketplaces like Amazon may use GTIN and UPC interchangeably). A record of the GTIN will be stored in the GS1 Global Registry Platform—a validation source for many retailers including Amazon.

When brands are all using the same standardized approach to identifying their products, marketplaces, retailers, and even consumers can more efficiently confirm authenticity. The GTIN is just the beginning—there are other unique identifiers and standards that identify locations, logistics units, and more that growing businesses will encounter as they scale and focus more on their supply chains.

Reason #2: The retail industry relies on GTINs from GS1 as a source of truth for product identification

You come across GTINs every day, so often in fact that they are taken for granted as just another part of the shopping experience. But have you ever been standing in line at check out with an armful of clothes only to find when you get to the register that one of the tags is missing? This one tag typically contains a UPC barcode that encodes the product GTIN providing access to information that enables frictionless experiences when shopping, both digitally and physically anywhere in the world.

Aside from going “beep” at the register, the GTIN and UPC do so much more. GTINs are the key source of information for retail systems to know what a product is and have access to certain information about that product, such as the price, style number, and other information. Unique product identity ensures a product is what the brand owner claims it is and can be verified if a product’s safety was ever called into question. For example, think of a product recall. GTINs allow retailers and brands to identify where the products are in the supply chain, making them easier to look up and remove if necessary.

What started out to get the checkout lines moving in a few regional grocery stores has evolved into over 2.5 million global companies using GS1 identifiers and generating over 10 billion transactions per day to make a truly global supply chain experience.

Reason #3: Supporting consumer-centric e-commerce.

One of the primary reasons a brand will begin using GTINs is because their marketplace or retail platform partner has asked them to do so. And we often hear, “why is Amazon or a retailer asking me to identify my products with GTINs and UPCs specifically sourced from GS1?”

The answer is that the retail industry as a whole promotes the standardization of business processes because they help enable efficiency, scalability, and traceability for stakeholders within the industry. For one entire industry to commit to being consumer-centric, innovation, and collaboration needs to occur with a focus on the greater good for all.

Online selling has fueled the rise of small and medium-sized brands by allowing them to compete in the marketplace with larger competitors. Marketplaces like Amazon rely on GTINs to deliver improved search results to their customers, remove or consolidate duplicate listings, and most importantly, help protect their consumers and themselves from counterfeit products and bad actors on their platform. They recommend their brands to use GS1 GTINs so they have a single source of truth and can verify what is being sold and who is selling it.

Reason #4: GS1 GTINs and UPC barcodes can help you go beyond Amazon

Amazon is the largest marketplace in North America and receives more than 2 billion visits monthly according to Statista. When a seller understands and consistently complies with Amazon’s requirements, it keeps their seller ranking in good standing. A seller looking to grow

beyond Amazon will be able to use GTINs encoded in UPC barcodes as a key part of replicating this success.

Whether you decide to create your own website to sell directly to the consumer or list your products on marketplaces such as Google Shopping, unique product identification is going to be important to not only manage your inventory in the broader retail supply chain, but to also help your brand be discovered. For example, listing your products on Google means your listing can potentially be seen on Google Shopping, as well as in Google search, images, maps, and more. Google uses your GTIN to strategically index products and matches it with the search history they have captured over time. They use this information to surface the products that people are likely to purchase, leading to higher impressions and conversions for your product listings.

Although e-commerce has seen huge year-over-year growth, brick-and-mortar retail still accounts for 85% of all retail sales, according to Statista. Most national retailers have adopted GS1 Standards and often ask their suppliers to identify their products with GTINs and be marked with a UPC barcode. Simply put, a UPC barcode from GS1 US can represent your gateway to bigger sales. Whether you sell your product in store or online, through a retailer, or direct to the consumer, GTIN and UPCs from GS1 US are an important part of a small business’s long-term strategy.

Ultimately, GS1 GTINs have powered the global supply chain for more than 50 years and have become more relevant with the explosion of online retail. By understanding the appropriate channels to obtain, create, and use GTINs, you’ll be well on your way to leveraging a global standardized supply chain language that is foundational to your product and your company’s success. To learn more about GS1 US, please visit https://www.gs1us.org.

The Top Five Trademark Registration Options for Amazon

 .

What is the best way to get a Trademark Registration Options for Amazon in a timely manner?

If you sell online, getting a federal trademark registration to protect your brand can be an important tool. For example, eligibility for the Amazon Brand Registry generally requires a federal trademark registration. Many eager sellers are surprised to learn that it may take months or longer to obtain the trademark registration.

So, what are the best trademark registration options for Amazon and how do you get it in a timely manner? Here are some options compared:

The Top Five Trademark Registration Options for Amazon

1. Do it Yourself (DIY)

registered on amazon

Like many things, it’s possible to get a trademark registration by doing it yourself—you will save some money if you pull it off. But, one Stanford study shows that p

ro se applicants are less than 50% likely to succeed. Delays, failure, wasted filing fees, and costly rebranding can be painful. Unsurprisingly, the USPTO “strongly encourage[s]” use of a U.S.-licensed attorney who specializes in trademark law. So, trying to get a trademark registration by yourself is probably not the best option.

2. Online Trademark Filing Service

There are many online trademark filing services (think Legalzoom.com) that are DIY+, offering to file trademark applications for between ~$100 and ~$500 (not including government fees). Unfortunately, many of these sites skimp on upfront due diligence and work. They also aren’t great at gleaning and analyzing the information necessary for preparing a well drafted trademark application. Problems during trademark examination like added costs and delays are still common in this approach. While online trademark filing services are slightly better than DIY, they are usually not as good as a traditional law firm.

3. Law Firm

Using a traditional law firm is the tried and true way to do trademark registration. Again, if a firm has good trademark attorneys, your chances of success go up dramatically (as mentioned above). The problem is that this is a very costly route: according to the American Intellectual Property Law Association (AIPLA) 2019 Report of the Economic Survey (“2019 AIPLA Survey”), the median cost for trademark attorney work (like a trademark clearance search and opinion, trademark application, and trademark prosecution) is $3,230, not including government filing fees. For many folks, this is just too expensive.

4. Amazon’s IP Accelerator Referral Service

In a variation of the law firm option, Amazon advertises a list of trademark attorneys to obtain trademarks for the Amazon Brand Registry at pre-negotiated rates. However, these rates are still relatively expensive. For example, an Amazon IP Accelerator attorney charges $2,400 for a comprehensive trademark search and trademark application (not including government fees). According to the AIPLA Survey, this is higher than the median cost of around $2,000 for the same services by other trademark attorneys. So, Amazon’s IP Accelerator referrals are better than DIY and online filing services, but close to traditional law firm expense.

5. Solo Trademark Attorney or Small Firm

Solo trademark attorneys and small firms are usually less expensive than larger law firms and they can perform as good or better than them. This is the case because bigger firms have larger overhead to cover. In fact, according to the 2019 AIPLA Survey, solo attorneys are typically 32% less expensive than their peers at larger firms. So, using an experienced solo or small firm trademark attorney is a great option. You will do much better than you would on your own or with an online trademark filer, and with less expense than a regular law firm or Amazon’s IP Accelerator Referral Service.

MFN orders piling up? Go on vacay!

 

Whether you’re a new MFN seller or seeing high order volumes, be ready to pause

As Amazon struggles to ship out FBA orders quickly enough, Amazon 3P sellers are jumping into merchant fulfillment. It’s important to understand the metrics Amazon expects from MFN sellers – and how to keep out of trouble. This does not just apply to the current situation driven by Covid-19. These concepts can be relevant during any kind of natural disaster or business disruption.

Amazon requires:

  • A late shipment rate of less than 4 percent
  • An order cancellation rate of less than 2.5 percent

 

Follow these tips to ensure you don’t run afoul of Amazon’s rules:

  1. Check your stats every day. Watch them like a hawk.
  2. Get out every order by the promised ship date. Don’t rely on third-party software. Actually look in Seller Central to see which items are not shipped out, and get them out ASAP.
  3. Ensure that you get an origin scan by your carrier. Amazon doesn’t consider the order shipped unless it is scanned.
  4. If you even start to feel behind, go on vacation. You can do this in settings in your account. Temporarily pause accepting new MFN orders until you are caught up.

What happen when you run out of inventory or simply mess up and need to cancel an order? You want to ensure that you don’t get negative feedback.

Try these strategies:

  • Buyers don’t like when you leave them hanging past the estimated ship date. If you figure out you won’t be able to ship, cancel sooner rather than later. Be timely and apologetic in cancellations. Don’t wait. Explain that you are cancelling the order immediately so that the buyer has time to place a new order with someone else.
  • When cancelling an order, buyers understand the truth and a valid reason why the order must be cancelled. For example, a tornado shut down our operations. Send a message stating that a weather event happened today in your location. Safety of your employees is paramount, so you are not requiring staff to come in today to prioritize their families. 
  • Buyers don’t like it when sellers confirm orders, only to cancel them and issue a refund. This is technically mail fraud. In addition, buyers become very angry when an order is cancelled, yet they can see that it is still available for sale on Amazon.

What should MFN sellers do long-term? Ensure you have staff redundancy to fill orders even if your regular MFN staff are not available. And be sure that someone can put your store on vacation via mobile if your infrastructure is not functional.

Saturday, July 11, 2020

Accessible Images For When They Matter Most

Creating accessible images seems like a simple topic at first glance — you just need to add alt text to an image, right? But the topic is much more nuanced than some people think. In this article, we will review the different types of images, dive into some real-world examples of inaccessible public service announcements (PSAs), and discuss which elements matter most when critical messages need to reach everyone.


When it comes to informing the public about critical health issues, timing is everything. The information you consume today could save your life tomorrow. And with more than 65% of the population being visual learners — meaning they learn and remember best through visual communication — the job of creating and sharing accessible images has never been more important. This is especially true for public service announcements (PSAs) aimed at providing crucial and urgent information to the public.
But what happens when your users have visual impairments? Or dyslexia? Or cognitive disorders? How do they receive and understand this visual information? What elements make an image accessible or inaccessible?

Image Types And Alts

Before we dissect an image and examine each element that can make or break its accessibility, we first need to take a step back and think about the purpose of the image. Is it to inform a user? Elicit an emotion? Is the image acting as a link? Or is it purely eye-candy?
There are a number of questions that can help you determine how best to convey the image information to a person using an assistive technology (AT) device, like a screen reader.
“What type of message is the image trying to convey?”

“Is the message simple, complex, emotional, or actionable?”
Using a tool such as an online image decision tree or the simplified chart shown below can help you decide which category your image belongs to. Or just imagine your image has — poof! — vanished. Then ask yourself:
“Do I understand the content that remains?”
If the answer is yes, it is decorative. If not, the image is informative and contextually necessary. Once you determine what kind of image you are working with, there are some basic accessibility guidelines to consider.

Decorative Images

If you decide your image is decorative, then programmatically the image needs to be hidden. One way to do this is to use an empty/null alternative text attribute. This sends a signal to the AT devices to ignore this image as it is not needed to understand the content or action on the page. There are many ways to hide alternative text including using an empty/null alt (e.g. <img alt="">), using ARIA (e.g. <img role="presentation">, <img role="none">, or <img aria-hidden="true">), or by implementing the image as a CSS background.
Note: An empty/null alternative text attribute is not the same as a missing alternative text attribute. If the alternative text attribute is missing, the AT device might read out the file name or surrounding content in an attempt to give the user more information about the image. While aria-hidden="true" is an option to hide images, be cautious where you apply it as it will remove the entire element from the accessibility API.

<div class="drop-caps" aria-hidden="true">
    <img src=".../images/drop-caps/s.svg" alt="">
    <img src=".../images/drop-caps/character-12.svg" alt="">
</div>
In this drop cap example, both aria-hidden="true" and an empty/null alt <img alt=""> were used to hide the images from assistive technology devices. While this kind of redundancy is not necessary to make it accessible — it is also not harmful in this particular situation since the drop caps <div> does not contain any additional information we would need to expose to an AT user. Just remember: when it comes to accessible code, more is not always better.
Beyond programmatically hiding your image — there is not much more you need to consider when it comes to decorative images. If you are saying “But wait, what about X?” or “How about Y?” then you might need to go back to the image decision tree tools and re-evaluate your image — it might not be 100% decorative after all. One of the most difficult types of images to categorize tends to be the “emotional/mood” based images since this subtype is a bit subjective. What one person considers decorative another person might consider informative, so use your best judgment.

Informative Images

If you decide your image is informative, there are a lot more things to consider. For AT devices to understand the message or intent of an image, informative images must have programmatically-discernible alternative text. Typically, this is accomplished using the alt="[some description]" method, but there are many alternative ways to add image information depending on its subtype, type of image, and context (e.g. complex vs simple, SVG vs img). But having alternate text is not enough — it must also be meaningful. For example, if your image is about feeling safe at home, but your alternative information says “house” — does that convey the full message?
An example of an informative image is the following Smashing Magazine logo. If we ask the same question as before (does the context or content change if this image is missing?), then the answer is “yes.” In this example, the logo is both informative and actionable since it is both an image and a link. We can see from the code snippet that <a title="Back to the homepage"> is the link title and the image alternative text is <img alt="Smashing Magazine">. When we fire up an AT device — like a screen reader — we should hear both pieces of information conveyed.


<div class="logo">
    <a href="/" title="Back to the homepage">
        <picture>
        <source media="(min-width: 1350px)" srcset=".../images/logo-full.svg">
        <img src=".../images/logo/logo.svg" alt="Smashing Magazine">
        </picture>
    </a>
</div>
Hearing both the phrase “back to the homepage” and “Smashing Magazine” in one feature is OK since each phrase is unique and connected to a different purpose.
For more complex alternative text phrases, conduct the telephone test. For example, if you called up a friend and said “purple slug” and hung up the phone your friend would probably be confused, but also might think of a purple slug — but in what context? If you called a friend and said “the purple slug is eating my hydrangeas,” that would paint a more vivid picture — without adding a lot of additional characters or effort.
Of course, an AT user will have to listen to your alternative text, so don’t go overboard. That is why it is suggested to cap your text at 150 characters. If you need to add more context to the image (e.g. complex image), there are other, more descriptive patterns or methods you can use to add more detail.

World Beyond Image Alts

Now that we covered image types and alternative text attribute basics, let’s look beyond and consider some additional image elements:
In each real-world PSA example, we will look at the image through the lens of a different type of disability — keeping in mind that simulators are tools and may not represent an individual’s true experience. Yet, by using such tools, we can begin to build empathy into our designs and really consider the different ways our images are being consumed.
Note: To be clear, the following examples are for illustrative and educational purposes only and not meant to call-out or otherwise pass judgment about the designs in question. Also, there may be multiple issues in one PSA, but we will just focus on one issue type per example. There will be a lot of opportunities for improvement in the area of digital communications when the dust settles on COVID-19 and accessibility is just one more area to consider reviewing.

Color And Contrast

The beating heart of design arguably is color, and if color is the heart of design, then contrast is the muscle. Without good color contrast levels in place elements like words, icons, and other graphical shapes are hard to discern and the design can quickly become inaccessible. But what happens when you perceive color and contrast differently than others — does the same message and intent come through? How can we reach people with color-sensing issues? Color blindness — is a real concern for accessibility-focused designers.
Who Color And Contrast Can Affect
  • It is estimated that 300 million people worldwide are color blind, and approximately 95% of those inflicted are male (1 in 12 men vs 1 in 200 women are color blind). There are many different variants of color blindness, with red/green color blindness being the most common, followed by blue/yellow, and total color blindness being the most rare.
  • Globally there are 246 million people with low vision. People with visual impairments such as glaucoma, cataracts, macular degeneration, diabetic retinopathy, corneal clouding, etc, may have issues with text contrast. People with partial sight and older adults also often experience limited color vision.
  • People using monochrome displays or in certain situations (e.g. low lighting in a room) might have trouble with contrast. People using text-only, limited-color stylesheets, or in certain situations (e.g. too much glare on a screen) might have trouble discerning colors, too.
PSA Color Review
In the first example, we are reviewing PSAs from the non-profit group called the Ad Council — one of the oldest and most prolific producers of such material in the US. The aim of these “higher risk assets” is to reach populations considered more susceptible to contracting and becoming seriously ill by the novel coronavirus (one of the groups that need this information the most).

Next, we can see two types of color blindness simulated using the ChromeLens extension. ChromeLens is a Google Chrome extension that provides a suite of tools to help with web accessibility development and includes the Lens Vision Simulator, which transforms the colors on a website simulating what a colorblind person might see.
Simulated PSA with Deuteranopia (red/green-blindness)

Below is a breakdown of some color contrast ratios found on the PSAs between the different color blindness simulators.
Original PSA — color contrast ratio of 1.26:1 with the text “Have” against the background:

Simulated PSAs with Protanomaly (red-weak)


Deuteranopia simulation filter applied — color contrast ratio of 1.07:1 with the text “Have” against the background

Protanomaly simulation filter applied — color contrast ratio of 1:15:1 with the text “Have” against the background


While these PSAs incorporate a variety of striking color choices and are visually appealing (when testing the text against the background in these images), many of the combinations do not pass the Web Content Accessibility Guidelines (WCAG) color contrast ratios. This is true even for the unedited versions of these designs, but when we apply the ChromeLens color blindness simulator for Deuteranopia (red/green-blindness) Protanomaly (red-weak), the color contrast ratios get even worse (1.26:1 vs 1.07:1 and 1:15:1). To make these PSAs more accessible, we would want to bump up the contrast so people with color-related vision disorders could read the text.
PSA Contrast Review
Going back to the “higher-risk assets” from the Ad Council, we can see how the PSAs look like to people in two different low vision situations.
First, we see the unedited version of the PSAs

Next, using the NoCoffee Vision Simulator tool, we can see how the PSAs might look to someone with low vision and cataracts.
PSAs with simulated low vision filter applied

Below is a breakdown of some color contrast ratios found on the PSAs between the different low vision simulators.
Original PSA — color contrast ratio of 1.33:1 with the word “Undergoing” against the background

PSA with low vision simulation filter applied — color contrast ratio of 1.25:1 with the word “Undergoing” against the background

PSA with cataract simulation filter applied — color contrast ratio of 1.06:1 with the word “Undergoing” against the background

A lot of people blame color for their design accessibility issues, but these examples show that contrast plays a key role as well. Without changing the colors on these PSAs, but by changing the user perspective and blurring or obfuscating the text, we can see that the text on the images is more difficult to read — even though the contrast ratios didn’t change by much (1.33:1 vs 1.25:1 and 1.06:1). Similar to the color examples (to make these PSAs more accessible), we need to increase the contrast on these images so people with low vision and eye disorders could read the text.
Next Steps For Accessible Color And Contrast
Review the WCAG color contrast ratio guidelines and use tools like the Colour Contrast Analyser to check your designs. Your images with copy need a color contrast ratio of at least 4.5:1 for regular-sized text, and at least 3:1 for large-sized text (18pt and larger). The color contrast ratio of 3:1 also applies to essential icons. Try a tool like the A11y Color Palette where you can quickly review all the possible accessible color combinations and create a palette with accessibility in mind. Or use the accessibility features built-in into the palette generator Coolors.
Next, utilize solid color backgrounds (reading text on busy backgrounds, overlays, textures, or gradients is difficult in general), but especially when the text does not have enough contrast. By picking colors on the opposite ends of the color spectrum and avoiding red/green and blue/yellow combinations, you will increase the likelihood that your color and contrast ratios are robust. Use a tool like the ChromeLens extension to double-check the color contrast with color blindness in mind. Also, be careful with light shades of color — especially grays — they are difficult to see for people with low vision. Use tools like NoCoffee Vision Simulator to simulate low vision issues and see how your design holds up in these situations.
Going beyond color contrast ratios, it is also important to not use color alone to convey information. For example, “contact information can be seen in red” or “click the blue button to learn more.” The same is true for sensory characteristics such as shape, color, size, visual location, orientation, or sound — they cannot be used on their own. For example, if you said "Please click the link to the left of the image for more information," an AT user could have difficulty finding the correct link.

Typography and Layout

In a perfect world, we would keep our text and images separated. This would allow users to manipulate the typography and layout in any way they would want: font size, letter spacing/kerning, justification, margins/padding, and more. But unfortunately, there are a lot of formats that this kind of separation is difficult or impossible, such as social media posts, emails, PDFs, and other fixed form media.
Who Typography And Layout Can Affect
  • Typography is especially important to the estimated 15–20% of the world’s population with dyslexia — a learning disorder in which certain letters, numbers, or combinations of letters can be confusing or seem to flip/move around.
  • People with low vision can have issues with tight letter spacing/kerning, morphing words like “barn” into “bam” or “modern” into “modem” while reading.
  • For people with attention-deficit disorders and reading or vision-based disabilities, a complex layout is a real barrier. These users have trouble keeping their place and following the flow of the content due to the lack of whitespace and clear linear pathways.
PSA Typography And Layout Review
Let’s first take a look at a PSA from California’s Long Beach Health and Human Services.
If we are looking at this PSA from an accessibility point of view, what typography and layout issues do you see? In what ways could we improve this image?

If we focus on the typography and layout the following elements stand out:
Red hand-drawn linesIllustrating the multiple “rivers of space” created by the justified alignment.
Blue dotted boxesOutlining six different layout changes.
Pink numbersHighlighting the 14 different typography treatments discovered (ignoring the logo). Some changes are more obvious like font family or color changes, some are more subtle like alignment, size, or weight changes in the typography.
Green question marksWhat does this equation even mean? Cognitively this is a difficult thing to ascertain given the odd layout.
Black lines and dotsExpected 12 points of visual interest in an UX eye-tracking test based on the order of the content blocks (top to bottom, left to right) and typical equation flow (X + Y = Z).
Let’s look at another PSA and again evaluate the typography and layout from an accessibility point of view.
The third PSA example is more consistent when it comes to typography and layout, and has more overall whitespace and a linear visual pathway compared to the first two examples.
Next Steps For Accessible Typography And Layout
Less is more when it comes to accessible typography, so limit the number of different font families and variations such as italic, bold, ALL CAPS, or other styling methods that may make the content difficult to read. The research is not conclusive about whether serif or sans-serif typefaces are easier to read, but if you choose font families that have clearly defined letter shapes it is more likely that the font will be accessible. Some common offenders to look out for when choosing an inclusive font include the “I” (ex. India), “l” (ex. lettuce), and “1” (ex. one). Likewise, characters like “b” and “d” and “q” and “p” can sometimes be mirrored (either left-right or up-down), and the letter “B” and the number “8” oftentimes look too similar.
In regards to layout, less is also more. Try and repeat patterns whenever possible and limit the width of any blocked section to 80 characters (or 40 characters for logograms). Likewise, avoid paragraph alignment which creates whitespace or “rivers of space” within the content (e.g. justified alignment). Line spacing (leading) is at least space-and-a-half within paragraphs, and paragraph spacing is at least 1.5 times larger than the line spacing. Incorporating all of these layout guidelines will help people with attention-deficit disorders, reading and vision-based disabilities focus more on the content.

Copy And Icons

Last but not least, let’s focus on the actual PSA message. Arguably, copy is the key element in informing the public on the latest COVID-19 updates and providing information about preventing the spread of the virus. But icons in this situation serve up more than just decoration; these elements visually repeat the same message as the copy. No pressure, but both copy and icons need to be spot-on to reach the widest array of people.
Who Copy and Icons Can Affect
  • People with attention-deficit disorders — estimated at 129 million people worldwide — can have issues focusing on copy that is too long, does not break items into lists, and lacks whitespace (think: line height, paragraph margins, etc).
  • For people with certain cognitive disabilities, it is difficult to understand figurative language or specialized usage like the phrases “it’s raining cats and dogs” or “that test was a piece of cake.”
  • People with cognitive, language, and learning disabilities may need visual icons, graphics, and symbols to understand the accompanying copy.
PSA Copy Review
For this example, let’s test the copy of two PSAs from the Centers for Disease Control and Prevention (CDC) for readability. Readability is the ease with which a reader can understand a written text. Readability of copy depends on both the content and presentation.
Blue dotted boxesOutlining three different layout changes.
Pink numbersHighlighting the four different typography treatments discovered (ignoring the logos). In this case, only one font family was used, with variations only on size, color, and weight.
Black lines and dotsExpected eight points of visual interest in an UX eye-tracking test based on the order of the content blocks (top to bottom).

If we focus on the typography and layout the following elements stand out:
Blue dotted boxesOutlining nine different layout changes.
Green numbersHighlighting the 11 different typography treatments discovered (ignoring the logos). Some changes are more obvious like font family or color changes, some are more subtle like alignment, size, or weight changes in the typography.
Black lines and dotsExpected 10 points of visual interest in an UX eye-tracking test based on the order of the content blocks (top to bottom, left to right) and numbering order (1 to 6) forming a zig-zag type eye movement.
So far we’ve seen some examples where there are a lot of typography changes and the layouts are complex. Now, let’s review a cleaner PSA. This one is from the Prevention Action Alliance out of Columbus, Ohio.




If we evaluate the main body copy using readability indicator tools like Readable and The Readability Test, we see that the “What you should know about COVID-19 to protect yourself and others” PSA has 388 words at an average reading grade level of 9 and a Flesch Kincaid Reading Ease1 of 64.6. In addition to those metrics (for accessible copy), we also want to look at the number of complex words and their frequency — in this case, 35 and 9.02% respectively.



 This PSA has a lot more imagery and a lot less text. If we again evaluate the main copy, we see that our copy now has a total of 90 words with an average grade of 6 and a Flesch Kincaid Reading Ease of 83.6. The number of complex words is now down to 4 with a frequency of 4.44%.

Compared to the first PSA, the “Stop the Spread of Germs” PSA one has 298 fewer words and is easier to read by 3rd-grade levels. It has a reading ease level increase of 19 points, and is less complex. Based on these numbers, we can extrapolate that the second PSA is more inclusive than the first when looking at copy alone.
PSA Icon Review
But testing the readability of copy isn’t the only way to measure the effectiveness of a PSA when it comes to message accessibility. Another element we need to look at are the icons accompanying the copy. If we are presented only the icons, will the same message be received?
Let’s now look at a couple of examples. Based on the icons alone, what is the message that the image is trying to convey about riding your bicycle safely during COVID-19?

This is the unedited PSA. Were you able to figure out the full message? While you might have been able to guess correctly for a couple of icons, were there parts of the message you missed not having the copy?
OK, let’s take a look at another example. This next PSA comes from the Pennsylvania Department of Health. Let’s do the same exercise as before: can you understand the message in this PSA (without the icon copy)?



Now we can see the PSA with copy. Were you able to figure out the full message? While there may have been an icon or two that tripped you up, was it easier to decipher the icons on the second PSA versus the first? Hopefully, this quick exercise helped you understand the critical role icons play in the message.
Next Steps for Accessible Copy and Icons
Be clear and concise. The unofficial rule of thumb is to write for a 9th-grade reading level. This level is based on the assumption that most people reach the 12th-grade reading level, but in times of peak stress, they might not be reading at their highest level. Try and use plain language and avoid technical jargon, fancy words, colloquialisms, and expressions. Likewise, make sure any acronyms, abbreviations, or unusual words are explained in more detail or linked out to additional resources. Tools like Readable and The Readability Test can help you determine the reading level of your copy, while tools like Hemingway Editor or Grammarly can suggest edits to make your copy more inclusive.
Use icons, graphics, and symbols to supplement copy whenever possible. Adding imagery allows you to break down some language and cognitive barriers and not rely on your typography to carry all the weight. Just be sure to choose icons that are common or don’t require a lot of thought.

Wrapping Up

Creating accessible images involves a lot more than just adding alt text. It is important to consider how all image elements — color, contrast, typography, layout, copy, and icons — affect your users as well. By taking a bit more time and building these accessibility principles into your images you will undoubtedly reach more people — on their terms. In uncertain times like these, we need to be sure we are addressing all the ways we can improve our images to be more inclusive in our messaging.