Make WordPress Core

Changeset 61320


Ignore:
Timestamp:
11/29/2025 04:24:23 AM (2 months ago)
Author:
wildworks
Message:

Media: Remove required attribute from media uploader file input field.

This commit removes the required attribute from the file input element in the media uploader to avoid browser form validation issues and ensure that the form element is submitted correctly.

Props adamsilverstein, ellatrix, desrosj, huzaifaalmesbah, immeet94, krupajnanda, madhavishah01, parthvataliya, ravichudasama01, sabernhardt, wildworks, yagniksangani.
Fixes #64305.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r61099 r61320  
    22862286            ?>
    22872287        </label>
    2288         <input type="file" name="async-upload" id="async-upload" required />
     2288        <input type="file" name="async-upload" id="async-upload" />
    22892289        <?php submit_button( _x( 'Upload', 'verb' ), 'primary', 'html-upload', false ); ?>
    22902290        <a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e( 'Cancel' ); ?></a>
Note: See TracChangeset for help on using the changeset viewer.