Skip to content

Commit

Permalink
fix(query-builder): replace expression icons with icon buttons to imp…
Browse files Browse the repository at this point in the history
…rove accessibility and interaction styles.
  • Loading branch information
desig9stein committed Oct 8, 2024
1 parent 96f89c3 commit 78dd862
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
.igx-filter-tree__expression-column {
padding-inline: pad-inline(rem(3px), rem(6px), rem(8px));
}

igx-prefix {
display: flex;
}
Expand All @@ -239,20 +239,10 @@
%filter-tree__expression-actions {
display: inline-flex;
margin: 0 rem(8px);
gap: rem(8px);

igx-icon {
cursor: pointer;
color: color(null, 'gray', 500);
outline-style: none;

&:hover,
&:focus {
color: color(null, 'gray', 800);
}
}

igx-icon + igx-icon {
margin-inline-start: rem(8px);
%igx-icon-button-display {
--size: #{sizable(rem(20px), rem(24px), rem(32px))};
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,20 @@ <h6 class="igx-filter-empty__title">
expressionItem.hovered
"
>
<igx-icon
role="button"
tabindex="0"
<button
igxIconButton="flat"
aria-labelledby="edit-expression"
[style.--component-size]="getComponentSizeStyles()"
(keydown)="invokeClick($event)"
(click)="enterExpressionEdit(expressionItem)">
edit
</igx-icon>
<igx-icon id="edit-expression">edit</igx-icon>
</button>

<igx-icon
role="button"
tabindex="0"
<button
igxIconButton="flat"
igxButton="icon"

Check failure on line 161 in projects/igniteui-angular/src/lib/query-builder/query-builder.component.html

View workflow job for this annotation

GitHub Actions / run-tests (18.x)

Type '"icon"' is not assignable to type '"" | IgxButtonType'.

Check failure on line 161 in projects/igniteui-angular/src/lib/query-builder/query-builder.component.html

View workflow job for this annotation

GitHub Actions / run-tests (20.x)

Type '"icon"' is not assignable to type '"" | IgxButtonType'.
aria-labelledby="add-expression"
[style.--component-size]="getComponentSizeStyles()"
(keydown)="invokeClick($event)"
(click)="enterExpressionAdd(expressionItem)"
*ngIf="
Expand All @@ -169,8 +172,8 @@ <h6 class="igx-filter-empty__title">
])
"
>
add
</igx-icon>
<igx-icon id="add-expression">add</igx-icon>
</button>
</div>
</div>

Expand Down

0 comments on commit 78dd862

Please sign in to comment.