HTMLHelper::_('bootstrap.renderModal', 'ModalSelect…', ['title' => 'Select an item', 'url' => $url, …]) — every core modal-select field does this..modal-body.<iframe>.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']);
}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.
Add 'title' to the iframe allowlist in modal.es6.js:
const allowed = {
iframe: ['src', 'name', 'title', 'width', 'height'],
};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.@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.| Labels |
Added:
No Code Attached Yet
|
||
| Labels |
Added:
a11y
|
||