speak-as
Quick Summary for speak-as (@counter-style)
The speak-as descriptor specifies how a counter symbol constructed with a given @counter-style will be represented in the spoken form. For example, an author can specify a counter symbol to be either spoken as its numerical value or just represented with an audio cue.
Code Usage for speak-as (@counter-style)
/* Keyword values */ speak-as: auto; speak-as: bullets; speak-as: numbers; speak-as: words; speak-as: spell-out;  /* @counter-style name value */ speak-as: <counter-style-name>; 
More Details for speak-as (@counter-style)

speak-as

The speak-as descriptor specifies how a counter symbol constructed with a given @counter-style will be represented in the spoken form. For example, an author can specify a counter symbol to be either spoken as its numerical value or just represented with an audio cue.

Syntax

/* Keyword values */ speak-as: auto; speak-as: bullets; speak-as: numbers; speak-as: words; speak-as: spell-out;  /* @counter-style name value */ speak-as: <counter-style-name>; 

Values

auto

If the value of speak-as is specified as auto, then the effective value of speak-as will be determined based on the value of the system descriptor:

If the value of system is alphabetic, the effective value of speak-as will be spell-out. If system is cyclic, the effective value of speak-as will be bullets. If system is extends, the value of speak-as will be the same as if speak-as: auto is specified on the extended style. For all other cases, specifying auto has the same effect as specifying speak-as: numbers. bullets

A phrase or an audio cue defined by the user agent for representing an unordered list item will be read out.

numbers

The numerical value of the counter will be read out in the document language.

words

The user agent will generate a counter value as normal and read it out as a word in the document language.

spell-out

The user agent will generate a counter representation as normal and would read it out letter by letter. If the user agent doesn't know how to read out a particular counter symbol, the user agent might read it out as if the value of speak-as was numbers.

<counter-style-name>

The name of another counter style, specified as a <custom-ident>. If included, the counter will be spoken out in the form specified in that counter style, kind of like specifying the fallback descriptor. If the specified style does not exist, speak-as defaults to auto.

Accessibility concerns

Assistive technology support is very limited for the speak-as property. Do not rely on it to convey information critical to understanding the page's purpose.

Let's Talk About Speech CSS | CSS Tricks

Formal definition

Related at-rule@counter-style
Initial valueauto
Computed valueas specified

Formal syntax

auto | bullets | numbers | words | spell-out | <counter-style-name>

where <counter-style-name> = <custom-ident>

Examples

Setting the spoken form for a counter

HTML
<ul class="list">   <li>One</li>   <li>Two</li>   <li>Three</li>   <li>Four</li>   <li>Five</li> </ul> 
CSS
@counter-style speak-as-example {   system: fixed;   symbols:     ;   suffix: " ";   speak-as: numbers; }  .list {   list-style: speak-as-example; } 
Result

Specifications

Specification
CSS Counter Styles Level 3 # counter-style-speak-as

See also

list-style, list-style-image, list-style-position symbols(), the functional notation creating anonymous counter styles.

Last modified: Dec 20, 2021, by MDN contributors

Select your preferred language English (US)Français日本語中文 (简体) Change language

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
Our brains are wired to find things we are looking for - if your always cynical or waiting for things to go wrong, then your life will reflect that. On the other hand, having a positive outlook on life will bring you joy and provide you with inspiration when you least expect it ☀️🍉🌴
Unknown
Random CSS Property

conic-gradient()

The conic-gradient() CSS function creates an image consisting of a gradient with color transitions rotated around a center point (rather than radiating from the center). Example conic gradients include pie charts and color wheels. The result of the conic-gradient() function is an object of the <gradient> data type, which is a special kind of <image>.
conic-gradient() css reference