Skip to content

Commit f0cd91b

Browse files
committed
refactor(checkbox): code clean up
1 parent 678d747 commit f0cd91b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/src/components/checkbox/checkbox.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,10 @@ export class Checkbox implements ComponentInterface {
260260
} = this;
261261
const mode = getIonMode(this);
262262
const path = getSVGPath(mode, indeterminate);
263+
const hasLabelContent = el.textContent !== '';
263264

264265
renderHiddenInput(true, el, name, checked ? value : '', disabled);
265266

266-
// Determine appropriate accessible name.
267-
const hasLabelContent = el.textContent !== '';
268-
269267
// The host element must have a checkbox role to ensure proper VoiceOver
270268
// support in Safari for accessibility.
271269
return (

0 commit comments

Comments
 (0)