Skip to content

Commit f64138e

Browse files
committed
feat: adjust a-select
1 parent ff7c43e commit f64138e

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/components/atoms/a-select/a-select.vue

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<div
1212
class="a-select__field"
1313
:class="{ 'a-select__field--open': open }"
14+
aria-haspopup="listbox"
15+
aria-selected="true"
1416
@click="open = !open"
1517
>
1618
{{ selected }}
@@ -24,14 +26,16 @@
2426
@click.native="open = !open"
2527
/>
2628

27-
<div
29+
<ul
2830
v-if="options && options.length"
2931
class="a-select__list-items"
3032
:class="{ 'a-select__list-items--hide': !open }"
33+
:aria-expanded="open"
3134
>
32-
<div
35+
<li
3336
v-for="(option, index) of options"
3437
:key="index"
38+
role="option"
3539
class="a-select__item"
3640
@click="
3741
selected = option;
@@ -40,8 +44,8 @@
4044
"
4145
>
4246
{{ option }}
43-
</div>
44-
</div>
47+
</li>
48+
</ul>
4549
</div>
4650
</template>
4751

@@ -170,10 +174,6 @@ export default {
170174
transition: background-color 250ms, color 250ms;
171175
user-select: none;
172176
width: 100%;
173-
174-
&--open {
175-
border: var(--size-nano) solid var(--color-theme-secondary);
176-
}
177177
}
178178
179179
.a-select__icon {
@@ -210,6 +210,10 @@ export default {
210210
cursor: pointer;
211211
user-select: none;
212212
213+
&:not(:last-child) {
214+
border-bottom: var(--size-micro) solid var(--colors-scale-grey-medium);
215+
}
216+
213217
&:hover {
214218
background-color: var(--colors-scale-grey-light);
215219
}

src/styles/essentials/_reset.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ h1, h2, h3, h4, h5, h6 {
3737
}
3838

3939
ul {
40+
margin: 0;
4041
padding: 0;
4142
list-style-type: none;
4243
}

0 commit comments

Comments
 (0)