mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(progress-step): use button element
- set tabIndex to "-1" if disabled
This commit is contained in:
parent
9f378f0c3b
commit
3202f39a4f
1 changed files with 5 additions and 4 deletions
|
@ -71,9 +71,10 @@
|
||||||
class:bx--progress-step--incomplete="{!complete && !current}"
|
class:bx--progress-step--incomplete="{!complete && !current}"
|
||||||
class:bx--progress-step--disabled="{disabled}"
|
class:bx--progress-step--disabled="{disabled}"
|
||||||
{...$$restProps}>
|
{...$$restProps}>
|
||||||
<div
|
<button
|
||||||
role="button"
|
disabled="{disabled}"
|
||||||
tabindex="{current ? '-1' : '0'}"
|
aria-disabled="{disabled}"
|
||||||
|
tabindex="{!current && !disabled ? '0' : '-1'}"
|
||||||
class:bx--progress-step-button="{true}"
|
class:bx--progress-step-button="{true}"
|
||||||
class:bx--progress-step-button--unclickable="{current}"
|
class:bx--progress-step-button--unclickable="{current}"
|
||||||
on:click="{() => {
|
on:click="{() => {
|
||||||
|
@ -112,5 +113,5 @@
|
||||||
<p class:bx--progress-optional="{true}">{secondaryLabel}</p>
|
<p class:bx--progress-optional="{true}">{secondaryLabel}</p>
|
||||||
{/if}
|
{/if}
|
||||||
<span class:bx--progress-line="{true}"></span>
|
<span class:bx--progress-line="{true}"></span>
|
||||||
</div>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue