Skip to content
easeweb
Search topics

Smiley-face ratings announced only as "button"

A feedback card asks how a suggestion was with five faces, each a button whose only content is a drawing hidden from assistive technology and whose title is empty, so every face is announced as "button", and the words "Very bad" and "Very good" sit apart under the ends, tied to no face.

WCAG 2.2
SC 2.1.1ASC 4.1.2ASC 1.3.1ASC 1.1.1A
Required by
Section 508 · EN 301 549 (EU)
Broken <button><svg aria-hidden="true">
The accessibility problem illustrated: No vision:Which face is this?
01

The problem

Screen reader users hear five buttons with no names and can't tell which face means what, and voice control users can't name a face to press it, so they can't answer, or send an answer they didn't mean.

02

Try it

Press Tab to move through the faces, and listen to what each one is called.

The panel shows what a screen reader says as focus lands on a face, and the whole card read from the top. Which face is “Very good”, and where are those words read?

Broken Can you fix this?

BrokenFaces with an empty title
How is this suggestion?
Very bad
Very good

Screen reader says:

(Tab to a face)

Reading the card from the top:

  1. How is this suggestion?
  2. button
  3. button
  4. button
  5. button
  6. button
  7. Very bad
  8. Very good

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Name each face by its value in words, and make the question the name of the group.

  1. 1Name every face by its value in words, with text inside its button.
  2. 2Group the faces under the question, as a fieldset's legend.
  3. 3Put words shown beside a face inside its button, where they are its name.
Before Faces with an empty title
<form class="survey" action="/feedback" method="post">  <div>    <div class="question">How is this suggestion?</div>    <div class="faces">      <button class="face" name="answer" value="1" title="">        <svg aria-hidden="true">          <use href="#face-very-bad"></use>        </svg>      </button>      <button class="face" name="answer" value="2" title="">        <svg aria-hidden="true">          <use href="#face-bad"></use>        </svg>      </button>      <button class="face" name="answer" value="3" title="">        <svg aria-hidden="true">          <use href="#face-okay"></use>        </svg>      </button>      <button class="face" name="answer" value="4" title="">        <svg aria-hidden="true">          <use href="#face-good"></use>        </svg>      </button>      <button class="face" name="answer" value="5" title="">        <svg aria-hidden="true">          <use href="#face-very-good"></use>        </svg>      </button>    </div>    <div class="ends">      <div>Very bad</div>      <div>Very good</div>    </div>  </div></form>
After

The values in the buttons, the design kept

<form class="survey" action="/feedback" method="post">  <fieldset>    <legend class="question">How is this suggestion?</legend>    <div class="faces">      <button class="face" name="answer" value="1">        <svg aria-hidden="true">          <use href="#face-very-bad"></use>        </svg>        <span class="end">Very bad</span>      </button>      <button class="face" name="answer" value="2">        <svg aria-hidden="true">          <use href="#face-bad"></use>        </svg>        <span class="visually-hidden">Bad</span>      </button>      <button class="face" name="answer" value="3">        <svg aria-hidden="true">          <use href="#face-okay"></use>        </svg>        <span class="visually-hidden">Okay</span>      </button>      <button class="face" name="answer" value="4">        <svg aria-hidden="true">          <use href="#face-good"></use>        </svg>        <span class="visually-hidden">Good</span>      </button>      <button class="face" name="answer" value="5">        <svg aria-hidden="true">          <use href="#face-very-good"></use>        </svg>        <span class="end">Very good</span>      </button>    </div>  </fieldset></form>

Fixing this with an AI coding assistant? Get this guide as Markdown, or get every guide in your coding agent.

04

Design ideas

Faces, pills or thumbs, as long as every answer has its word.

Four ways to draw a quick feedback question. Try each with Tab: three give every answer a word, and one leaves a screen reader to read out the pictures.

In the design file

  • Write a word for every face, from “Very bad” to “Very good”, even where only the two ends show one. Screen readers and voice control use those words.
  • Write the question above the answers, as the name of the group.
  • Draw an answer with its focus ring, and the chosen answer too if it can change before it is sent.
  • Draw the row at a phone’s width, with every word that shows still fitting.

Passes

  • How is this suggestion? Choose a face
    Faces, the chosen one named Five faces from very bad to very good, each named for what it means, and the chosen one’s word written under the row, so nobody has to read a face. The choice can change until the form is sent. The chosen face takes an amber tint and a #b45309 ring, 5.02:1 on white.
  • How is this suggestion?
    Pills with a face and a word Five rounded pills, each a small face beside its word, in a row that wraps onto two lines on a phone. A press sends the answer. The words name each pill, and the #6b7280 outline, 4.83:1 on white, marks its edge.
  • How is this suggestion?
    Two thumbs, each with its word When two answers are enough: a thumb down with “Not for me” and a thumb up with “Good pick”, in outlined buttons. The words carry the meaning, so nobody has to work out which way a thumb points.

Fails

  • How is this suggestion?
    Emoji aloneWCAG 1.1.1 Five emoji, 😠 to 😄, look friendly and need no icon set, but each button’s name is the emoji’s own, such as “angry face”, which describes the picture, not the answer it stands for.
05

Verify the fix

4 checks, no mouse.

Test with: Screen reader, Speech input, Keyboard, Touch

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the card or its icon component changes.

Limits

This is a starting pattern, not a guarantee for every application. The CSS is a sketch: check the size of the faces, the space between them and their focus ring against your own design. Such a card may also have a close button drawn as an X with no name; that is the failure covered in icon-only buttons with no accessible name. Whether the thanks that replaces the faces after an answer is heard is covered in status messages that are shown but never announced. Faces told apart only by colour, such as a red, a yellow and a green circle, are a different failure, left to the topic on colour alone, whose guide is in progress. Test the whole card with a screen reader, voice control and a phone.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work