fix: #3636787 The sign-in page renders no h1 since Display Builder 1.0.0-beta10
Summary
The sign-in screens that a Display Builder page layout draws have no h1 since Display Builder 1.0.0-beta10. The page layout now puts the page title in a level 1 heading, as the Display Builder release notes say.
Issue: https://www.drupal.org/node/3636787
Root cause
Display Builder 1.0.0-beta10 prints the page title source as the title text only, no longer in <h1 class="page-title"> (upstream issue 3621589). The sign-in page layout of the theme placed that source straight in the title slot of uikit_admin:sign_in, so the screen lost its h1. 02-09-01-display-builder.feature:17 failed with Expected 1 <h1>, found 0. in webship-js-test 3/3 on the pipeline of MR 17, an unrelated change to the suite.
The sign_in component prints its title slot as it is given, and its description said the page title block prints the h1. That holds for the regular screens, not for a page layout.
What changed
config/optional/display_builder_page_layout.page_layout.uikit_admin_sign_in.yml:uikit_admin:heading(heading_level: 1) in thetitleslot ofuikit_admin:sign_in, with the page title in itstitleslot. The h1 sits inside.uikit-admin-sign-in__title, so.uikit-admin-sign-in__title h1styles it as before, and the title text is unchanged.uikit_admin.post_update.php,src/PageTitleHeading.php:uikit_admin_post_update_sign_in_page_title_heading()puts the page title placed straight in thetitleslot of an installeduikit_admin_sign_inlayout in the heading. The layout is saved as a configuration import, so Display Builder makes it the present state of the builder too. It does nothing when the layout or Display Builder is missing, and a second run changes nothing.composer.json: conflicts withdrupal/display_builderbefore 1.0.0-beta10, whose page title prints an h1 of its own: the heading would nest a second one.tests/features/02-09-01-display-builder.feature: the scenario also checks the title text in.uikit-admin-sign-in__title h1.components/sign_in/sign_in.component.yml,components/sign_in/sign_in.twig,README.md: how a page layout places the page title.
The sign_in component does not wrap its slot in an h1 itself: the regular sign-in screens (no page layout) pass it the h1 of the page title block, so the component would print two. The other components that take a title, admin_topbar and admin_page, are left out of the component library of both Display Builder profiles and get their title from the page title block, so no other page layout of the theme is affected.
Testing
On a local site with the versions of the pipeline (Drupal 11.4.8, PHP 8.4, Display Builder 1.0.0-beta10, UI Patterns 2.0.23, UI Skins 1.2.1):
- The old layout configuration fails
02-09-01-display-builder.feature:17with the error above. With this change the feature passes (3 scenarios, 30 steps). drush updbruns the post update on a site that had installed the old layout: the layout then equals the shipped one,/user/loginprints one h1, and a second run changes nothing.- The regular sign-in screens still print one h1:
01-03-01-accessibility,01-04-01-sign-in,01-04-02-sign-in-optionsand01-04-03-sign-in-statespass (42 scenarios, 470 steps). phpcs(Drupal ruleset),phpstan(level 0),parallel-lintandcomposer validatereport nothing on the theme. Composer refusesdrupal/display_builder1.0.0-beta9 next to the theme and accepts 1.0.0-beta10.
The pipeline of this MR is the check on the whole suite.
AI-Generated: Yes (theme fix)
Checkpoints:
- File an issue
- Addition/Change/Update/Fix
- Testing to ensure no regression
- Automated unit testing coverage
- Automated functional testing coverage
- UX/UI designer responsibilities
- Readability
- Accessibility
- Performance
- Security
- Developer Documentation
- User Guide Documentation
- Reviewed by human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Release notes snippet
- Release