From 418c15e3f657bef18ee843cf51d92899b79afcd6 Mon Sep 17 00:00:00 2001 From: MelvinBot Date: Fri, 6 Feb 2026 20:36:16 +0000 Subject: [PATCH 1/4] Fix: forward aria-checked in BaseGenericPressable and add accessibilityState to Checkbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Forward accessibilityState.checked as aria-checked in BaseGenericPressable so web screen readers correctly announce checkbox/radio state - Add accessibilityState with checked property to Checkbox component so native platforms (Android TalkBack) correctly announce state Co-authored-by: Marco Chávez --- src/components/Checkbox.tsx | 3 +++ .../GenericPressable/implementation/BaseGenericPressable.tsx | 1 + 2 files changed, 4 insertions(+) diff --git a/src/components/Checkbox.tsx b/src/components/Checkbox.tsx index 6cc08379704f7..18c8a3fff7984 100644 --- a/src/components/Checkbox.tsx +++ b/src/components/Checkbox.tsx @@ -131,6 +131,9 @@ function Checkbox({ style={[StyleUtils.getCheckboxPressableStyle(containerBorderRadius + 2), style]} // to align outline on focus, border-radius of pressable should be 2px more than Checkbox onKeyDown={handleSpaceOrEnterKey} role={CONST.ROLE.CHECKBOX} + accessibilityState={{ + checked: isIndeterminate ? ('mixed' as const) : isChecked, + }} /* true → checked false → unchecked mixed → indeterminate */ diff --git a/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx b/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx index 055574bfb220e..b621408328484 100644 --- a/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx +++ b/src/components/Pressable/GenericPressable/implementation/BaseGenericPressable.tsx @@ -200,6 +200,7 @@ function GenericPressable({ ...accessibilityState, }} aria-disabled={isDisabled} + aria-checked={accessibilityState?.checked} aria-selected={accessibilityState?.selected} aria-keyshortcuts={keyboardShortcut && `${keyboardShortcut.modifiers.join('')}+${keyboardShortcut.shortcutKey}`} // ios-only form of inputs From 3278d5f2fc56d5cc10eba074c44652b64bef56fb Mon Sep 17 00:00:00 2001 From: MelvinBot Date: Fri, 6 Feb 2026 21:35:17 +0000 Subject: [PATCH 2/4] Remove redundant aria-checked from Checkbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BaseGenericPressable already forwards accessibilityState.checked as aria-checked, making the explicit prop unnecessary. Co-authored-by: Marco Chávez --- src/components/Checkbox.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/Checkbox.tsx b/src/components/Checkbox.tsx index 18c8a3fff7984..3db1fc74ccdf2 100644 --- a/src/components/Checkbox.tsx +++ b/src/components/Checkbox.tsx @@ -134,10 +134,6 @@ function Checkbox({ accessibilityState={{ checked: isIndeterminate ? ('mixed' as const) : isChecked, }} - /* true → checked - false → unchecked - mixed → indeterminate */ - aria-checked={isIndeterminate ? 'mixed' : isChecked} accessibilityLabel={accessibilityLabel} pressDimmingValue={1} wrapperStyle={wrapperStyle} From 7c7449ddaf5eecabc2bbbfed0b88f69c238b0c19 Mon Sep 17 00:00:00 2001 From: MelvinBot Date: Fri, 6 Feb 2026 21:43:21 +0000 Subject: [PATCH 3/4] Revert: restore explicit aria-checked prop on Checkbox Reverts 3278d5f per reviewer feedback. The explicit aria-checked prop should be kept alongside accessibilityState.checked. Co-authored-by: Mykhailo --- src/components/Checkbox.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Checkbox.tsx b/src/components/Checkbox.tsx index 3db1fc74ccdf2..18c8a3fff7984 100644 --- a/src/components/Checkbox.tsx +++ b/src/components/Checkbox.tsx @@ -134,6 +134,10 @@ function Checkbox({ accessibilityState={{ checked: isIndeterminate ? ('mixed' as const) : isChecked, }} + /* true → checked + false → unchecked + mixed → indeterminate */ + aria-checked={isIndeterminate ? 'mixed' : isChecked} accessibilityLabel={accessibilityLabel} pressDimmingValue={1} wrapperStyle={wrapperStyle} From 7ad4c039a373dd21d15bf232c9f58a9eae6c2294 Mon Sep 17 00:00:00 2001 From: MelvinBot Date: Fri, 6 Feb 2026 21:48:59 +0000 Subject: [PATCH 4/4] Remove unnecessary `as const` cast on accessibilityState.checked Addresses reviewer feedback from mkhutornyi. Co-authored-by: Mykhailo --- src/components/Checkbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Checkbox.tsx b/src/components/Checkbox.tsx index 18c8a3fff7984..11efa39c66959 100644 --- a/src/components/Checkbox.tsx +++ b/src/components/Checkbox.tsx @@ -132,7 +132,7 @@ function Checkbox({ onKeyDown={handleSpaceOrEnterKey} role={CONST.ROLE.CHECKBOX} accessibilityState={{ - checked: isIndeterminate ? ('mixed' as const) : isChecked, + checked: isIndeterminate ? 'mixed' : isChecked, }} /* true → checked false → unchecked