Skip to content

Commit

Permalink
a11y: Add role project tree (#2637)
Browse files Browse the repository at this point in the history
* a11y: Add role and label to filter dialog and project tree

* update the label name

* remove the label

Co-authored-by: Corina <14900841+corinagum@users.noreply.github.com>
  • Loading branch information
lei9444 and corinagum authored Apr 15, 2020
1 parent ed99f0b commit b67799a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const ProjectTree: React.FC<IProjectTreeProps> = props => {
onSelect(props.group!.key);
};
return (
<span ref={props.group && props.group.data.isRoot && addMainDialogRef}>
<span role="grid" ref={props.group && props.group.data.isRoot && addMainDialogRef}>
<TreeItem
link={props.group!.data}
depth={0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface ITreeItemProps {

const onRenderItem = (item: IOverflowSetItemProps) => {
return (
<div css={itemText(item.depth)}>
<div role="cell" css={itemText(item.depth)}>
{item.depth !== 0 && <Icon iconName="Flow" styles={{ root: { marginRight: '8px' } }} />}
{item.displayName}
</div>
Expand All @@ -32,6 +32,7 @@ const onRenderOverflowButton = (isRoot: boolean) => {
return overflowItems => {
return showIcon ? (
<IconButton
role="cell"
className="dialog-more-btn"
data-testid="dialogMoreButton"
styles={moreButton}
Expand All @@ -46,6 +47,7 @@ export const TreeItem: React.FC<ITreeItemProps> = props => {
const { link, isActive, isSubItemActive, depth, onDelete, onSelect } = props;
return (
<div
role="presentation"
tabIndex={1}
css={navItem(isActive, !!isSubItemActive)}
onClick={() => {
Expand All @@ -58,6 +60,7 @@ export const TreeItem: React.FC<ITreeItemProps> = props => {
}}
>
<OverflowSet
role="row"
items={[
{
key: link.id,
Expand Down

0 comments on commit b67799a

Please sign in to comment.