ManagedFile element wrong #accept assignment

Created on 23 December 2024, about 22 hours ago

Problem/Motivation

ManagedFile element has wrong #accept assignment

$element['upload']['#attributes'] = ['accept' => $element['#accept']];

It removes previously set attributes.

Steps to reproduce

    if (!empty($element['#description'])) {
      $element['upload']['#attributes']['aria-describedby'] = $element['#id'] . '--description';
    }

    if (!empty($element['#accept'])) {
      $element['upload']['#attributes'] = ['accept' => $element['#accept']];
    }
πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

file.module

Created by

πŸ‡ΊπŸ‡¦Ukraine knyshuk.vova

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

Comments & Activities

Production build 0.71.5 2024