π¨ Palette: λΉνμ±ν λ²νΌ μ κ·Όμ±(a11y) κ°μ #575
π¨ Palette: λΉνμ±ν λ²νΌ μ κ·Όμ±(a11y) κ°μ #575seonghobae wants to merge 2 commits into
Conversation
- `App.tsx`μ μ€μ (Settings), λμλ§(Help), νλ‘μ νΈ μ μ₯(Save Project) λ²νΌμ΄ ν΄νμ νμνκΈ° μν΄ `span role="button"`μΌλ‘ κ°μΈμ Έ μλ μν°ν¨ν΄μ μ κ±°νμ΅λλ€.
- λ€μ΄ν°λΈ `<button>` μμμ `aria-disabled="true"`λ₯Ό μ μ©νκ³ `onClick={(e) => e.preventDefault()}`λ₯Ό μΆκ°νμ¬ ν€λ³΄λ ν¬μ»€μ€μ μ€ν¬λ¦° 리λ μ κ·Όμ±μ 보μ₯νλ©΄μ ν΄λ¦ μ΄λ²€νΈλ₯Ό μ°¨λ¨νμ΅λλ€.
- `App.test.tsx`μ κ΄λ ¨ ν
μ€νΈλ₯Ό μ
λ°μ΄νΈνμ¬ μλ‘ κ΅¬νλ λ²νΌλ€μ μ κ·Όμ± μ²λ¦¬ λ° `defaultPrevented` μνλ₯Ό κ²μ¦νμ΅λλ€.
- λ³κ²½λ λ²νΌλ€μ μκ°μ μν μ μ§λ₯Ό μν΄ CSS ν΄λμ€(opacity, cursor)λ₯Ό ν΅ν©νμ΅λλ€.
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- `App.tsx`μ μ€μ (Settings), λμλ§(Help), νλ‘μ νΈ μ μ₯(Save Project) λ²νΌμ΄ ν΄νμ νμνκΈ° μν΄ `span role="button"`μΌλ‘ κ°μΈμ Έ μλ μν°ν¨ν΄μ μ κ±°νμ΅λλ€.
- λ€μ΄ν°λΈ `<button>` μμμ `aria-disabled="true"`λ₯Ό μ μ©νκ³ `onClick={(e) => e.preventDefault()}`λ₯Ό μΆκ°νμ¬ ν€λ³΄λ ν¬μ»€μ€μ μ€ν¬λ¦° 리λ μ κ·Όμ±μ 보μ₯νλ©΄μ ν΄λ¦ μ΄λ²€νΈλ₯Ό μ°¨λ¨νμ΅λλ€.
- `App.test.tsx`μ κ΄λ ¨ ν
μ€νΈλ₯Ό μ
λ°μ΄νΈνμ¬ μλ‘ κ΅¬νλ λ²νΌλ€μ μ κ·Όμ± μ²λ¦¬ λ° `defaultPrevented` μνλ₯Ό κ²μ¦νμ΅λλ€.
- λ³κ²½λ λ²νΌλ€μ μκ°μ μν μ μ§λ₯Ό μν΄ CSS ν΄λμ€(opacity, cursor)λ₯Ό ν΅ν©νμ΅λλ€.
π‘ μμ λ΄μ© (What)
App.tsxνμΌ λ΄μμ λΉνμ±νλ λ²νΌ(μ€μ , λμλ§, νλ‘μ νΈ μ μ₯)μ ν΄νμ νμνκΈ° μν΄ μ¬μ©λspan role="button"λνΌ(wrapper)λ₯Ό μ κ±°νκ³ , λ€μ΄ν°λΈ<button>μμλ₯Ό μ§μ μ¬μ©νλλ‘ λ¦¬ν©ν λ§νμ΅λλ€. λν μ΄μ λ§μΆ°App.test.tsxμ λ¨μ ν μ€νΈλ μ λ°μ΄νΈνμ΅λλ€.π― ν΄κ²°ν λ¬Έμ (Why)
κΈ°μ‘΄μλ λΉνμ±νλ
<button disabled>λ₯Ό ν¬μ»€μ€κ° κ°λ₯ν<span role="button" tabIndex={0}>μΌλ‘ κ°μΈ ν΄νμ΄ λ³΄μ΄λλ‘ κ΅¬ννμ΅λλ€. μ΄ λ°©μμ μνΈμμ© κ°λ₯ν μμκ° μ€μ²©λλ κ²°κ³Όλ₯Ό λ³μ μΉ μ κ·Όμ±(a11y) κΈ°μ€μ μλ°νλ©° μ€ν¬λ¦° 리λμμ μ¬λ°λ₯΄κ² μ½νμ§ μλ λ¬Έμ κ° μμμ΅λλ€. μ΄λ₯Ό κ°μ νμ¬ ν€λ³΄λ λ΄λΉκ²μ΄μ , μ€ν¬λ¦° 리λ, ν΄ν λͺ¨λκ° μ μ μλνλλ‘ νμ΅λλ€.βΏ μ κ·Όμ± κ°μ (Accessibility)
<span role="button">λ΄λΆμ<button disabled>).disabledμμ±κ³Όpointer-events-noneν΄λμ€λ₯Ό μ κ±°νκ³ λ¨μΌ<button>μμμaria-disabled="true"λ₯Ό μ€μ νμ΅λλ€.onClick={(e) => e.preventDefault()}λ‘ μ΄λ²€νΈλ₯Ό μ°¨λ¨νμ¬ λ Όλ¦¬μ μΌλ‘λ§ λΉνμ±νλκ² λ§λ€κ³ ν΄ν(title)κ³Ό ν¬μ»€μ€ λ§μ μ μ μλνλλ‘ μμ νμ΅λλ€.PR created automatically by Jules for task 7168046837353044761 started by @seonghobae