mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 09:51:36 +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--disabled="{disabled}"
|
||||
{...$$restProps}>
|
||||
<div
|
||||
role="button"
|
||||
tabindex="{current ? '-1' : '0'}"
|
||||
<button
|
||||
disabled="{disabled}"
|
||||
aria-disabled="{disabled}"
|
||||
tabindex="{!current && !disabled ? '0' : '-1'}"
|
||||
class:bx--progress-step-button="{true}"
|
||||
class:bx--progress-step-button--unclickable="{current}"
|
||||
on:click="{() => {
|
||||
|
@ -112,5 +113,5 @@
|
|||
<p class:bx--progress-optional="{true}">{secondaryLabel}</p>
|
||||
{/if}
|
||||
<span class:bx--progress-line="{true}"></span>
|
||||
</div>
|
||||
</button>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue