MCPcopy Create free account
hub / github.com/UI5/webcomponents / _applyFocusToSelectedItem

Method _applyFocusToSelectedItem

packages/main/src/Select.ts:951–960  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

949 }
950
951 _applyFocusToSelectedItem() {
952 this.options.forEach(option => {
953 option.focused = option.selected;
954 if (option.focused) {
955 // move focus to the selected option so screen readers
956 // can announce it when the popover opens
957 option.focus();
958 }
959 });
960 }
961
962 _afterClose() {
963 this.opened = false;

Callers 1

_afterOpenMethod · 0.95

Calls 1

focusMethod · 0.45

Tested by

no test coverage detected