Error does not come into focus on the 'add fields' page

Created on 27 December 2023, 6 months ago
Updated 21 February 2024, 4 months ago

Problem/Motivation

Using Drupal 10.2.0 and PHP 8.1.4.

If I miss filling out the 'label' input and try to add a new field, the focus doesn't shift onto the erroneous input element. I've attached a screen recording which illustrates this.

Steps to reproduce

1. Go to /admin/structure/types/manage/article/fields/add-field.
2. Leave the label input empty. Choose a field type which displays additional options requiring you to scroll down below (for example, 'formatted text'). Choose any option and hit continue.
3. Observe the page refreshing but not focusing on the empty label input.

Proposed resolution

Perhaps make add the require option on the label field?

Remaining tasks

Decide how to resolve.

User interface changes

Label field should come into focus if left empty. Illustrated the bug in the attached video.

API changes

N/A

Data model changes

N/A

Release notes snippet

TBD

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Claro 

Last updated about 3 hours ago

Created by

🇮🇳India sidharth_soman Bangalore

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @sidharth_soman
  • 🇮🇳India Gauravvv Delhi, India
  • Status changed to Needs review 6 months ago
  • 🇮🇳India Gauravvv Delhi, India
  • Assigned to Kanchan Bhogade
  • Status changed to Needs work 6 months ago
  • 🇮🇳India SandeepSingh199

    Thanks for the patch @Gauravvvv, after applying the patch, it is focusing to that textbox but Error Message not showing.

  • 🇮🇳India Kanchan Bhogade

    Hi @Gauravvvv
    I tested MR !5977 on Drupal version 11.0 for the Claro Theme
    The patch was applied successfully

    Testing Steps:

    1. Set up the Drupal 111.
    2. Set the Claro theme
    3. Go to -> structure ->Article content type -> Manage Fields -> Add the field
    4. Leave the label input empty. Choose a field type that displays additional options requiring you to scroll down below (for example, 'formatted text'). Choose any option and hit continue.
    5. Observed no focus on the empty label input.
    6. Apply the shared patch & reverify the results.

    Test Result:
    The patch was applied successfully, and the Error does not come into focus on the 'add fields' fixed;
    But when the error comes into focus, the page scrolling is not up to the focus area.

    Moving to Needs Work

    The video is attached for reference

  • Hi @Kanchan Bhogade,
    It redirects to the label where needs to be focused or scrolled on validation. See the attached recording.
    Thanks

  • Status changed to Needs review 6 months ago
  • Status changed to Needs work 6 months ago
  • 🇺🇸United States smustgrave

    Issue summary is incomplete

  • Status changed to Needs review 6 months ago
  • Issue summary is updated changing the status to NR

  • Issue was unassigned.
  • Status changed to RTBC 6 months ago
  • 🇮🇳India Kanchan Bhogade

    Hi
    I tested MR !5977 on Drupal version 11.0 for the Claro Theme
    The patch was applied successfully

    Testing Steps:

    1. Set up the Drupal 11.0.
    2. Set the Claro theme
    3. Go to -> structure ->Article content type -> Manage Fields -> Add the field
    4. Leave the label input empty. Choose a field type that displays additional options requiring you to scroll down below (for example, 'formatted text'). Choose any option and hit continue.
    5. Observed no focus on the empty label input.
    6. Apply the shared patch & reverify the results.

    Test Result:
    The patch was applied successfully, and the Error does not come into focus on the 'add fields' fixed;

    Moving to RTBC

    Video for reference

  • Status changed to Needs work 4 months ago
  • 🇳🇿New Zealand quietone New Zealand

    There are failing tests. I am setting this to Needs work.

Production build 0.69.0 2024