Updated TreeComponent alt text (#188)

Co-authored-by: Daniel Si Pham <v-danpha@microsoft.com>
This commit is contained in:
DanielSPham 2020-09-14 16:27:12 -07:00 committed by GitHub
parent c4257bf4a9
commit e22675bc40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -282,7 +282,7 @@ export class TreeNodeComponent extends React.Component<TreeNodeComponentProps, T
<img
className="expandCollapseIcon"
src={this.state.isExpanded ? TriangleDownIcon : TriangleRightIcon}
alt={this.state.isExpanded ? "Branch is expanded" : "Branch is collapsed"}
alt={this.state.isExpanded ? `${node.label} branch is expanded` : `${node.label} branch is collapsed`}
onKeyPress={(event: React.KeyboardEvent<HTMLDivElement>) => this.onCollapseExpandIconKeyPress(event, node)}
tabIndex={0}
role="button"

View File

@ -49,7 +49,7 @@ exports[`TreeNodeComponent does not render children by default 1`] = `
tabIndex={-1}
>
<img
alt="Branch is collapsed"
alt="label branch is collapsed"
className="expandCollapseIcon"
onKeyPress={[Function]}
role="button"
@ -140,7 +140,7 @@ exports[`TreeNodeComponent renders a simple node (sorted children, expanded) 1`]
tabIndex={-1}
>
<img
alt="Branch is expanded"
alt="label branch is expanded"
className="expandCollapseIcon"
onKeyPress={[Function]}
role="button"
@ -278,7 +278,7 @@ exports[`TreeNodeComponent renders sorted children, expanded, leaves and parents
tabIndex={-1}
>
<img
alt="Branch is expanded"
alt="label branch is expanded"
className="expandCollapseIcon"
onKeyPress={[Function]}
role="button"
@ -436,7 +436,7 @@ exports[`TreeNodeComponent renders unsorted children by default 1`] = `
tabIndex={-1}
>
<img
alt="Branch is expanded"
alt="label branch is expanded"
className="expandCollapseIcon"
onKeyPress={[Function]}
role="button"