Problem/Motivation

The usability team recommends adding some indicators to form validation error messages in the top status message area when the invalid field is in the advanced sidebar.

The reason is that even with #3585823: [Meta] Improve the accessibility of the Default Admin theme 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.

I [KentR] think this probably should only apply in the case that Inline Form Errors is not installed, because with Inline Form Errors there will be a link to the field with the error and the error message itself is in the sidebar next to the field. An indicator in that error message that the error is in the sidebar would be redundant.

Background

From UX meeting discussions of #3619387: Indicate on forms sidebar toggle button that sidebar has child element errors. Latest discussion begins at ~9:59 in the 2026-09-18 meeting recording.

Present in Drupal Usability Meeting 2026-09-18:

  • @benjifisher
  • @rkoller
  • @the_g_bomb
  • @simohell
  • @kentr

@benjifisher and @rkoller expressed preference that this be fixed with #3619387: Indicate on forms sidebar toggle button that sidebar has child element errors, but also said it's acceptable for it to be a separate issue.

I'm calling it Major because #3619387: Indicate on forms sidebar toggle button that sidebar has child element errors is Major.

Steps to reproduce

  1. Standard installation
  2. Log in as admin
  3. Set Default Admin as the admin theme.
  4. Install the article test recipe (drush recipe core/tests/fixtures/recipes/article_content_type),
    or create an Article content type & install the Path module (aka path_alias).
  5. Go to /node/add/article.
  6. Reduce viewport width until the sidebar on the right containing the "advanced" fields collapses.
  7. Enter a value in the Title field to limit errors.
  8. Click the toggle button to expand the right sidebar.
  9. Enter a value without a beginning slash in the URL alias field.
  10. Close the sidebar.
  11. Click the Save button.
    This should cause a validation error: "The alias path has to start with a slash".

Proposed resolution

The UX team proposed adding indicators to individual error messages:

  1. Prepend the sidebar toggle button icon to the error message. Make the icon decorative.
  2. Append the text " (Open the sidebar.)" to the error message
  3. Ideally, make this icon a button that opens the sidebar as the current toggle button does.

I [KentR] think that making the icon a toggle button (point 3 above) should be a followup because it starts to overlap with the functionality of the Inline Form Errors module.

Screenshot of a modified error message from the recording. The text "[Icon]" represents where the real icon should be:

The UX team also proposed grouping the items in the status message area, possibly with multiple columns, but turned to the individual error messages proposal above upon KentR's comment that it would be easier.

Remaining tasks

  1. Create an MR with the necessary tests.

User interface changes

Form validation errors in the status message will have additional information that helps users recover from errors within the sidebar.

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3624663

Command icon 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

kentr created an issue. See original summary.

kentr’s picture

Status: Active » Postponed (maintainer needs more info)
kentr’s picture

Issue summary: View changes
kentr’s picture

Issue summary: View changes
kentr’s picture

Issue summary: View changes
kentr’s picture

Issue summary: View changes
kentr’s picture

kentr’s picture

Issue summary: View changes
kentr’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new89.57 KB

tiago made their first commit to this issue’s fork.

tiago’s picture

Status: Active » Needs review
StatusFileSize
new11.79 MB

MR !17331 adds an "Open the sidebar" button to the error messages of fields in the sidebar, when Inline Form Errors isn't installed. The button opens the sidebar and focuses the field the message is about. It is hidden while the sidebar is open.

This deviates from the proposal (icon + " (Open the sidebar.)" text, button as a follow-up). I tried both a link and a button in the message, and the button worked better for me UX-wise: it does what the text only asks for, and without Inline Form Errors it doesn't overlap with that module. Switching it to a link is easy if you prefer that. @kentr, @benjifisher, @rkoller, what do you think?

Tests: AdminNodeTest (button only on sidebar errors, none with Inline Form Errors) and a new SidebarErrorMessagesTest (opens the sidebar and focuses the field).

Saving a node with an invalid URL alias, then opening the sidebar from the error message

kentr’s picture

@tiago Thanks for working on this.

Did you use AI / LLM?

tiago’s picture

Yeah, I did use Claude.