๊ณต์‚ผ
article thumbnail


๐Ÿ’ฌ ๋“ค์–ด๊ฐ€๋ฉฐ

ํ”„๋กœ์ ํŠธ๊ฐ€ ๋๋‚œ ํ›„ ์Šฌ๋น„์Œค์ด ํ•ด์ฃผ์‹  ํ”ผ๋“œ๋ฐฑ์„ ํ†ตํ•ด ์ ‘๊ทผ์„ฑ์— ๋Œ€ํ•ด ๋˜๋Œ์•„๋ณด๊ณ  ์žˆ๋‹ค.

 

์ƒ๊ฐ๋ณด๋‹ค ์ ‘๊ทผ์„ฑ์— ๋Œ€ํ•ด ๋†“์นœ๋ถ€๋ถ„์ด ๋งŽ์•„์„œ... ์ˆ˜์ •์„ ํ•˜๋˜ ์ค‘ ๊ณต์œ ํ•˜๊ณ  ์‹ถ์€ ๋ถ€๋ถ„์„ ์ ์–ด๋ณด๋ ค ํ•œ๋‹ค.

 

 

 

โ“ ๋ฌธ์ œ ์ƒํ™ฉ

์Šคํฌ๋ฆฐ ๋ฆฌ๋”๊ฐ€ ํŽ˜์ด์ง€๋ฅผ ์ฝ์„ ๋•Œ, ๊ด„ํ˜ธ, ๊บฝ์‡ ๋“ฑ์„ ๋ชจ๋‘ ์ฝ์–ด๋‚ด๋ฉฐ ์Šคํฌ๋ฆฐ๋ฆฌ๋”๋ฅผ ์ด์šฉํ•˜๋Š” ์‚ฌ์šฉ์ž์—๊ฒŒ๋Š” ํ•„์š”ํ•˜์ง€ ์•Š์€์ •๋ณด๋ฅผ ์ œ๊ณตํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ทธ ๋ถ€๋ถ„์„ ์ˆ˜์ •ํ•ด์•ผ ํ–ˆ๋‹ค. 

 

ํ•ด๋‹น ํŽ˜์ด์ง€๋Š” Reactํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ–ˆ๋˜ ์šฐ๋™์ง‘์˜ About Us ํŽ˜์ด์ง€ ์ด๋‹ค.

 

about us ํŽ˜์ด์ง€

 

๐Ÿ’ก ๋ฌธ์ œ ํ•ด๊ฒฐ

์บ๋ฆญํ„ฐ ์ด๋ฏธ์ง€๋ฅผ "์บ๋ฆญํ„ฐ ์ด๋ฏธ์ง€" ๊ทธ์ž์ฒด๋กœ ์ฝ์–ด๋‚ด์ฃผ๋Š” ์ •๋ณด๊ฐ€ ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค๋Š” ๋Š๋‚Œ์ด ๋“ค์–ด img ํƒœ๊ทธ์˜ alt=""๋ฅผ ๊ณต๋ฐฑ์œผ๋กœ ๋’€๋‹ค. 

 

๋˜ํ•œ const ๋‚˜ let๋“ฑ ์Šคํฌ๋ฆฐ๋ฆฌ๋”๋กœ ์ฝ์–ด์ฃผ๋Š”๊ฒŒ ํ•„์ˆ˜ ์š”์†Œ๊ฐ€ ์•„๋‹Œ ๋ถ€๋ถ„์€ ์ฝ์–ด์ฃผ์ง€ ์•Š๋Š”๊ฒŒ ๋‚ซ๊ณ  ๋˜ํ•œ,

 

< Link to ... ๋“ฑ ์Šคํฌ๋ฆฐ๋ฆฌ๋”๊ฐ€ ์ฝ์œผ๋ฉด ์•ˆ๋˜๋Š” ๋ถ€๋ถ„์„ ์ฝ์ง€ ์•Š๊ฒŒํ•˜๊ณ , ์ˆจ๊น€์ฒ˜๋ฆฌ๋กœ ์Šคํฌ๋ฆฐ๋ฆฌ๋”๋ฅผ ์œ„ํ•œ ์„ค๋ช…์„ ์ ์–ด์คฌ๋‹ค.

 

<h3 className="sr-only">{name}์˜ ๊นƒํ—ˆ๋ธŒ๋กœ ์ด๋™</h3>

 

< Link to... ๋“ฑ ํƒœ๊ทธ๋“ค์€ ๋ชจ๋‘ aria-hidden ์œผ๋กœ ์ˆจ๊น€์ฒ˜๋ฆฌ๋ฅผ ํ•˜๊ณ , ์œ„์˜ ์ฝ”๋“œ๋ฅผ ์ด์šฉํ•˜์—ฌ ์Šคํฌ๋ฆฐ๋ฆฌ๋”๋ฅผ ์œ„ํ•œ h3 ์ œ๋ชฉ์„ ๋ถ™์—ฌ์คฌ๋‹ค.

 

 

 

๐Ÿ“š ๋งˆ์น˜๋ฉฐ

      <span className="text-white " aria-hidden="true">
        {"<"}
      </span>
      <span className="text-teal-300 " aria-hidden="true">
        Link{" "}
      </span>
      <span className="text-[#57F984] " aria-hidden="true">
        to
      </span>
      <span className="text-[#F97AA9] " aria-hidden="true">
        =
      </span>
      <span className="text-teal-300 " aria-hidden="true">
        {"{"}
      </span>
      <span className="text-white " aria-hidden="true">
        github
      </span>
      <span className="text-teal-300 " aria-hidden="true">
        {"}"}
      </span>
      <span className="text-white " aria-hidden="true">
        {"/>"}
      </span>

 

์œ„์˜ ์ฝ”๋“œ๋“ค ์ฒ˜๋Ÿผ ์Šคํฌ๋ฆฐ๋ฆฌ๋”๊ฐ€ ์ฝ์ง€ ์•Š์•„์•ผํ•˜๋Š” ๋ถ€๋ถ„์€ 

 

aria-hidden="true"

 

์„ ์ด์šฉํ•˜์—ฌ ํ…์ŠคํŠธ๋Š” ํ™”๋ฉด์— ๋ณด์ด๊ณ , ์Šคํฌ๋ฆฐ๋ฆฌ๋”๋Š” ์ฝ์ง€ ๋ชปํ•˜๋„๋ก ์„ค์ •ํ•˜์˜€๋‹ค.

 

 

 

 

๐Ÿ”— ์ฐธ๊ณ 

https://yceffort.kr/2021/03/hiding-contents-with-html-and-css

 

Home

yceffort

yceffort.kr

 

profile

๊ณต์‚ผ

@g_three

ํฌ์ŠคํŒ…์ด ์ข‹์•˜๋‹ค๋ฉด "์ข‹์•„์š”โค๏ธ" ๋˜๋Š” "๊ตฌ๋…๐Ÿ‘๐Ÿป" ํ•ด์ฃผ์„ธ์š”!