Skip to content

Commit 9e0c84b

Browse files
enable auto-accessibility feature on graph nodes (#2388)
* enable auto-accessibility feature on graph icons Signed-off-by: Michael Robinson <merobi@gmail.com> * fix icon attribute formatting Signed-off-by: Michael Robinson <merobi@gmail.com> --------- Signed-off-by: Michael Robinson <merobi@gmail.com> Co-authored-by: Willy Lulciuc <willy@datakin.com>
1 parent bb411a9 commit 9e0c84b

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

web/src/components/lineage/components/node/Node.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ class Node extends React.Component<NodeProps> {
7373
const { node, edgeEnds, selectedNode } = this.props
7474
const job = isJob(node)
7575
const isSelected = selectedNode === node.label
76+
const ariaJobLabel = 'Job'
77+
const ariaDatasetLabel = 'Dataset'
7678
return (
7779
<Link
7880
to={this.determineLink(node)}
@@ -99,6 +101,8 @@ class Node extends React.Component<NodeProps> {
99101
cy={node.y}
100102
/>
101103
<FontAwesomeIcon
104+
title={ariaJobLabel}
105+
aria-hidden={'true'}
102106
style={{ transformOrigin: `${node.x}px ${node.y}px` }}
103107
icon={faCog}
104108
width={ICON_SIZE}
@@ -133,6 +137,8 @@ class Node extends React.Component<NodeProps> {
133137
rx={4}
134138
/>
135139
<FontAwesomeIcon
140+
title={ariaDatasetLabel}
141+
aria-hidden={'true'}
136142
icon={faDatabase}
137143
width={ICON_SIZE}
138144
height={ICON_SIZE}

web/src/components/lineage/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { Nullable } from '../../types/util/Nullable'
77
export type JobOrDataset = 'JOB' | 'DATASET'
88
export type BatchOrStream = 'BATCH' | 'STREAM' | 'SERVICE'
99
export type DbTableOrStream = 'DB_TABLE' | 'STREAM'
10+
export type ariaJobLabel = string
11+
export type ariaDatasetLabel = string
1012

1113
export interface LineageDataset {
1214
id: { namespace: string; name: string }

0 commit comments

Comments
 (0)