Skip to content

Commit ef3fe87

Browse files
authored
Merge pull request #497 from Lemoncode/fixaccessibilitybug/#486-9-li-Aria-label-issue
#486 9 li aria label issue
2 parents 0cc30d2 + a1a459e commit ef3fe87

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/pods/canvas/components/canvas-accessible/components/field-accessible.component.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@ interface Props {
88
}
99

1010
export const Field: React.FC<Props> = props => {
11-
const { field, listName } = props;
11+
const { field } = props;
1212

1313
const renderNNElement = (NN?: boolean) => {
14-
if (NN) return <span>NN</span>;
14+
if (NN) return <span>Not Null</span>;
15+
};
16+
const renderArrayElement = (isArray?: boolean) => {
17+
if (isArray)
18+
return (
19+
<>
20+
<span>array</span>&nbsp;
21+
</>
22+
);
1523
};
1624

1725
const renderChildrenElement = (name: string, children?: FieldVm[]) => {
@@ -20,9 +28,10 @@ export const Field: React.FC<Props> = props => {
2028
};
2129

2230
return (
23-
<li aria-label={`${listName} field`}>
24-
<span>{field.name}</span>
25-
<span>{field.type}</span>
31+
<li>
32+
<span>{field.name}</span>&nbsp;
33+
<span>{field.type}</span>&nbsp;
34+
{renderArrayElement(field.isArray)}
2635
{renderNNElement(field.isNN)}
2736
{renderChildrenElement(field.name, field.children)}
2837
</li>

0 commit comments

Comments
 (0)