Skip to content

Commit

Permalink
Fix #7118 : Updating Chart accessibility documentation (#7119)
Browse files Browse the repository at this point in the history
Fix #7118 : Updating Chart accessibility documentation

The documentation mentions a 'canvasProps' property which is not available in PrimeReact. 
To define aria roles and properties, the 'pt' property must be used insteed.
  • Loading branch information
kyybo committed Sep 5, 2024
1 parent 26240b5 commit bcb3410
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/doc/chart/accessibilitydoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DocSectionText } from '@/components/doc/common/docsectiontext';
export function AccessibilityDoc() {
const code = {
basic: `
<Chart type="line" data={data} canvasProps={{'role': 'img', 'aria-label': 'Data'}} />
<Chart type="line" data={data} pt={canvas: {'role': 'img', 'aria-label': 'Data'}}} />
<Chart type="line" data={data}>
<DataTable />
Expand All @@ -20,8 +20,8 @@ export function AccessibilityDoc() {
<a className="text-primary hover:underline font-medium" 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.
guide for more information. The canvas element can be customized with <i>pt</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>
<DocSectionCode code={code} hideToggleCode import hideStackBlitz />
</DocSectionText>
Expand Down

0 comments on commit bcb3410

Please sign in to comment.