chore(): sync with main

This commit is contained in:
Liam DeBeasi
2023-01-18 09:36:43 -05:00
193 changed files with 825 additions and 976 deletions

View File

@ -165,7 +165,6 @@ export class Segment implements ComponentInterface {
async componentDidLoad() {
this.setCheckedClasses();
this.ensureFocusable();
this.gesture = (await import('../../utils/gesture')).createGesture({
el: this.el,
@ -519,19 +518,7 @@ export class Segment implements ComponentInterface {
const previous = this.checked || current;
this.checkButton(previous, current);
}
current.focus();
}
/* By default, focus is delegated to the selected `ion-segment-button`.
* If there is no selected button, focus will instead pass to the first child button.
**/
private ensureFocusable() {
if (this.value !== undefined) {
return;
}
const buttons = this.getButtons();
buttons[0]?.setAttribute('tabindex', '0');
current.setFocus();
}
render() {