Skip to content

Commit efc48c5

Browse files
makhmudjon-inadullaevMakhmudjon Inadullaev
andauthored
updates for the suggestion (npm#297)
Co-authored-by: Makhmudjon Inadullaev <makhmudjon@Makhmudjons-MacBook-Pro-2.local>
1 parent 723d6ea commit efc48c5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

theme/src/components/variant-select.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function VariantSelect(props) {
4242
const variantPages = NavHierarchy.getVariantsForPage(props.root, vp.page);
4343
const items = [];
4444
let selectedItem = variantPages[0];
45-
45+
4646
if (variantPages.length === 0) {
4747
return null;
4848
}
@@ -73,6 +73,7 @@ function VariantSelect(props) {
7373
}
7474
items.push(
7575
<a
76+
id={match.variant.shortName}
7677
style={{ textDecoration: 'none' }}
7778
tabIndex={0}
7879
key={match.variant.title}
@@ -99,8 +100,9 @@ function VariantSelect(props) {
99100
}
100101

101102
return (
102-
<div ref={wrapper}>
103-
<Dropdown onKeyDown={onDropDownKeyDown} overlay={props.overlay}>
103+
<div style={{ display: 'flex', flexDirection: 'column' }} ref={wrapper}>
104+
<label id="label-versions-list-item" htmlFor='variant-select'>Select CLI Version:</label>
105+
<Dropdown id="versions-list-item" aria-labelledby={selectedItem?.variant?.shortName} onKeyDown={onDropDownKeyDown} overlay={props.overlay}>
104106
<VariantSelect.Button aria-label='Version release'>{selectedItem.variant.title}</VariantSelect.Button>
105107
<VariantSelect.Menu direction={props.direction} width={props.menuWidth}>
106108
{items}

0 commit comments

Comments
 (0)