@@ -259,11 +259,8 @@ export class WebauthnPaneImpl extends UI.Widget.VBox implements
259259 #newAuthenticatorForm: HTMLElement | undefined ;
260260 #protocolSelect: HTMLSelectElement | undefined ;
261261 transportSelect : HTMLSelectElement | undefined ;
262- #residentKeyCheckboxLabel: UI . UIUtils . CheckboxLabel | undefined ;
263262 residentKeyCheckbox : HTMLInputElement | undefined ;
264- #userVerificationCheckboxLabel: UI . UIUtils . CheckboxLabel | undefined ;
265263 #userVerificationCheckbox: HTMLInputElement | undefined ;
266- #largeBlobCheckboxLabel: UI . UIUtils . CheckboxLabel | undefined ;
267264 largeBlobCheckbox : HTMLInputElement | undefined ;
268265 addAuthenticatorButton : Buttons . Button . Button | undefined ;
269266 #isEnabling?: Promise < void > ;
@@ -608,33 +605,33 @@ export class WebauthnPaneImpl extends UI.Widget.VBox implements
608605 UI . ARIAUtils . bindLabelToControl ( transportSelectTitle , ( this . transportSelect as Element ) ) ;
609606 // transportSelect will be populated in updateNewAuthenticatorSectionOptions.
610607
611- this . #residentKeyCheckboxLabel =
612- UI . UIUtils . CheckboxLabel . create ( i18nString ( UIStrings . supportsResidentKeys ) , false , undefined , 'resident-key' ) ;
613- this . #residentKeyCheckboxLabel. textElement . classList . add ( 'authenticator-option-label' ) ;
614- residentKeyGroup . appendChild ( this . #residentKeyCheckboxLabel. textElement ) ;
615- this . residentKeyCheckbox = this . #residentKeyCheckboxLabel. checkboxElement ;
608+ const residentKeyCheckboxLabel =
609+ UI . UIUtils . createLabel ( i18nString ( UIStrings . supportsResidentKeys ) , 'authenticator-option-label' ) ;
610+ residentKeyCheckboxLabel . setAttribute ( 'jslog' , `${ VisualLogging . toggle ( 'resident-key' ) . track ( { change : true } ) } ` ) ;
611+ residentKeyGroup . appendChild ( residentKeyCheckboxLabel ) ;
612+ this . residentKeyCheckbox = residentKeyGroup . createChild ( 'input' , 'authenticator-option-checkbox' ) ;
613+ this . residentKeyCheckbox . type = 'checkbox' ;
616614 this . residentKeyCheckbox . checked = false ;
617- this . residentKeyCheckbox . classList . add ( 'authenticator-option-checkbox' ) ;
618- residentKeyGroup . appendChild ( this . #residentKeyCheckboxLabel) ;
619-
620- this . #userVerificationCheckboxLabel = UI . UIUtils . CheckboxLabel . create (
621- i18nString ( UIStrings . supportsUserVerification ) , false , undefined , 'user-verification' ) ;
622- this . #userVerificationCheckboxLabel. textElement . classList . add ( 'authenticator-option-label' ) ;
623- userVerificationGroup . appendChild ( this . #userVerificationCheckboxLabel. textElement ) ;
624- this . #userVerificationCheckbox = this . #userVerificationCheckboxLabel. checkboxElement ;
615+ UI . ARIAUtils . bindLabelToControl ( residentKeyCheckboxLabel , this . residentKeyCheckbox ) ;
616+
617+ const userVerificationCheckboxLabel =
618+ UI . UIUtils . createLabel ( i18nString ( UIStrings . supportsUserVerification ) , 'authenticator-option-label' ) ;
619+ userVerificationCheckboxLabel . setAttribute (
620+ 'jslog' , `${ VisualLogging . toggle ( 'user-verification' ) . track ( { change : true } ) } ` ) ;
621+ userVerificationGroup . appendChild ( userVerificationCheckboxLabel ) ;
622+ this . #userVerificationCheckbox = userVerificationGroup . createChild ( 'input' , 'authenticator-option-checkbox' ) ;
623+ this . #userVerificationCheckbox. type = 'checkbox' ;
625624 this . #userVerificationCheckbox. checked = false ;
626- this . #userVerificationCheckbox. classList . add ( 'authenticator-option-checkbox' ) ;
627- userVerificationGroup . appendChild ( this . #userVerificationCheckboxLabel ) ;
628-
629- this . #largeBlobCheckboxLabel =
630- UI . UIUtils . CheckboxLabel . create ( i18nString ( UIStrings . supportsLargeBlob ) , false , undefined , 'large-blob' ) ;
631- this . #largeBlobCheckboxLabel . textElement . classList . add ( 'authenticator-option-label' ) ;
632- largeBlobGroup . appendChild ( this . #largeBlobCheckboxLabel . textElement ) ;
633- this . largeBlobCheckbox = this . #largeBlobCheckboxLabel . checkboxElement ;
625+ UI . ARIAUtils . bindLabelToControl ( userVerificationCheckboxLabel , this . #userVerificationCheckbox) ;
626+
627+ const largeBlobCheckboxLabel =
628+ UI . UIUtils . createLabel ( i18nString ( UIStrings . supportsLargeBlob ) , 'authenticator-option-label' ) ;
629+ largeBlobCheckboxLabel . setAttribute ( 'jslog' , ` ${ VisualLogging . toggle ( 'large-blob' ) . track ( { change : true } ) } ` ) ;
630+ largeBlobGroup . appendChild ( largeBlobCheckboxLabel ) ;
631+ this . largeBlobCheckbox = largeBlobGroup . createChild ( 'input' , 'authenticator-option-checkbox' ) ;
632+ this . largeBlobCheckbox . type = 'checkbox' ;
634633 this . largeBlobCheckbox . checked = false ;
635- this . largeBlobCheckbox . classList . add ( 'authenticator-option-checkbox' ) ;
636- this . largeBlobCheckbox . name = 'large-blob-checkbox' ;
637- largeBlobGroup . appendChild ( this . #largeBlobCheckboxLabel) ;
634+ UI . ARIAUtils . bindLabelToControl ( largeBlobCheckboxLabel , this . largeBlobCheckbox ) ;
638635
639636 this . addAuthenticatorButton = UI . UIUtils . createTextButton (
640637 i18nString ( UIStrings . add ) , this . #handleAddAuthenticatorButton. bind ( this ) ,
0 commit comments