Make WordPress Core

Changeset 55084


Ignore:
Timestamp:
01/18/2023 11:14:33 AM (5 months ago)
Author:
youknowriad
Message:

Editor: Add inert attribute polyfill.

The new Gutenberg packages are using the inert attribute
to disable some parts of the HTML tree in an accessible way.

Props ntsekouras.
Fixes #57492.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/package-lock.json

    r55079 r55084  
    2661926619            "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q=="
    2662026620        },
     26621        "wicg-inert": {
     26622            "version": "3.1.2",
     26623            "resolved": "https://registry.npmjs.org/wicg-inert/-/wicg-inert-3.1.2.tgz",
     26624            "integrity": "sha512-Ba9tGNYxXwaqKEi9sJJvPMKuo063umUPsHN0JJsjrs2j8KDSzkWLMZGZ+MH1Jf1Fq4OWZ5HsESJID6nRza2ang=="
     26625        },
    2662126626        "wildcard": {
    2662226627            "version": "2.0.0",
  • trunk/package.json

    r55079 r55084  
    155155        "twemoji": "14.0.2",
    156156        "underscore": "1.13.6",
    157         "whatwg-fetch": "3.6.2"
     157        "whatwg-fetch": "3.6.2",
     158        "wicg-inert": "3.1.2"
    158159    },
    159160    "scripts": {
  • trunk/src/wp-includes/script-loader.php

    r55012 r55084  
    100100        'wp-polyfill-element-closest',
    101101        'wp-polyfill-object-fit',
    102         'wp-polyfill' => array( 'regenerator-runtime' ),
     102        'wp-polyfill-inert',
     103        'wp-polyfill' => array( 'wp-polyfill-inert', 'regenerator-runtime' ),
    103104    );
    104105
     
    116117        'wp-polyfill-element-closest' => '2.0.2',
    117118        'wp-polyfill-object-fit'      => '2.3.5',
     119        'wp-polyfill-inert'           => '3.1.2',
    118120        'wp-polyfill'                 => '3.15.0',
    119121    );
  • trunk/tests/phpunit/tests/dependencies/scripts.php

    r54891 r55084  
    724724        $ver       = get_bloginfo( 'version' );
    725725        $suffix    = wp_scripts_get_suffix();
    726         $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-dom-ready,wp-hooks&amp;ver={$ver}'></script>\n";
     726        $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery-core,jquery-migrate,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-dom-ready,wp-hooks&amp;ver={$ver}'></script>\n";
    727727        $expected .= "<script type='text/javascript' id='test-example-js-before'>\nconsole.log(\"before\");\n</script>\n";
    728728        $expected .= "<script type='text/javascript' src='http://example.com' id='test-example-js'></script>\n";
  • trunk/tools/webpack/packages.js

    r54307 r55084  
    7272        'wp-polyfill-formdata.js': 'formdata-polyfill/FormData.js',
    7373        'wp-polyfill-object-fit.js': 'objectFitPolyfill/src/objectFitPolyfill.js',
     74        'wp-polyfill-inert.js': 'wicg-inert/dist/inert.js',
    7475        'moment.js': 'moment/moment.js',
    7576        'react.js': 'react/umd/react.development.js',
     
    8485        'wp-polyfill-url.min.js': 'core-js-url-browser/url.min.js',
    8586        'wp-polyfill-object-fit.min.js': 'objectFitPolyfill/dist/objectFitPolyfill.min.js',
     87        'wp-polyfill-inert.min.js': 'wicg-inert/dist/inert.min.js',
    8688        'moment.min.js': 'moment/min/moment.min.js',
    8789        'react.min.js': 'react/umd/react.production.min.js',
Note: See TracChangeset for help on using the changeset viewer.