简体   繁体   中英

I am using aria-live to announce a string. How do I make sure that the string is announced immediately before any other event announcement?

I am using aria-live to announce string. How to make sure that string is announced immediately before anything else is announced? The second part to the problem is that "aria-live announces only when text gets changed". How do I announce the same string repeatedly?

To announce a string immediately, use aria-live="assertive" . "assertive" will announce the updates to the user as soon as possible. You can also use aria-live="rude" which will announce the updates straight away, even if this interrupts the user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM