No Code Attached Yet a11y
avatar bcordis
bcordis
27 Jul 2026

Steps to reproduce the issue

  1. Render any Bootstrap modal with a remote URL, e.g. via HTMLHelper::_('bootstrap.renderModal', 'ModalSelect…', ['title' => 'Select an item', 'url' => $url, …]) — every core modal-select field does this.
  2. Open the modal so the live iframe is injected into .modal-body.
  3. Inspect the injected <iframe>.

Expected result

The iframe carries the title attribute the layout rendered. layouts/libraries/html/bootstrap/modal/iframe.php deliberately sets name and title together:

if (isset($params['title'])) {
    $iframeAttributes['name'] = addslashes($params['title']);
    $iframeAttributes['title'] = addslashes($params['title']);
}

Actual result

The live iframe has name but no title:

<iframe class="iframe" src="" name="Select an item" height="400px" width="800px"></iframe>

The rendered iframe HTML (including title) is stored in the modal's data-iframe attribute, but when Joomla.initialiseModal injects it on show.bs.modal it runs the markup through Joomla.sanitizeHtml with an allowlist that omits title:

// build/media_source/vendor/bootstrap/js/modal.es6.js
const allowed = {
  iframe: ['src', 'name', 'width', 'height'],
};

modalBody.insertAdjacentHTML('afterbegin', Joomla.sanitizeHtml(modal.dataset.iframe, allowed));

So the attribute the PHP layout added for accessibility is stripped in transit. axe-core reports the result as frame-title (serious, WCAG 4.1.2): a frame with no accessible name. Affects every consumer of bootstrap.renderModal with a URL — all core modal-select fields included.

Suggested fix

Add 'title' to the iframe allowlist in modal.es6.js:

const allowed = {
  iframe: ['src', 'name', 'title', 'width', 'height'],
};

System information

  • Confirmed on current 6.1-dev (build/media_source/vendor/bootstrap/js/modal.es6.js lines 8–10); the allowlist is identical in 5.x and 7.0.
  • Found by an automated WCAG 2.2 AA scan (@axe-core/playwright) of a third-party component whose modal fields render through bootstrap.renderModal. We currently work around it by copying name back to title after injection.
avatar bcordis bcordis - open - 27 Jul 2026
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jul 2026
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Jul 2026
avatar QuyTon QuyTon - change - 27 Jul 2026
Labels Added: a11y
avatar QuyTon QuyTon - labeled - 27 Jul 2026

Add a Comment

Login with GitHub to post a comment