Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 4 additions & 12 deletions workspaces/adoption-insights/e2e-tests/utils/accessibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,13 @@ export async function runAccessibilityTests(
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
.analyze();

// Known violations filtered until fixed in UI; track in https://issues.redhat.com/browse/RHDHBUGS-2216
const filteredViolations = accessibilityScanResults.violations.filter(
v =>
![
'aria-input-field-name',
'button-name',
'color-contrast', // MUI Tooltip default styling
'svg-img-alt', // Recharts pie segments
].includes(v.id),
);

await testInfo.attach(attachName, {
body: JSON.stringify(accessibilityScanResults, null, 2),
contentType: 'application/json',
});

expect(filteredViolations, 'Accessibility violations found').toEqual([]);
expect(
accessibilityScanResults.violations,
'Accessibility violations found',
).toEqual([]);
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ const ActiveUsers = () => {
data={data}
margin={{ top: 10, right: 50, left: 20, bottom: 0 }}
key={JSON.stringify(data.map(d => d))}
role="img"
aria-label={t('activeUsers.title')}
>
<defs>
<linearGradient id="new_users" x1="0" y1="0" x2="0" y2="1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,14 @@ const CatalogEntities = () => {
}}
>
<TableCell sx={{ width: '25%', minWidth: 0 }}>
<Tooltip title={tooltipTitle}>
<Tooltip
title={tooltipTitle}
componentsProps={{
tooltip: {
sx: { bgcolor: '#151515', color: '#ffffff' },
},
}}
>
<Link
component="a"
href={entityLink({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ const InsightsHeader: FC<InsightsHeaderProps> = () => {
value={selectedOption}
onChange={handleChange}
renderValue={(selected: string) => getLabel(selected)}
inputProps={{ 'aria-label': t('header.dateRange.defaultLabel') }}
sx={{
minWidth: 190,
marginRight: '10px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,14 @@ const Techdocs = () => {
</TableCell>
<TableCell sx={{ width: '25%', minWidth: 0 }}>
{techdoc?.name ? (
<Tooltip title={tooltipTitle}>
<Tooltip
title={tooltipTitle}
componentsProps={{
tooltip: {
sx: { bgcolor: '#151515', color: '#ffffff' },
},
}}
>
<Link
component="a"
target="_blank"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,14 @@ const Templates = () => {
minWidth: 0,
}}
>
<Tooltip title={tooltipTitle}>
<Tooltip
title={tooltipTitle}
componentsProps={{
tooltip: {
sx: { bgcolor: '#151515', color: '#ffffff' },
},
}}
>
<Link
component="a"
href={entityHrefLink}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const InfoComponent = () => {
},
}}
>
<IconButton>
<IconButton aria-label={t('users.tooltip')}>
<InfoOutlinedIcon
sx={{ color: theme.palette.text.secondary, fontSize: '1.75rem' }}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@ const Users = () => {
<Box display="flex" alignItems="center" flex={7}>
<Box sx={{ width: '100%', maxWidth: '240px' }}>
<ResponsiveContainer width="100%" height={240}>
<PieChart>
<PieChart
role="img"
aria-label={`${t(
'users.title',
)}: ${logged_in_users.toLocaleString('en-US')} ${t(
'users.ofTotal' as any,
{ total: licensed_users.toLocaleString('en-US') },
)}`}
>
<Pie
data={data}
dataKey="value"
Expand Down
Loading