From d4063ca157b04f21f8b15ca35924843cf67e2a50 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Fri, 12 Jun 2026 14:37:31 +0200 Subject: [PATCH 1/3] Fix lang attribute on the setup-config page. --- src/wp-admin/setup-config.php | 5 ++--- src/wp-includes/general-template.php | 9 ++++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/setup-config.php b/src/wp-admin/setup-config.php index f9cbc08ced0dc..6817da55295a3 100644 --- a/src/wp-admin/setup-config.php +++ b/src/wp-admin/setup-config.php @@ -95,16 +95,15 @@ function setup_config_display_header( $body_classes = array() ) { $body_classes = (array) $body_classes; $body_classes[] = 'wp-core-ui'; $body_classes[] = 'admin-color-modern'; - $dir_attr = ''; + if ( is_rtl() ) { $body_classes[] = 'rtl'; - $dir_attr = ' dir="rtl"'; } header( 'Content-Type: text/html; charset=utf-8' ); ?> -> +> diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 01aefa370b5f1..69179b3960554 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -4543,13 +4543,16 @@ function get_language_attributes( $doctype = 'html' ) { $attributes[] = 'dir="rtl"'; } - $lang = get_bloginfo( 'language' ); + $lang = get_bloginfo( 'language' ); + $html_type = get_option( 'html_type' ); + if ( $lang ) { - if ( 'text/html' === get_option( 'html_type' ) || 'html' === $doctype ) { + if ( 'text/html' === $html_type || 'html' === $doctype ) { $attributes[] = 'lang="' . esc_attr( $lang ) . '"'; } - if ( 'text/html' !== get_option( 'html_type' ) || 'xhtml' === $doctype ) { + // The $html_type option may be false on a new install on the setup-config.php page. + if ( ( $html_type && 'text/html' !== $html_type ) || 'xhtml' === $doctype ) { $attributes[] = 'xml:lang="' . esc_attr( $lang ) . '"'; } } From 0d880d05004a476aa008afef800362acfbcc0527 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Fri, 12 Jun 2026 14:40:09 +0200 Subject: [PATCH 2/3] Make label visible on the language-chooser select. --- src/wp-admin/css/install.css | 7 +++++++ src/wp-admin/includes/translation-install.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/css/install.css b/src/wp-admin/css/install.css index 9476749dd7cf2..8a114e97dbf0a 100644 --- a/src/wp-admin/css/install.css +++ b/src/wp-admin/css/install.css @@ -322,6 +322,13 @@ body.language-chooser { max-width: 300px; } +.language-chooser [for="language"] { + display: inline-block; + margin-bottom: 16px; + font-size: 14px; + font-weight: 600; +} + .language-chooser select { padding: 8px; width: 100%; diff --git a/src/wp-admin/includes/translation-install.php b/src/wp-admin/includes/translation-install.php index 67609836b94a2..2682bc506cb87 100644 --- a/src/wp-admin/includes/translation-install.php +++ b/src/wp-admin/includes/translation-install.php @@ -205,7 +205,7 @@ function wp_install_language_form( $languages ) { $installed_languages = get_available_languages(); - echo "\n"; + echo "\n"; echo "