2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText id="accessibility" label="Accessibility" v-bind="$attrs">
|
|
|
|
<h3>Screen Reader</h3>
|
|
|
|
<p>
|
|
|
|
Chart components internally use <i>canvas</i> element, refer to the <a href="https://www.chartjs.org/docs/latest/general/accessibility.html">Chart.js accessibility</a> guide for more information. The canvas element can be customized with
|
|
|
|
<i>canvasProps</i> property to define aria roles and properties, in addition any content inside the component is directly passed as a child of the canvas to be able to provide fallback content like a table.
|
|
|
|
</p>
|
|
|
|
|
2024-01-30 08:16:35 +00:00
|
|
|
<DocSectionCode :code="code" hideToggleCode hideStackBlitz v-bind="$attrs" />
|
2023-02-28 08:29:30 +00:00
|
|
|
</DocSectionText>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
2023-10-15 09:38:39 +00:00
|
|
|
<Chart type="line" :data="data" :canvasProps="{'role': 'img', 'aria-label': 'Data'}" />
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|