๐Ÿ‘ฉ‍๐Ÿ’ป๊ฐœ๋ฐœ_TIL/์—๋Ÿฌ

[๋ฆฌ์•กํŠธ]img elements must have an alt prop

Daisy.lee 2021. 12. 16. 14:39

์ด๋ฏธ์ง€๋ฅผ ๋ Œ๋”๋งํ•  ๋•Œ ์œ„์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.

์ฐพ์•„๋ณด๋‹ˆ img ํƒœ๊ทธ์— alt ์†์„ฑ์„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์œผ๋ฉด ๋ฐœ์ƒํ•˜๋Š” warning์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

(์ถœ์ฒ˜: stackoverflow)

 

What does this warning message mean? 'img elements must have an alt prop, either with meaningful text, or an empty string for de

Why am I getting this warning? warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/img-has-alt It's showing line number ...

stackoverflow.com

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

์ €๋Š” ํŠน๋ณ„ํ•œ ์„ค๋ช…์„ ์“ฐ์ง€ ์•Š๊ณ  ๋นˆ๋ฌธ์ž์—ด๋กœ alt ์†์„ฑ์„ ์ง€์ •ํ•ด์ฃผ์—ˆ์Šต๋‹ˆ๋‹ค.

์•„๋ž˜์™€ ๊ฐ™์ด ์ง€์ •ํ•ด์ฃผ๋‹ˆ ์ •์ƒ์ ์œผ๋กœ ์ปดํŒŒ์ผ๋ง ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.๐Ÿ˜Š