<button type="button" role="switch" aria-checked="true" class="ant-switch ant-switch-checked">
<div class="ant-switch-handle"></div>
<span class="ant-switch-inner">
<span class="ant-switch-inner-checked"></span>
<span class="ant-switch-inner-unchecked"></span>
</span>
</button>
๐ ์ปดํฌ๋ํธ ์ ๋ณด
๐ ์ฐธ์กฐ ๋ฐ ๋ ํผ๋ฐ์ค
๐ ์ ๊ทผ์ฑ ๋ฐ ARIA ์ ์ฉ ์ฌ๋ถ
role="switch": ์์๊ฐ switch์์ ๋ํ๋aria-checked="true|false": switch์ ์ํ(on/off)๋ฅผ ๋ํ๋aria-labelledby,aria-label: switch์ ๋ ์ด๋ธ์ ์ ๊ณตaria-describedby: switch์ ๋ํ ์ถ๊ฐ ์ค๋ช ์ ์ ๊ณตaria-hidden์์ฑ ์ฌ์ฉrole="switch"์aria-checked๋ฅผ ์ฌ์ฉํ์ฌ switch์ ์ญํ ๊ณผ ์ํ๋ฅผ ์ ๋ฌ๐๏ธ ๋งํฌ์ ๊ตฌ์กฐ ๋ถ์
<div role="switch">,<span><div class="MuiSwitch-root">,<input type="checkbox" role="switch"><button type="button" role="switch">role๊ณผaria-*์์ฑ ์ฌ์ฉ<input type="checkbox" role="switch">๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์คํ์ผ๋ง ๋ฐ ๊ธฐ๋ฅ ์ถ๊ฐ<button>์ ๊ธฐ๋ฐ์ผ๋ก ์คํ์ผ๋ง ๋ฐ ๊ธฐ๋ฅ ์ถ๊ฐํ๊ณrole๊ณผaria-*์์ฑ์ผ๋ก ์ ๊ทผ์ฑ ๋ณด์ฅ๐ก UI ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋น๊ต ๋ถ์
<div>์<input type="checkbox" role="switch">๋ฅผ ์ฌ์ฉํ์ฌ ๊ตฌํ<button>์ ์ฌ์ฉํ์ฌ ๊ตฌํrole๊ณผaria-*์์ฑ์ ์ฌ์ฉํ์ฌ ์ ๊ทผ์ฑ ๋ณด์ฅโ๏ธ ๊ตฌํ ๋ฐ ์ค๊ณ ๊ณ ๋ ค์ฌํญ
๐ ํ ์คํธ ๋ฐ ๊ฒํ
๐ ์ถ๊ฐ ์ฐธ๊ณ ์ฌํญ
๐ฏ ์ญํ , ์์ฑ, ์ํ ๋ฐ ํ๊ทธ ์์ฑ
switcharia-checked: switch์ ์ํ(on/off)๋ฅผ ๋ํ๋aria-labelledby,aria-label: switch์ ๋ ์ด๋ธ์ ์ ๊ณตaria-describedby: switch์ ๋ํ ์ถ๊ฐ ์ค๋ช ์ ์ ๊ณตchecked: switch์ ์ํ(on/off)๋ฅผ ๋ํ๋