This is an automated email from the ASF dual-hosted git repository. villebro pushed a commit to branch 7.0 in repository https://gitbox.apache.org/repos/asf/superset.git
commit cd55a791650c7913edd8635b0b9ddbbe76e9613c Author: Aitema-gmbh <[email protected]> AuthorDate: Thu Nov 12 18:33:09 2026 +0100 fix(a11y): WCAG 1.3.5 — add autocomplete attributes to form inputs (#39232) Co-authored-by: Fedo Hagge-Kubat <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]> Co-authored-by: Evan Rusackas <[email protected]> Co-authored-by: Evan Rusackas <[email protected]> Co-authored-by: Joe Li <[email protected]> (cherry picked from commit b6440d0f45e064dce768570bc8c66980d2b14d2b) --- superset-frontend/src/components/ImportModal/index.tsx | 8 ++++---- .../DatabaseConnectionForm/OAuth2ClientField.tsx | 1 + .../src/features/databases/DatabaseModal/SSHTunnelForm.tsx | 6 ++++++ superset-frontend/src/features/userInfo/UserInfoModal.tsx | 10 +++++++++- superset-frontend/src/features/users/UserListModal.tsx | 11 ++++++++++- superset-frontend/src/pages/Login/index.tsx | 2 ++ superset-frontend/src/pages/Register/index.tsx | 1 + 7 files changed, 33 insertions(+), 6 deletions(-) diff --git a/superset-frontend/src/components/ImportModal/index.tsx b/superset-frontend/src/components/ImportModal/index.tsx index 704473d78ef..102c248095d 100644 --- a/superset-frontend/src/components/ImportModal/index.tsx +++ b/superset-frontend/src/components/ImportModal/index.tsx @@ -262,7 +262,7 @@ export const ImportModal: FunctionComponent<ImportModelsModalProps> = ({ </div> <Input name={`password-${fileName}`} - autoComplete={`password-${fileName}`} + autoComplete="off" type="password" value={passwords[fileName]} onChange={event => @@ -282,7 +282,7 @@ export const ImportModal: FunctionComponent<ImportModelsModalProps> = ({ </div> <Input name={`ssh_tunnel_password-${fileName}`} - autoComplete={`ssh_tunnel_password-${fileName}`} + autoComplete="off" type="password" value={sshTunnelPasswords[fileName]} onChange={event => @@ -303,7 +303,7 @@ export const ImportModal: FunctionComponent<ImportModelsModalProps> = ({ </div> <Input.TextArea name={`ssh_tunnel_private_key-${fileName}`} - autoComplete={`ssh_tunnel_private_key-${fileName}`} + autoComplete="off" value={sshTunnelPrivateKeys[fileName]} onChange={event => setSSHTunnelPrivateKeys({ @@ -325,7 +325,7 @@ export const ImportModal: FunctionComponent<ImportModelsModalProps> = ({ </div> <Input name={`ssh_tunnel_private_key_password-${fileName}`} - autoComplete={`ssh_tunnel_private_key_password-${fileName}`} + autoComplete="off" type="password" value={sshTunnelPrivateKeyPasswords[fileName]} onChange={event => diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/OAuth2ClientField.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/OAuth2ClientField.tsx index f87d22c3b9e..06438798710 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/OAuth2ClientField.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/OAuth2ClientField.tsx @@ -134,6 +134,7 @@ export const OAuth2ClientField = ({ <Input data-test="client-secret" type="password" + autoComplete="off" value={oauth2ClientInfo.secret} onChange={handleChange('secret')} /> diff --git a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx index 5dbc589267a..6809310f07d 100644 --- a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx +++ b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx @@ -90,6 +90,7 @@ const SSHTunnelForm = ({ <LabeledErrorBoundInput id="server_address" name="server_address" + autoComplete="off" label={t('SSH Host')} required placeholder={t('e.g. 127.0.0.1')} @@ -107,6 +108,7 @@ const SSHTunnelForm = ({ <LabeledErrorBoundInput id="server_port" name="server_port" + autoComplete="off" label={t('SSH Port')} required placeholder={t('22')} @@ -127,6 +129,7 @@ const SSHTunnelForm = ({ <LabeledErrorBoundInput id="username" name="username" + autoComplete="off" label={t('Username')} required placeholder={t('e.g. Analytics')} @@ -177,6 +180,7 @@ const SSHTunnelForm = ({ <LabeledErrorBoundInput id="password" name="password" + autoComplete="off" label={t('SSH Password')} required visibilityToggle @@ -213,6 +217,7 @@ const SSHTunnelForm = ({ > <Input.TextArea name="private_key" + autoComplete="off" placeholder={t('Paste Private Key here')} value={db?.ssh_tunnel?.private_key || ''} onChange={onSSHTunnelParametersChange} @@ -230,6 +235,7 @@ const SSHTunnelForm = ({ <LabeledErrorBoundInput id="private_key_password" name="private_key_password" + autoComplete="off" label={t('Private Key Password')} visibilityToggle placeholder={t('e.g. ********')} diff --git a/superset-frontend/src/features/userInfo/UserInfoModal.tsx b/superset-frontend/src/features/userInfo/UserInfoModal.tsx index 09fb4ec77c8..52c432d5e74 100644 --- a/superset-frontend/src/features/userInfo/UserInfoModal.tsx +++ b/superset-frontend/src/features/userInfo/UserInfoModal.tsx @@ -86,6 +86,7 @@ function UserInfoModal({ > <Input name="first_name" + autoComplete="given-name" placeholder={t("Enter the user's first name")} /> </FormItem> @@ -94,7 +95,11 @@ function UserInfoModal({ label={t('Last name')} rules={[{ required: true, message: t('Last name is required') }]} > - <Input name="last_name" placeholder={t("Enter the user's last name")} /> + <Input + name="last_name" + autoComplete="family-name" + placeholder={t("Enter the user's last name")} + /> </FormItem> </> ); @@ -108,6 +113,7 @@ function UserInfoModal({ > <Input.Password name="current_password" + autoComplete="current-password" placeholder={t('Enter your current password')} /> </FormItem> @@ -118,6 +124,7 @@ function UserInfoModal({ > <Input.Password name="password" + autoComplete="new-password" placeholder={t("Enter the user's password")} /> </FormItem> @@ -142,6 +149,7 @@ function UserInfoModal({ > <Input.Password name="confirm_password" + autoComplete="new-password" placeholder={t("Confirm the user's password")} /> </FormItem> diff --git a/superset-frontend/src/features/users/UserListModal.tsx b/superset-frontend/src/features/users/UserListModal.tsx index 045b727ac9a..51ab01e15d0 100644 --- a/superset-frontend/src/features/users/UserListModal.tsx +++ b/superset-frontend/src/features/users/UserListModal.tsx @@ -119,6 +119,7 @@ function UserListModal({ > <Input name="first_name" + autoComplete="off" placeholder={t("Enter the user's first name")} /> </FormItem> @@ -129,6 +130,7 @@ function UserListModal({ > <Input name="last_name" + autoComplete="off" placeholder={t("Enter the user's last name")} /> </FormItem> @@ -139,6 +141,7 @@ function UserListModal({ > <Input name="username" + autoComplete="off" placeholder={t("Enter the user's username")} /> </FormItem> @@ -160,7 +163,11 @@ function UserListModal({ }, ]} > - <Input name="email" placeholder={t("Enter the user's email")} /> + <Input + name="email" + autoComplete="off" + placeholder={t("Enter the user's email")} + /> </FormItem> <FormItem name="roles" @@ -211,6 +218,7 @@ function UserListModal({ > <Input.Password name="password" + autoComplete="new-password" placeholder={t("Enter the user's password")} /> </FormItem> @@ -237,6 +245,7 @@ function UserListModal({ > <Input.Password name="confirmPassword" + autoComplete="new-password" placeholder={t("Confirm the user's password")} /> </FormItem> diff --git a/superset-frontend/src/pages/Login/index.tsx b/superset-frontend/src/pages/Login/index.tsx index cf1de4d52b1..36642bd3517 100644 --- a/superset-frontend/src/pages/Login/index.tsx +++ b/superset-frontend/src/pages/Login/index.tsx @@ -236,6 +236,7 @@ export default function Login() { > <Input autoFocus + autoComplete="username" prefix={<Icons.UserOutlined iconSize="l" />} data-test="username-input" /> @@ -248,6 +249,7 @@ export default function Login() { ]} > <Input.Password + autoComplete="current-password" prefix={<Icons.KeyOutlined iconSize="l" />} data-test="password-input" /> diff --git a/superset-frontend/src/pages/Register/index.tsx b/superset-frontend/src/pages/Register/index.tsx index 9c89ef41b6e..caac5a1e3d5 100644 --- a/superset-frontend/src/pages/Register/index.tsx +++ b/superset-frontend/src/pages/Register/index.tsx @@ -223,6 +223,7 @@ export default function Login() { > <Input.Password placeholder={t('Confirm password')} + autoComplete="new-password" data-test="confirm-password-input" /> </Form.Item>
