(view)
| 141652 | var _vegaFormat = require("vega-format"); |
| 141653 | // initialize aria role and label attributes |
| 141654 | function initializeAria(view) { |
| 141655 | const el = view.container(); |
| 141656 | if (el) { |
| 141657 | el.setAttribute("role", "graphics-document"); |
| 141658 | el.setAttribute("aria-roleDescription", "visualization"); |
| 141659 | ariaLabel(el, view.description()); |
| 141660 | } |
| 141661 | } // update aria-label if we have a DOM container element |
| 141662 | function ariaLabel(el, desc) { |
| 141663 | if (el) desc == null ? el.removeAttribute("aria-label") : el.setAttribute("aria-label", desc); |
| 141664 | } |
no test coverage detected