Make WordPress Core


Ignore:
Timestamp:
10/14/2026 07:34:43 PM (43 hours ago)
Author:
joedolson
Message:

Admin: Revert admin notices accessibility fixes.

Following merge, it became evident that the complexity of notices as handled in the WordPress admin make this change premature. While it worked effectively handling standard notices, there are significant numbers of unusual notice cases. The follow-up PR (​https://github.com/wordpress/wordpress-develop/pull/14223) would have significantly limited the false positives, but not sufficiently for production.

Variant notices will need to have improved handling before these fixes can be implemented effectively.

Props joedolson, matt, peterwilsoncc, wildworks, mamaduka.
See #50486.

File:
1 edited

Legend:

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

    r64305 r64347  
    93469346        $args = apply_filters( 'wp_admin_notice_args', $args, $message );
    93479347
    9348         // Unique ID is intended for internal use, and is not a filterable argument.
    9349         $unique_id         = wp_unique_prefixed_id( 'wp-admin-notice-' );
    9350         $args['notice_id'] = $unique_id;
    9351 
    93529348        $wrap_with_p  = false !== $args['paragraph_wrap'];
    93539349        $wrap_opener  = $wrap_with_p ? '<p>' : '';
    … …  
    93599355                $trimmed_id = trim( $args['id'] );
    93609356
    9361                 $html_builder->set_attribute( 'data-id', $unique_id );
    93629357                if ( '' !== $trimmed_id ) {
    93639358                        $html_builder->set_attribute( 'id', $trimmed_id );
    9364                 } else {
    9365                         $html_builder->set_attribute( 'id', $unique_id );
    9366                 }
    9367         } else {
    9368                 $html_builder->set_attribute( 'data-id', $unique_id );
    9369                 $html_builder->set_attribute( 'id', $unique_id );
     9359                }
    93709360        }
    93719361
Note: See TracChangeset for help on using the changeset viewer.