Skip to content

Commit 60f5a3d

Browse files
authored
docs(combobox): remove separate tab focus for nested pickerbutton (#3507)
The Picker Button that is nested within Combobox was previously tab focusable, separately from the Combobox itself. This update gives it a negative tabindex, making it consistent with the intended behavior and SWC implementation. This adds a tabindex option to the Picker Button template.
1 parent 6eff801 commit 60f5a3d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

components/combobox/stories/template.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ const Combobox = ({
8989
onclick: function () {
9090
updateArgs({ isOpen: !isOpen });
9191
},
92+
tabindex: "-1",
9293
}, context)}
9394
</div>
9495
`;

components/pickerbutton/stories/template.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const Template = ({
2525
isRounded = false,
2626
customStyles = {},
2727
onclick,
28+
tabindex,
2829
} = {}, context = {}) => {
2930
const { updateArgs } = context;
3031

@@ -54,6 +55,7 @@ export const Template = ({
5455
if (isDisabled) return;
5556
updateArgs({ isOpen: !isOpen });
5657
}}
58+
tabindex=${ifDefined(tabindex)}
5759
>
5860
<div class="${rootClass}-fill">
5961
${when(label, () => html`

0 commit comments

Comments
 (0)