Problem/Motivation
Spin off from #3604037: Indicate that grouping elements have child element errors for UX and a11y.
Child elements in the forms sidebar are invisible to the user when the sidebar is closed. It's the same fundamental problem as with the related grouping element issues.
To improve the user experience and accessibility we should indicate when there are errors 'inside' the closed sidebar. Currently it is hard for the user to find the actual problematic field when the (child) field itself is invisible.
I'm assuming this is Major for the same reasons that the issues for standard grouping elements are.
Steps to reproduce
- Standard installation
- Log in as admin
- Set Default Admin as the admin theme.
- Install the article test recipe (
drush recipe core/tests/fixtures/recipes/article_content_type),
or create an Article content type & install the Path module (akapath_alias). - Go to
/node/add/article. - Reduce viewport width until the sidebar on the right containing the "advanced" fields collapses.
- Enter a value in the
Titlefield to limit errors. - Click the toggle button to expand the right sidebar.
- Enter a value without a beginning slash in the
URL aliasfield. - Close the sidebar.
Clear / reset caches (drush cr). This is a temporary measure.
(Tested on the MR tugboat preview as of 2026-09-07, and clearing the cache was not necessary. Also, the UX team experienced no issues with it in their second review.)- Click the
Savebutton.
This should cause a validation error: "The alias path has to start with a slash".
Expected
The closed sidebar indicates that there is an invalid field within it, for the same reasons that details and vertical tabs elements indicate that there are child errors for #3604037: Indicate that grouping elements have child element errors for UX and a11y.
See the Proposed resolution for details on the new indicators.
Actual
There's no indication that the closed sidebar contains an invalid field.
Proposed resolution
Add visual and visually-hidden indicators to the toggle button as so:
- Place the prohibition icon from the top error block at the logical inline start of the toggle button, previous to the sidebar icon.
This means on the left for LTR and on the right for RTL. - In the toggle control's default state the prohibition and sidebar icons are red. (see screenshot in the User interface changes section.)
- In the hover and focus states, the prohibition icon is red and the sidebar icon is the same as it is now. (see screenshot in the User interface changes section.)
- Use the input error color from invalid fields for the sidebar icon and the prohibition icon (
var(--input--error-color)). - Append visually hidden " (sidebar contains error)" to the text content of the toggle control. This is mostly consistent with the hidden text in #3604037: Indicate that grouping elements have child element errors for UX and a11y and #2848507: Indicate that grouping elements have child element errors for ux and a11y.
- Append " (sidebar contains error)" to the
titleattribute so that it appears in the tooltip text when hovering over the button. - Include both icons in the clickable area of the button.
Remaining tasks
Add a visual indicator to the toggle control.Create merge request.Add test.Refactor code to bust the render cache for the toggle button when there are validation errors in the advanced sidebar.Update test.Usability / UX review.Make the element uncacheable, possibly with a lazy builder as @berdir suggested in Slack (?)- Take screenshots for the User interface changes section of the issue summary, performing any manual testing that's not covered by the UX review.
- Create change record (?)
User interface changes

New toggle button tooltip when hovered:

New markup (formatted for readability):
<a
class="meta-sidebar__trigger trigger has-error"
href="#toggle-sidebar"
role="button"
title="Show sidebar panel (sidebar contains error)"
aria-controls="default_admin_sidebar"
data-drupal-selector="edit-default-admin-sidebar-toggle"
data-once="adminSidebarToggle"
aria-expanded="false">
<span
class="visually-hidden"
data-drupal-selector="edit-text">
Show sidebar panel (sidebar contains error)
</span>
</a>
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #37 | create-content-error-into-sidebar.png | 360.53 KB | gwenweb |
| #32 | 3619387-32-error-toggle-with-tooltip.png | 18.38 KB | kentr |
| #29 | 3619387-29-proposed-resolution-all-states.png | 25.13 KB | kentr |
| #11 | issue-3619387-review.zip | 60.59 KB | mgifford |
Issue fork drupal-3619387
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kentr commentedComment #3
kentr commentedComment #4
kentr commentedIt's actually not postponed on #2848507: Indicate that grouping elements have child element errors for ux and a11y.
Here's a screenshot of the toggle control from the issue fork. IMO it needs a non-color visual cue also.
Comment #5
kentr commentedComment #6
kentr commentedAdded the error icon to the toggle control and screenshot of the control in different states.
Needs a test.
Comment #7
kentr commentedComment #8
kentr commentedComment #9
kentr commentedComment #10
kentr commentedComment #11
mgiffordI started this and got interrupted too many times.
I think it is close to working now though. I think that the name of the show/hide button needs to stay the same (and indicate open or closed). I'm too tired to think about that now.
From AI...
Bundle is ready: /Users/mgifford/drupal-core/issue-3619387-review.zip (61 KB, 30 files).
What's inside:
One caveat carried over from before: the live Guidepup/VoiceOver run can't execute inside this Linux container — the harness + expected analysis are ready, and you run node guidepup/sidebar-modal.voiceover.mjs on your macOS host (with VoiceOver automation enabled), twice (before/after), then diff the logs.
The working tree is unchanged (the temp baseline branch I used for the interdiff was deleted). Nothing is committed.
Comment #12
kentr commentedThe UX team looked at this in the last meeting: #3618410: Drupal Usability Meeting 2026-08-28. Looks like the recording and transcript aren't up yet, but I listened in.
What I remember as far as their suggestions:
IIRC they didn't have a specific suggestion for the text content, but they said it's a little weird with the changing verb in the accessible name.
Removing the verb is currently part of #3619154: Accessibility fixes for Admin theme's sidebar toggle control.
IMO, the error text should be somewhat consistent with the text added by #2848507: Indicate that grouping elements have child element errors for ux and a11y.
I'm working on implementing those suggestions.
Edit: Link to the recording.
Comment #13
kentr commentedPicking this back up.
Comment #14
kentr commentedComment #16
kentr commentedComment #17
kentr commentedComment #18
kentr commentedComment #19
kentr commentedComment #20
kentr commentedComment #21
kentr commentedComment #22
kentr commentedComment #23
kentr commentedComment #24
kentr commentedWhen @mgifford and I talked about it last, we thought this is a blocker for #2915899: [PP-1] Enable the Inline Form Errors module in the Standard profile and recipe for the same reasons that #2848507: Indicate that grouping elements have child element errors for ux and a11y is.
Comment #25
kentr commentedComment #26
kentr commentedComment #27
kentr commentedUsability review
The usability team discussed this issue in #3622319: Drupal Usability Meeting 2026-09-18. Link to the recording: https://youtu.be/oskSZahOIJs
@benjifisher asked me in the meeting to write a summary. I'm assuming that gives me the authority to remove the Needs usability review tag.
The attendees at the usability meeting were:
There were no concerns regarding the error indicators on the toggle button in this MR.
The usability team further recommends adding indicators to validation error messages in the top status message when the invalid field is in the advanced sidebar.
The reason is that the toggle button can be far away from the error message, so it may not be noticed by users who are focused on the error / status message. Without Inline Form Errors installed, the context is missing and the person has to search for where the error happened.
@benjifisher and @rkoller preferred that to be included in this issue, but also said it's acceptable for it to be a separate issue.
So that this issue and #2915899: [PP-1] Enable the Inline Form Errors module in the Standard profile and recipe can move faster, I opened #3624663: Indicate in form error messages when error is sidebar. The details are in the recording and will be in that issue.
Needs rebase and new screenshot(s) with the new focus outline from #3618140: Improve the accessibility of focus outlines.
Comment #28
kentr commentedRebased. Working on the screenshots.
Comment #29
kentr commentedI put a new screenshot in the issue summary.
Comment #30
kentr commentedComment #31
kentr commentedComment #32
kentr commentedComment #33
kentr commentedComment #34
kentr commentedNo AI was used in the MR.
Comment #35
kentr commentedNot intentionally, anyway.
Comment #36
gwenweb commentedI tested on Drupal 11.4.8, PHP 8.4, macOS, Chrome (the changes appear to already be included in core 11.4.8).
What I tested:
Result: The red error icon appeared correctly on the toggle button, and the title/accessible text updated to include "(sidebar contains error)". The feature works as described.
'max-age' => 0 still needs a decision before RTBC, I think.
Comment #37
gwenweb commentedComment #38
kentr commentedThanks @gwenweb.
I think you can still RTBC based on "The feature works as described.", if you are willing. That moves it forward for a committer to make a decision on it.
This is from Drupal's Life cycle of an issue page:
Comment #39
gwenweb commentedFine by me =)