Skip to content
Snippets Groups Projects
Commit 2627d46e authored by Loic Huder's avatar Loic Huder
Browse files

Merge branch 'eslint-role-rule' into 'main'

Fix 'jsx-a11y/prefer-tag-over-role' eslint rule

See merge request !401
parents dca43747 231ca3ff
No related branches found
No related tags found
1 merge request!401Fix 'jsx-a11y/prefer-tag-over-role' eslint rule
Pipeline #137765 passed
......@@ -41,7 +41,6 @@ module.exports = createConfig({
...dependencies,
rules: {
'react/jsx-no-constructed-context-values': 'off', // too strict
'jsx-a11y/prefer-tag-over-role': 'off', // To be fixed
},
}),
createTypeScriptOverride({
......
......@@ -76,8 +76,8 @@ export default function AddSubworkflowDialog(props: Props) {
<Dialog maxWidth="xl" open={open} onClose={handleClose}>
<DialogTitle>Add subworkflow</DialogTitle>
<DialogContent>
<List component="div" role="list">
<ListItem divider role="listitem">
<List>
<ListItem divider>
<ListItemText primary="From Server" />
<SuspenseBoundary>
<WorkflowDropdown
......@@ -94,7 +94,6 @@ export default function AddSubworkflowDialog(props: Props) {
onClick={() => {
fromDiskInputRef.current?.click();
}}
role="listitem"
>
<ListItemText primary="From Disk" />
</ListItem>
......
......@@ -17,3 +17,8 @@
padding: 1rem;
color: var(--primary);
}
.list {
margin: 0;
padding: 0;
}
......@@ -36,7 +36,7 @@ function WorkflowItem(props: Props) {
const id = startWorkflowEvent?.workflow_id;
return (
<div className={styles.item} role="listitem" aria-label={id}>
<li className={styles.item} aria-label={id}>
<div className={styles.header}>
<div>
<h3 className={styles.title}>{id || idFallback}</h3>
......@@ -58,7 +58,7 @@ function WorkflowItem(props: Props) {
)}
{id && <RerunButton id={id} />}
</div>
</div>
</li>
);
}
......
......@@ -6,14 +6,14 @@ function WorkflowItemErrorFallback(props: FallbackProps) {
const { error } = props;
return (
<div className={styles.item} role="listitem">
<li className={styles.item}>
<h3>Job cannot be displayed!</h3>
<p className={styles.error}>Error: {error.message}</p>
<span>
Check that the ewoks packages are up-to-date and/or if the event
database is corrupted.
</span>
</div>
</li>
);
}
......
......@@ -26,7 +26,7 @@ function WorkflowList(props: Props) {
}
return (
<div role="list">
<ul className={styles.list}>
{jobs
.sort(
(a, b) =>
......@@ -40,7 +40,7 @@ function WorkflowList(props: Props) {
<WorkflowItem events={events} />
</ErrorBoundary>
))}
</div>
</ul>
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment