diff --git a/packages/fields/src/fields/password/edit.tsx b/packages/fields/src/fields/password/edit.tsx index 24f024abd5805..be8e9fe396c9d 100644 --- a/packages/fields/src/fields/password/edit.tsx +++ b/packages/fields/src/fields/password/edit.tsx @@ -5,8 +5,6 @@ import { CheckboxControl, __experimentalVStack as VStack, TextControl, - BaseControl, - VisuallyHidden, } from '@wordpress/components'; import type { DataFormControlProps } from '@wordpress/dataviews'; import { useState } from '@wordpress/element'; @@ -17,13 +15,7 @@ import { __ } from '@wordpress/i18n'; */ import type { BasePost } from '../../types'; -function PasswordEdit( { - data, - onChange, - field, - hideLabelFromVision, -}: DataFormControlProps< BasePost > ) { - const { label } = field; +function PasswordEdit( { data, onChange }: DataFormControlProps< BasePost > ) { const [ showPassword, setShowPassword ] = useState( !! data.password ); const handleTogglePassword = ( value: boolean ) => { @@ -39,14 +31,6 @@ function PasswordEdit( { spacing={ 4 } className="fields-controls__password" > - { ! hideLabelFromVision && ( - <BaseControl.VisualLabel as="legend"> - { label } - </BaseControl.VisualLabel> - ) } - { hideLabelFromVision && ( - <VisuallyHidden as="legend">{ label }</VisuallyHidden> - ) } <CheckboxControl __nextHasNoMarginBottom label={ __( 'Password protected' ) } diff --git a/packages/fields/src/fields/password/index.tsx b/packages/fields/src/fields/password/index.tsx index 8f4f704909c36..e8d55c08af2ab 100644 --- a/packages/fields/src/fields/password/index.tsx +++ b/packages/fields/src/fields/password/index.tsx @@ -2,7 +2,6 @@ * WordPress dependencies */ import type { Field } from '@wordpress/dataviews'; -import { __ } from '@wordpress/i18n'; /** * Internal dependencies @@ -12,7 +11,7 @@ import PasswordEdit from './edit'; const passwordField: Field< BasePost > = { id: 'password', - label: __( 'Password' ), + type: 'text', getValue: ( { item } ) => item.password, Edit: PasswordEdit, enableSorting: false,