Add coexistence checks to all enqueue methods to prevent loading both React and Grid.js assets simultaneously. Changes: - ReactAdmin.php: Only enqueue React assets when ?react=1 - Init.php: Skip Grid.js when React active on admin pages - Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0 - Customer.php, Product.php, License.php: Add coexistence checks Now the toggle between Classic and React versions works correctly. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
24 lines
998 B
JavaScript
24 lines
998 B
JavaScript
/**
|
|
* Build the live regions markup.
|
|
*
|
|
* @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'.
|
|
*
|
|
* @return {HTMLDivElement} The ARIA live region HTML element.
|
|
*/
|
|
export default function addContainer(ariaLive = 'polite') {
|
|
const container = document.createElement('div');
|
|
container.id = `a11y-speak-${ariaLive}`;
|
|
container.className = 'a11y-speak-region';
|
|
container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;');
|
|
container.setAttribute('aria-live', ariaLive);
|
|
container.setAttribute('aria-relevant', 'additions text');
|
|
container.setAttribute('aria-atomic', 'true');
|
|
const {
|
|
body
|
|
} = document;
|
|
if (body) {
|
|
body.appendChild(container);
|
|
}
|
|
return container;
|
|
}
|
|
//# sourceMappingURL=add-container.js.map
|