Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui-library): fixed contrast violation in disabled state #802

Merged
merged 7 commits into from
Jan 19, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export class BlrIconButton extends LitElement {
<span
aria-label=${this.arialabel || nothing}
class="blr-semantic-action blr-icon-button ${classes}"
aria-disabled=${this.disabled ? 'true' : nothing}
@click=${this.handleClick}
id=${this.buttonId || nothing}
tabindex=${this.disabled ? nothing : '0'}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ export class BlrTextButton extends LitElement {
</style>
<span
class="${classes}"
aria-disabled=${this.disabled ? 'true' : nothing}
@click="${this.handleClick}"
tabindex=${this.disabled ? nothing : '0'}
@focus=${this.handleFocus}
@blur=${this.handleBlur}
role=${this.disabled ? nothing : 'button'}
role="button"
@keydown=${(event: KeyboardEvent) => {
if (event.code === 'Space') {
this.handleClick(event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export const { tokenizedLight: actionLight, tokenizedDark: actionDark } = render
&.disabled {
pointer-events: none;
cursor: not-allowed;
user-select: none;
-webkit-user-select: none;
}

&.xs {
Expand Down
Loading