Skip to content

Commit 5fcd2f2

Browse files
committed
feat: APIC-475 relate label with dropdown
1 parent 8253afb commit 5fcd2f2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/AnypointDropdownMenu.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@ export class AnypointDropdownMenu extends ValidatableMixin(
5050
_triggerClass,
5151
_inputContainerClass,
5252
fitPositionTarget,
53+
name,
5354
} = this;
5455

5556
const renderValue = value || '';
5657
return html`<style>
5758
${this.styles}
5859
</style>
5960
<div class="${_inputContainerClass}">
60-
<div class="${_labelClass}">
61+
<div class="${_labelClass}" id="${name}">
6162
<slot name="label"></slot>
6263
</div>
6364
@@ -98,6 +99,7 @@ export class AnypointDropdownMenu extends ValidatableMixin(
9899
@overlay-opened="${this._dropdownOpened}"
99100
@select="${this._selectHandler}"
100101
@deselect="${this._deselectHandler}"
102+
aria-labelledby="${name}"
101103
>
102104
<div slot="dropdown-content" class="dropdown-content">
103105
<slot id="content" name="dropdown-content"></slot>
@@ -482,7 +484,7 @@ export class AnypointDropdownMenu extends ValidatableMixin(
482484
invalidMessage: { type: String },
483485
/**
484486
* Assistive text value.
485-
* Rendered beflow the input.
487+
* Rendered below the input.
486488
*/
487489
infoMessage: { type: String },
488490
/**

0 commit comments

Comments
 (0)