mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 04:09:08 +02:00
Add aria-hidden=true attribute to hidden iframe for resizing (#4400)
Add aria-hidden=true attribute to hidden iframe for resizing. This prevents screen readers in ItemMode from navigating to the hidden iframe.
This commit is contained in:
parent
18707cf81f
commit
2a7df85180
@ -130,6 +130,10 @@ module.exports = function(Chart) {
|
||||
// https://github.com/chartjs/Chart.js/issues/3090
|
||||
iframe.tabIndex = -1;
|
||||
|
||||
// Prevent iframe from gaining focus on ItemMode keyboard navigation
|
||||
// Accessibility bug fix
|
||||
iframe.setAttribute('aria-hidden', 'true');
|
||||
|
||||
// If the iframe is re-attached to the DOM, the resize listener is removed because the
|
||||
// content is reloaded, so make sure to install the handler after the iframe is loaded.
|
||||
// https://github.com/chartjs/Chart.js/issues/3521
|
||||
|
Loading…
Reference in New Issue
Block a user