web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
946 B

  1. # [Deprecated] accessible-emoji
  2. Emoji have become a common way of communicating content to the end user. To a person using a screenreader, however, they may not be aware that this content is there at all. By wrapping the emoji in a `<span>`, giving it the `role="img"`, and providing a useful description in `aria-label`, the screenreader will treat the emoji as an image in the accessibility tree with an accessible name for the end user.
  3. ## Rule details
  4. This rule takes no arguments.
  5. ### Succeed
  6. ```jsx
  7. <span role="img" aria-label="Snowman">&#9731;</span>
  8. <span role="img" aria-label="Panda">🐼</span>
  9. <span role="img" aria-labelledby="panda1">🐼</span>
  10. ```
  11. ### Fail
  12. ```jsx
  13. <span>🐼</span>
  14. <i role="img" aria-label="Panda">🐼</i>
  15. ```
  16. ## Accessibility guidelines
  17. - [WCAG 1.1.1](https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html)
  18. ### Resources
  19. - [Léonie Watson, Accessible Emoji](http://tink.uk/accessible-emoji/)