demo · v140

counter() in alt

Toggle between the old and new behaviour. The visible bullets stay the same — what changes is what a screen reader announces. With v140 the / alt segment can call counter(), so AT hears a meaningful number.

  1. Pick up the dry cleaning
  2. Book the dentist for Tuesday
  3. Reply to Cara about the merge
  4. Renew the domain
What a screen reader announces:
li::before {
  content: "★ " / "item " counter(item);
  /* Visible: ★    | AT alt text: "item 1", "item 2", ... */
}

see also