@@ -79,32 +79,38 @@ export const Checkbox: FC<
7979 const renderIcon = ( ) => {
8080 if ( innerDisabled ) {
8181 if ( innerIndeterminate ) {
82- return < CheckDisabled className = { color ( ) } />
82+ // @ts -ignore
83+ return < CheckDisabled className = { color ( ) } ariaHidden />
8384 }
8485 if ( innerChecked ) {
85- return < Checked className = { color ( ) } />
86+ // @ts -ignore
87+ return < Checked className = { color ( ) } ariaHidden />
8688 }
87- return < CheckDisabled className = { color ( ) } />
89+ // @ts -ignore
90+ return < CheckDisabled className = { color ( ) } ariaHidden />
8891 }
8992 if ( ! innerChecked ) {
9093 return React . isValidElement ( icon ) ? (
9194 icon
9295 ) : (
93- < CheckNormal className = { color ( ) } />
96+ // @ts -ignore
97+ < CheckNormal className = { color ( ) } ariaHidden />
9498 )
9599 }
96100 if ( innerIndeterminate ) {
97101 return React . isValidElement ( indeterminateIcon ) ? (
98102 indeterminateIcon
99103 ) : (
100- < CheckDisabled className = { color ( ) } />
104+ // @ts -ignore
105+ < CheckDisabled className = { color ( ) } ariaHidden />
101106 )
102107 }
103108 return React . isValidElement ( activeIcon ) ? (
104109 activeIcon
105110 ) : (
106111 < View className = { `${ classPrefix } -icon-wrap` } >
107- < Checked className = { color ( ) } />
112+ { /* @ts -ignore */ }
113+ < Checked className = { color ( ) } ariaHidden />
108114 </ View >
109115 )
110116 }
@@ -198,11 +204,15 @@ export const Checkbox: FC<
198204 {
199205 [ `${ classPrefix } -reverse` ] : labelPosition === 'left' ,
200206 'nut-checkbox-list-item' : ctx ?. list ,
207+ [ `${ classPrefix } -active` ] : innerChecked ,
201208 } ,
202209 className
203210 ) }
204211 { ...rest }
205212 onClick = { handleClick }
213+ ariaRole = "checkbox"
214+ tabIndex = { innerDisabled ? - 1 : 0 }
215+ ariaChecked = { innerIndeterminate ? 'mixed' : innerChecked }
206216 >
207217 { renderCheckboxItem ( ) }
208218 </ View >
0 commit comments