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 1993147: Add aria-label for axe issues (Internal Mode Dashboard) #9251

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
"Other": "Other",
"All other capacity usage that are not a part of the top 5 consumers.": "All other capacity usage that are not a part of the top 5 consumers.",
"Available": "Available",
"Breakdown Chart": "Breakdown Chart",
"Warning": "Warning",
"Raw capacity": "Raw capacity",
"Used": "Used",
Expand Down Expand Up @@ -351,6 +352,7 @@
"Total Physical Used Capacity {{physicalcapacity}}": "Total Physical Used Capacity {{physicalcapacity}}",
"Shows an overview of the data consumption per provider or account collected from the day of the entity creation.": "Shows an overview of the data consumption per provider or account collected from the day of the entity creation.",
"(in {{suffixLabel}})": "(in {{suffixLabel}})",
"Data Consumption Graph": "Data Consumption Graph",
"GET {{GETLatestValue}}": "GET {{GETLatestValue}}",
"PUT {{PUTLatestValue}}": "PUT {{PUTLatestValue}}",
"Service Name": "Service Name",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import {
Chart,
Expand Down Expand Up @@ -60,63 +61,67 @@ export const BreakdownChart: React.FC<BreakdownChartProps> = ({
metricModel,
ocsVersion,
labelPadding,
}) => (
<>
<Chart
legendPosition="bottom-left"
legendComponent={
<ChartLegend
themeColor={ChartThemeColor.multiOrdered}
data={legends}
y={40}
labelComponent={<LinkableLegend metricModel={metricModel} ocsVersion={ocsVersion} />}
orientation="horizontal"
symbolSpacer={7}
gutter={10}
height={50}
style={{
labels: Object.assign(
{ fontSize: 10 },
labelPadding
? {
paddingRight: labelPadding.right,
paddingTop: labelPadding.top,
paddingBottom: labelPadding.bottom,
paddingLeft: labelPadding.left,
}
: {},
),
}}
/>
}
height={60}
padding={{
bottom: 35,
top: 0,
right: 0,
left: 0,
}}
>
<ChartAxis
style={{ axis: { stroke: 'none' }, ticks: { stroke: 'none' } }}
tickFormat={() => ''}
/>
<ChartStack horizontal>
{data.map((d: StackDataPoint, index) => (
<ChartBar
key={d.id}
style={{ data: { stroke: 'white', strokeWidth: 0.7, fill: d.fill } }}
cornerRadius={getBarRadius(index, data.length)}
barWidth={12}
padding={0}
data={[d]}
labelComponent={<ChartTooltip dx={0} style={{ fontSize: 8, padding: 5 }} />}
}) => {
const { t } = useTranslation();
return (
<>
<Chart
ariaTitle={t('ceph-storage-plugin~Breakdown Chart')}
legendPosition="bottom-left"
legendComponent={
<ChartLegend
themeColor={ChartThemeColor.multiOrdered}
data={legends}
y={40}
labelComponent={<LinkableLegend metricModel={metricModel} ocsVersion={ocsVersion} />}
orientation="horizontal"
symbolSpacer={7}
gutter={10}
height={50}
style={{
labels: Object.assign(
{ fontSize: 10 },
labelPadding
? {
paddingRight: labelPadding.right,
paddingTop: labelPadding.top,
paddingBottom: labelPadding.bottom,
paddingLeft: labelPadding.left,
}
: {},
),
}}
/>
))}
</ChartStack>
</Chart>
</>
);
}
height={60}
padding={{
bottom: 35,
top: 0,
right: 0,
left: 0,
}}
>
<ChartAxis
style={{ axis: { stroke: 'none' }, ticks: { stroke: 'none' } }}
tickFormat={() => ''}
/>
<ChartStack horizontal>
{data.map((d: StackDataPoint, index) => (
<ChartBar
key={d.id}
style={{ data: { stroke: 'white', strokeWidth: 0.7, fill: d.fill } }}
cornerRadius={getBarRadius(index, data.length)}
barWidth={12}
padding={0}
data={[d]}
labelComponent={<ChartTooltip dx={0} style={{ fontSize: 8, padding: 5 }} />}
/>
))}
</ChartStack>
</Chart>
</>
);
};

export type BreakdownChartProps = {
data: StackDataPoint[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export const DataConsumptionDropdown: React.FC<DataConsumptionDropdownProps> = (
placeholderText={t('ceph-storage-plugin~Type: {{selectedService}}', {
selectedService,
})}
aria-label={t('ceph-storage-plugin~Break By Dropdown')}
SanjalKatiyar marked this conversation as resolved.
Show resolved Hide resolved
isCheckboxSelectionBadgeHidden
>
{serviceDropdownItems}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const DataConsumptionGraph: React.FC<DataConsumptionGraphProps> = ({
{`${CHART_LABELS(metric, t)} ${suffixLabel}`}
</div>
<Chart
ariaTitle={t('ceph-storage-plugin~Data Consumption Graph')}
containerComponent={
<ChartVoronoiContainer
labelComponent={<ChartTooltip style={{ fontSize: 8, paddingBottom: 0 }} />}
Expand Down