Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes - BUG 9834258, BUG 9843426, BUG 9819030 #34003

Merged
merged 18 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
1e2893a
updated callOutAccessibilityData in line chart custom accessibility e…
v-baambati Mar 17, 2025
577aebc
updated callOutAccessibilityData in line chart custom accessibility e…
v-baambati Mar 17, 2025
af3b295
moved P tag inside label to fix theme related issue
v-baambati Mar 18, 2025
29e64fe
added focusStylingcss
v-baambati Mar 18, 2025
12c30b0
update label to Label tag
v-baambati Mar 18, 2025
94ee894
update label to Label tag
v-baambati Mar 18, 2025
6f44e37
added code to fix accessibility issues
v-baambati Mar 18, 2025
f961590
added code to fix accessibility issues
v-baambati Mar 18, 2025
f504076
added code to fix accessibility issues
v-baambati Mar 18, 2025
77ee4c4
Fixed focus indicator issue for wifth and height
v-baambati Mar 19, 2025
e8278ae
Fixed focus indicator issue for wifth and height
v-baambati Mar 19, 2025
169ec8d
Merge branch 'master' of https://github.com/microsoft/fluentui into B…
v-baambati Mar 19, 2025
7018fbd
removed unwanted chnages
v-baambati Mar 19, 2025
e6df6af
updated focus outline code to heatmap chat examples
v-baambati Mar 20, 2025
c2bf753
Merge branch 'master' of https://github.com/microsoft/fluentui into B…
v-baambati Mar 21, 2025
d8db3d2
removed React.Fragment from piechart example as is not nomre required…
v-baambati Mar 21, 2025
5a3fe67
Merge branch 'master' of https://github.com/microsoft/fluentui into B…
v-baambati Mar 21, 2025
84394ba
Merge branch 'master' of https://github.com/microsoft/fluentui into B…
v-baambati Mar 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,27 @@ export class GaugeChartBasicExample extends React.Component<{}, IGCBasicExampleS
};
}

public componentDidMount(): void {
const style = document.createElement('style');
const focusStylingCSS = `
.containerDiv [contentEditable=true]:focus,
.containerDiv [tabindex]:focus,
.containerDiv area[href]:focus,
.containerDiv button:focus,
.containerDiv iframe:focus,
.containerDiv input:focus,
.containerDiv select:focus,
.containerDiv textarea:focus {
outline: -webkit-focus-ring-color auto 5px;
}
`;
style.appendChild(document.createTextNode(focusStylingCSS));
document.head.appendChild(style);
}

public render(): React.ReactNode {
return (
<>
<div className="containerDiv">
<Stack horizontal wrap tokens={{ childrenGap: 20 }}>
<StackItem>
<label htmlFor="width-slider">Width:</label>
Expand Down Expand Up @@ -143,7 +161,7 @@ export class GaugeChartBasicExample extends React.Component<{}, IGCBasicExampleS
canSelectMultipleLegends: this.state.legendMultiSelect,
}}
/>
</>
</div>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class GaugeChartSingleSegmentExample extends React.Component<{}, IGCSingl

public render(): React.ReactNode {
return (
<>
<div className="containerDiv">
<Stack horizontal wrap tokens={{ childrenGap: 20 }}>
<StackItem>
<label htmlFor="width-slider">Width:</label>
Expand Down Expand Up @@ -113,7 +113,7 @@ export class GaugeChartSingleSegmentExample extends React.Component<{}, IGCSingl
enableGradient={this.state.enableGradient}
roundCorners={this.state.roundedCorners}
/>
</>
</div>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import { ChoiceGroup, IChoiceGroupOption } from '@fluentui/react/lib/ChoiceGroup';
import { Checkbox } from '@fluentui/react/lib/Checkbox';
import { Toggle } from '@fluentui/react/lib/Toggle';

interface IGroupedBarChartState {
width: number;
height: number;
Expand All @@ -18,7 +19,6 @@ interface IGroupedBarChartState {
roundCorners: boolean;
selectMultipleLegends: boolean;
}

export class GroupedVerticalBarChartBasicExample extends React.Component<{}, IGroupedBarChartState> {
constructor(props: IGroupedVerticalBarChartProps) {
super(props);
Expand All @@ -34,6 +34,24 @@ export class GroupedVerticalBarChartBasicExample extends React.Component<{}, IGr
};
}

public componentDidMount(): void {
const style = document.createElement('style');
const focusStylingCSS = `
.containerDiv [contentEditable=true]:focus,
.containerDiv [tabindex]:focus,
.containerDiv area[href]:focus,
.containerDiv button:focus,
.containerDiv iframe:focus,
.containerDiv input:focus,
.containerDiv select:focus,
.containerDiv textarea:focus {
outline: -webkit-focus-ring-color auto 5px;
}
`;
style.appendChild(document.createTextNode(focusStylingCSS));
document.head.appendChild(style);
}

public render(): JSX.Element {
return <div>{this._basicExample()}</div>;
}
Expand Down Expand Up @@ -274,12 +292,12 @@ export class GroupedVerticalBarChartBasicExample extends React.Component<{}, IGr

const rootStyle = { width: `${this.state.width}px`, height: `${this.state.height}px` };
return (
<>
<p>
<div className="containerDiv">
<div>
In this example the <code>xAxisCalloutData</code> property overrides the x value that is shown on the callout.
So instead of a numeric value, the callout will show the date that is passed in the{' '}
<code>xAxisCalloutData</code> property.
</p>
</div>
<label htmlFor="changeWidth_Basic">Change Width:</label>
<input
type="range"
Expand Down Expand Up @@ -354,7 +372,7 @@ export class GroupedVerticalBarChartBasicExample extends React.Component<{}, IGr
}}
/>
</div>
</>
</div>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export class GroupedVerticalBarChartCustomAccessibilityExample extends React.Com
{ key: 'StackCallout', text: 'Stack callout' },
];
return (
<>
<div className="containerDiv">
<label htmlFor="changeWidth_Custom">Change Width:</label>
<input
type="range"
Expand Down Expand Up @@ -229,7 +229,7 @@ export class GroupedVerticalBarChartCustomAccessibilityExample extends React.Com
roundCorners={this.state.roundCorners}
/>
</div>
</>
</div>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class GroupedVerticalBarChartStyledExample extends React.Component<{}, IG

const rootStyle = { width: `${this.state.width}px`, height: `${this.state.height}px` };
return (
<>
<div className="containerDiv">
<label htmlFor="changeWidth_Styled">Change Width:</label>
<input
type="range"
Expand Down Expand Up @@ -148,7 +148,7 @@ export class GroupedVerticalBarChartStyledExample extends React.Component<{}, IG
enableReflow={true}
/>
</div>
</>
</div>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class GroupedVerticalBarChartTruncatedExample extends React.Component<{},

const rootStyle = { width: `${this.state.width}px`, height: `${this.state.height}px` };
return (
<>
<div className="containerDiv">
<Stack horizontal wrap tokens={{ childrenGap: 30 }}>
<Stack horizontal verticalAlign="center">
<Label htmlFor="input-width" style={{ fontWeight: 400 }}>
Expand Down Expand Up @@ -239,7 +239,7 @@ export class GroupedVerticalBarChartTruncatedExample extends React.Component<{},
xAxisOuterPadding={this.state.xAxisOuterPaddingEnabled ? this.state.xAxisOuterPadding : undefined}
/>
</div>
</>
</div>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,25 @@ export class HeatMapChartCustomAccessibilityExample extends React.Component<{},
height: 350,
};
}

public componentDidMount(): void {
const style = document.createElement('style');
const focusStylingCSS = `
.containerDiv [contentEditable=true]:focus,
.containerDiv [tabindex]:focus,
.containerDiv area[href]:focus,
.containerDiv button:focus,
.containerDiv iframe:focus,
.containerDiv input:focus,
.containerDiv select:focus,
.containerDiv textarea:focus {
outline: -webkit-focus-ring-color auto 5px;
}
`;
style.appendChild(document.createTextNode(focusStylingCSS));
document.head.appendChild(style);
}

public render(): React.ReactNode {
const rootStyle = { width: `${this.state.width}px`, height: `${this.state.height}px` };
const HeatMapData: IHeatMapChartProps['data'] = [
Expand All @@ -98,7 +117,7 @@ export class HeatMapChartCustomAccessibilityExample extends React.Component<{},
},
];
return (
<>
<div className="containerDiv">
<label htmlFor="ChangeWidth_Custom">Change Width:</label>
<input
type="range"
Expand Down Expand Up @@ -136,7 +155,7 @@ export class HeatMapChartCustomAccessibilityExample extends React.Component<{},
enableReflow={true}
/>
</div>
</>
</div>
);
}
private _onWidthChange = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const HeatMapChartBasicExample: React.FunctionComponent<{}> = () => {
};

return (
<>
<div className="containerDiv">
<label htmlFor="changeWidth_Example">Change Width:</label>
<input
type="range"
Expand Down Expand Up @@ -341,6 +341,6 @@ export const HeatMapChartBasicExample: React.FunctionComponent<{}> = () => {
enableReflow={true}
/>
</div>
</>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ export class HorizontalBarChartBasicExample extends React.Component<
};
}

public componentDidMount(): void {
const style = document.createElement('style');
const focusStylingCSS = `
.containerDiv [contentEditable=true]:focus,
.containerDiv [tabindex]:focus,
.containerDiv area[href]:focus,
.containerDiv button:focus,
.containerDiv iframe:focus,
.containerDiv input:focus,
.containerDiv select:focus,
.containerDiv textarea:focus {
outline: -webkit-focus-ring-color auto 5px;
}
`;
style.appendChild(document.createTextNode(focusStylingCSS));
document.head.appendChild(style);
}

public render(): JSX.Element {
return <div>{this._basicExample()}</div>;
}
Expand Down Expand Up @@ -147,7 +165,7 @@ export class HorizontalBarChartBasicExample extends React.Component<
];

return (
<>
<div className="containerDiv">
<div style={{ display: 'flex' }}>
<Toggle
label="Show labels as percentage"
Expand All @@ -171,7 +189,7 @@ export class HorizontalBarChartBasicExample extends React.Component<
roundCorners={this.state.roundCorners}
/>
</div>
</>
</div>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const HorizontalBarChartBenchmarkExample: React.FunctionComponent<{}> = (
];

return (
<div style={{ maxWidth: 600 }}>
<div className="containerDiv" style={{ maxWidth: 600 }}>
<HorizontalBarChart data={data} hideRatio={hideRatio} chartDataMode="fraction" />
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const HorizontalBarChartCustomAccessibilityExample: React.FunctionCompone
};

return (
<div style={{ maxWidth: 600 }}>
<div className="containerDiv" style={{ maxWidth: 600 }}>
<HorizontalBarChart data={getData(theme?.isInverted ?? false)} />
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const HorizontalBarChartCustomCalloutExample: React.FunctionComponent<{}>
};

return (
<div style={{ maxWidth: 600 }}>
<div className="containerDiv" style={{ maxWidth: 600 }}>
<HorizontalBarChart
data={getData(theme?.isInverted ?? false)}
hideRatio={hideRatio}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const HorizontalBarChartVariantExample: React.FunctionComponent<{}> = ()
}

return (
<>
<div className="containerDiv">
<Checkbox
label="Hide labels"
checked={hideLabels}
Expand All @@ -118,6 +118,6 @@ export const HorizontalBarChartVariantExample: React.FunctionComponent<{}> = ()
hideLabels={hideLabels}
/>
</div>
</>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class HorizontalBarChartWithAxisTooltipExample extends React.Component<{}

const rootStyle = { width: '650px', height: '350px' };
return (
<>
<div className="containerDiv">
<div style={rootStyle}>
<HorizontalBarChartWithAxis
chartTitle="Horizontal bar chart axis tooltip example "
Expand All @@ -60,7 +60,7 @@ export class HorizontalBarChartWithAxisTooltipExample extends React.Component<{}
enableReflow={true}
/>
</div>
</>
</div>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ export class HorizontalBarChartWithAxisBasicExample extends React.Component<
};
}

public componentDidMount(): void {
const style = document.createElement('style');
const focusStylingCSS = `
.containerDiv [contentEditable=true]:focus,
.containerDiv [tabindex]:focus,
.containerDiv area[href]:focus,
.containerDiv button:focus,
.containerDiv iframe:focus,
.containerDiv input:focus,
.containerDiv select:focus,
.containerDiv textarea:focus {
outline: -webkit-focus-ring-color auto 5px;
}
`;
style.appendChild(document.createTextNode(focusStylingCSS));
document.head.appendChild(style);
}

public render(): JSX.Element {
return <div>{this._basicExample()}</div>;
}
Expand Down Expand Up @@ -122,7 +140,7 @@ export class HorizontalBarChartWithAxisBasicExample extends React.Component<
const rootStyle = { width: `${this.state.width}px`, height: `${this.state.height}px` };

return (
<>
<div className="containerDiv">
<label htmlFor="changeWidth">Change Width:</label>
<input
type="range"
Expand Down Expand Up @@ -186,7 +204,7 @@ export class HorizontalBarChartWithAxisBasicExample extends React.Component<
}}
/>
</div>
</>
</div>
);
}
}
Loading