Skip to content

Commit a71cbe3

Browse files
committed
update snapshot, revert description tweaks
1 parent 45c9b2f commit a71cbe3

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

packages/charts/src/components/__snapshots__/chart.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ exports[`Chart should render the legend name test 1`] = `
6969
</Connect(CursorBand)>
7070
<Connect(XYChart) forwardCanvasRef={{...}}>
7171
<XYChart forwardCanvasRef={{...}} locale="en-US" isRTL={false} initialized={true} isChartEmpty={false} debug={true} geometries={{...}} geometriesIndex={{...}} theme={{...}} chartContainerDimensions={{...}} highlightedLegendItem={[undefined]} hoveredAnnotationIds={{...}} rotation={0} renderingArea={{...}} chartTransform={{...}} axesSpecs={{...}} perPanelAxisGeoms={{...}} perPanelGridLines={{...}} axesStyles={{...}} annotationDimensions={{...}} annotationSpecs={{...}} panelGeoms={{...}} a11ySettings={{...}} onChartRendered={[Function (anonymous)]}>
72-
<figure aria-labelledby={[undefined]} aria-describedby="chart1--defaultSummary-summary chart1--defaultSummary" tabIndex={0}>
72+
<figure aria-labelledby={[undefined]} aria-describedby="chart1--defaultSummary">
7373
<canvas dir="ltr" className="echCanvasRenderer" width={170} height={200} style={{...}} role="presentation" />
7474
</figure>
7575
<Connect(ScreenReaderSummaryComponent)>

packages/charts/src/components/accessibility/description.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ import type { A11ySettings } from '../../state/selectors/get_accessibility_confi
1212

1313
/** @internal */
1414
export function ScreenReaderDescription(props: A11ySettings) {
15-
const { description, descriptionId } = props;
16-
17-
if (!description) return null;
18-
19-
return <p id={descriptionId}>{description}</p>;
15+
if (!props.description) return null;
16+
return <p id={props.descriptionId}>{props.description}</p>;
2017
}

0 commit comments

Comments
 (0)