Eslint-plugin-jsx-a11y: The accessible-emoji rule and aria-hidden="true"

Created on 16 Mar 2018  路  4Comments  路  Source: jsx-eslint/eslint-plugin-jsx-a11y

Hi there! Thanks for the incredible work on this. I've learned a lot about a11y best practices through the warnings.

My question is regarding the accessible-emoji rule:

If an emoji is purely an aesthetic element and does not modify the meaning of the content, would it be considered an anti-pattern to use aria-hidden="true" on the wrapper <span> instead of the attributes required by the current accessible-emoji rule?

Thanks a million!

bug

Most helpful comment

Also ran into this. Same use cases as alt="" in general.

All 4 comments

What purpose does the emoji serve if it doesn't have its own meaning related to the content? Can you provide an example?

Hi @ljharb,

I have the same issue on a similar case where the emoji is just used as a decorative element:
screen shot 2018-06-19 at 4 56 36 pm

Maybe you have an idea on how it should be handled differently?

Thanks, that makes sense.

Also ran into this. Same use cases as alt="" in general.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Steve-O-Cassels picture Steve-O-Cassels  路  5Comments

chemitaxis picture chemitaxis  路  6Comments

jessebeach picture jessebeach  路  3Comments

markduan picture markduan  路  5Comments

davidleger95 picture davidleger95  路  4Comments