The file upload widget has some strange behavior when Inline Form Errors is enabled.

Issue is blocked by #2482783: File upload errors not set or shown correctly and #77245: Provide a common API for displaying JavaScript messages.

This can be tested after uploading a wrong file type.

With JavaScript:

  1. There is a hash link directly above the image, this should be removed.
  2. The important error is not inline, and a not needed error "this value should not be null" is shown inline.
  3. Minor importance: there is no new hash link at the top of the page to the error. (No blocker because the user doesn't has to search for the error on the page, it is right before him/her.

Without JavaScript enabled.

  1. The file type error is not inline
  2. In case that the file is required, the required message is also shown. When there is another error the required error shouldn't be shown./li>

Original issue:

Pulled from #435 from @dmsmidt written on April 15, 2015 at 5:12pm

CommentFileSizeAuthor
#7 file_upload_error_after_ife.png20.52 KBdmsmidt
#3 ife_images.png24.25 KBdmsmidt
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mgifford created an issue. See original summary.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dmsmidt’s picture

Title: AJAXified fields should use inline-errors only » Improve inline form errors for file upload fields
Issue summary: View changes
Status: Active » Needs work
Issue tags: +Needs tests, +inline form errors, +file upload, +Accessibility
Related issues: +#2482783: File upload errors not set or shown correctly
FileSize
24.25 KB

Repurposed this issue after check of all mentioned problems, most seem to be gone.

The only problem left seems to be with the file upload widget, see new issue description.
And radio buttons styling: #2687251: Radios / Checkboxes focus styling wrong when marked as having an error

dmsmidt’s picture

dmsmidt’s picture

Status: Needs work » Postponed

Postpone, blockers need fix first.

dmsmidt’s picture

Interesting related feedback by Alex Pott in #2482783-19: File upload errors not set or shown correctly.

dmsmidt’s picture

Issue summary: View changes
FileSize
20.52 KB

By fixing #2482783: File upload errors not set or shown correctly we are actually already a lot closer to what we want.
This is the result with IFE on:

The element is correctly marked as having an error and the error is inline.

Left over:
- Get rid of the summary at the top (for ajax partial submits)
- Nice to have: update or place the errors summary at the top of the page

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dmsmidt’s picture

Status: Postponed » Closed (duplicate)