Compare commits

..

2 Commits

Author SHA1 Message Date
vaidankarswapnil
853e48c5a6 Updated 1 test snapshot 2022-02-02 13:46:19 +05:30
vaidankarswapnil
b7eb7db3f0 Fixed a11y resource tree parent role issue 2022-02-02 13:40:43 +05:30
4 changed files with 10 additions and 2 deletions

View File

@@ -39,6 +39,7 @@ export const EntityValue: FunctionComponent<TableEntityProps> = ({
/>
<TextField
label={entityValueLabel && entityValueLabel}
id="entityTimeId"
autoFocus
type="time"
value={entityTimeValue}
@@ -53,6 +54,7 @@ export const EntityValue: FunctionComponent<TableEntityProps> = ({
<TextField
label={entityValueLabel && entityValueLabel}
className="addEntityTextField"
id="entityValueId"
autoFocus
disabled={isEntityValueDisable}
type={entityValueType}

View File

@@ -95,6 +95,7 @@ export const TableEntity: FunctionComponent<TableEntityProps> = ({
<Stack horizontal tokens={sectionStackTokens}>
<TextField
label={entityPropertyLabel && entityPropertyLabel}
id="entityPropertyId"
autoFocus
disabled={isPropertyTypeDisable}
placeholder={entityPropertyPlaceHolder}
@@ -108,8 +109,8 @@ export const TableEntity: FunctionComponent<TableEntityProps> = ({
onChange={onEntityTypeChange}
options={options}
disabled={isPropertyTypeDisable}
id="entityTypeId"
styles={dropdownStyles}
ariaLabel="Select Type"
/>
<EntityValue
entityValueLabel={entityValueLabel}

View File

@@ -194,7 +194,7 @@ export class TreeNodeComponent extends React.Component<TreeNodeComponentProps, T
</div>
{node.children && (
<AnimateHeight duration={TreeNodeComponent.transitionDurationMS} height={this.state.isExpanded ? "auto" : 0}>
<div className="nodeChildren" data-test={node.label}>
<div className="nodeChildren" data-test={node.label} role="tree">
{TreeNodeComponent.getSortedChildren(node).map((childNode: TreeNode) => (
<TreeNodeComponent
key={`${childNode.label}-${generation + 1}-${childNode.timestamp}`}

View File

@@ -100,6 +100,7 @@ exports[`TreeNodeComponent does not render children by default 1`] = `
<div
className="nodeChildren"
data-test="label"
role="tree"
>
<TreeNodeComponent
generation={3}
@@ -250,6 +251,7 @@ exports[`TreeNodeComponent renders a simple node (sorted children, expanded) 1`]
<div
className="nodeChildren"
data-test="label"
role="tree"
>
<TreeNodeComponent
generation={13}
@@ -351,6 +353,7 @@ exports[`TreeNodeComponent renders loading icon 1`] = `
<div
className="nodeChildren"
data-test="label"
role="tree"
/>
</AnimateHeight>
</div>
@@ -463,6 +466,7 @@ exports[`TreeNodeComponent renders sorted children, expanded, leaves and parents
<div
className="nodeChildren"
data-test="label"
role="tree"
>
<TreeNodeComponent
generation={13}
@@ -592,6 +596,7 @@ exports[`TreeNodeComponent renders unsorted children by default 1`] = `
<div
className="nodeChildren"
data-test="label"
role="tree"
>
<TreeNodeComponent
generation={3}