mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
fix(dropdown): remove redundant role/id (#1327)
* fix(list-box): list box item should have a role and `aria-selected` attribute * fix(dropdown): remove redundant role/id
This commit is contained in:
parent
068e4913e0
commit
66c96612bf
2 changed files with 3 additions and 1 deletions
|
@ -164,9 +164,9 @@
|
||||||
</label>
|
</label>
|
||||||
{/if}
|
{/if}
|
||||||
<ListBox
|
<ListBox
|
||||||
|
role="{undefined}"
|
||||||
type="{type}"
|
type="{type}"
|
||||||
size="{size}"
|
size="{size}"
|
||||||
id="{id}"
|
|
||||||
name="{name}"
|
name="{name}"
|
||||||
aria-label="{$$props['aria-label']}"
|
aria-label="{$$props['aria-label']}"
|
||||||
class="bx--dropdown {direction === 'top' && 'bx--list-box--up'} {invalid &&
|
class="bx--dropdown {direction === 'top' && 'bx--list-box--up'} {invalid &&
|
||||||
|
|
|
@ -12,9 +12,11 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
role="option"
|
||||||
class:bx--list-box__menu-item="{true}"
|
class:bx--list-box__menu-item="{true}"
|
||||||
class:bx--list-box__menu-item--active="{active}"
|
class:bx--list-box__menu-item--active="{active}"
|
||||||
class:bx--list-box__menu-item--highlighted="{highlighted}"
|
class:bx--list-box__menu-item--highlighted="{highlighted}"
|
||||||
|
aria-selected="{active}"
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseenter
|
on:mouseenter
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue