Make WordPress Core


Ignore:
Timestamp:
09/17/2023 10:49:06 PM (2 years ago)
Author:
joedolson
Message:

Administration: Move tabindex="-1" from notice to JS.

In a handful of admin notices, a tabindex attribute is set so that JS can move focus to the notice div. Rather than adding tabindex to globally accepted attributes for wp_kses_post(), move the assignment of tabindex into the JS handlers that display those notices. The attribute is only relevant if JS is running, so there is no reason to add it in the original HTML notice.

Follow up to [56408], [56409], [56410], [56518], [56570], [56571], [56572], [56573], [56576], [56589], [56590], [56597], [56599], [56600], [56601].

Props costdev, joedolson.
See #57791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/user-edit.php

    r56600 r56602  
    966966<?php if ( isset( $application_passwords_list_table ) ) : ?>
    967967    <script type="text/html" id="tmpl-new-application-password">
    968         <div class="notice notice-success is-dismissible new-application-password-notice" role="alert" tabindex="-1">
     968        <div class="notice notice-success is-dismissible new-application-password-notice" role="alert">
    969969            <p class="application-password-display">
    970970                <label for="new-application-password-value">
Note: See TracChangeset for help on using the changeset viewer.