I want to have aria-label in span get announced. I did a lot search, found a solution that add role="img". However, in this way, the "image" word will also be announced. I am wondering if there is a hack way to only announce the aria-label or aria-description for span?
For example, I want "123" to be announced:
<span aria-description="123">456</span>
The aria-label
is sometimes ignored by some assistive technology if the element you put it on doesn't have any semantic meaning. A <span>
doesn't have semantic meaning. If you add a role that is appropriate for your description, then it should be read correctly.
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.