demo · v138

counter() / counters() in content alt text

The visual marker uses upper-roman, but the accessibility tree gets a plain "Section 1" via the alt-text half of content. Add or remove sections, then peek the alt text the AT actually reads.

checking support…
  1. Introduction
  2. Background
  3. Conclusion

accessible name read for each ::before pseudo (computed from alt text):

the code

li::before {
  /* Slash separates visual content from alt text */
  content: "§ " counter(section, upper-roman) "  "
         / "Section " counter(section);
}

see also