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

Created on 27 December 2023, about 1 year 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

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

10.2

Component
Claro 

Last updated 3 days 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 gauravvvv Delhi, India
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India gauravvvv Delhi, India
  • Assigned to Kanchan Bhogade
  • Status changed to Needs work about 1 year 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 about 1 year ago
  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States smustgrave

    Issue summary is incomplete

  • Status changed to Needs review about 1 year ago
  • Issue summary is updated changing the status to NR

  • Issue was unassigned.
  • Status changed to RTBC about 1 year 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 about 1 year ago
  • 🇳🇿New Zealand quietone

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

  • 🇮🇳India niranjan_panem Gurugram

    Checked in drupal 11 claro theme, not able to reproduce the issue.
    below is the screen shot of foucs highlighting the empty label field.

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    re #16

    Checked in drupal 11 claro theme, not able to reproduce the issue.
    below is the screen shot of foucs highlighting the empty label field.

    You literally reproduced the issue. In your screenshot, the Text (plain) option is focused (notice the green outline), not the label field. While it's true the label field is red, it is not the focused element.

  • 🇮🇳India niranjan_panem Gurugram

    I don't think focus on empty label is an issue. Already we are displaying the error messages and highlighting the label with red color. Intuitively user get know what happened on that field.

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    I don't think focus on empty label is an issue. Already we are displaying the error messages and highlighting the label with red color. Intuitively user get know what happened on that field.

    It is an issue for non-sighted and other assistive tech users, and it is functionality that Drupal core provides in other forms.

Production build 0.71.5 2024