{{ option.type === 'divider' ? '' : option.label }}
diff --git a/src/renderer/components/ft-input/ft-input.vue b/src/renderer/components/ft-input/ft-input.vue
index 20fd3c648b3a8..bdc007b5dfc47 100644
--- a/src/renderer/components/ft-input/ft-input.vue
+++ b/src/renderer/components/ft-input/ft-input.vue
@@ -1,3 +1,4 @@
+
+
{{ list }}
+
diff --git a/src/renderer/components/ft-list-dropdown/ft-list-dropdown.css b/src/renderer/components/ft-list-dropdown/ft-list-dropdown.css
index 751dd7517c827..e52594083dfbf 100644
--- a/src/renderer/components/ft-list-dropdown/ft-list-dropdown.css
+++ b/src/renderer/components/ft-list-dropdown/ft-list-dropdown.css
@@ -1,11 +1,11 @@
-.dropDown {
+.dropdown {
position: relative;
text-align: center;
text-transform: uppercase;
margin: 0 5px;
}
-.dropDown ul {
+.dropdown ul {
display: none;
position: absolute;
list-style: none;
@@ -15,19 +15,19 @@
z-index: 100;
}
-.dropDown ul li {
+.dropdown ul li.buttonOption {
width: 100%;
float: none;
box-sizing: border-box;
}
-.dropDown:hover ul {
- display: block;
+.dropdown:hover ul, .dropdown:focus-within ul {
+ display: block;
}
-.dropDown ul li a {
- text-decoration: none;
- color: inherit;
+.dropdown ul li a {
+ text-decoration: none;
+ color: inherit;
}
.buttonTitle {
@@ -60,7 +60,7 @@
transition: background 0.2s ease-out;
}
-.buttonOption:hover {
+.buttonOption:hover, .buttonOption:focus {
background-color: var(--side-nav-hover-color);
-moz-transition: background 0.2s ease-in;
-o-transition: background 0.2s ease-in;
diff --git a/src/renderer/components/ft-list-dropdown/ft-list-dropdown.js b/src/renderer/components/ft-list-dropdown/ft-list-dropdown.js
index 1f186014afc9e..b53ca8941237e 100644
--- a/src/renderer/components/ft-list-dropdown/ft-list-dropdown.js
+++ b/src/renderer/components/ft-list-dropdown/ft-list-dropdown.js
@@ -1,5 +1,5 @@
import Vue from 'vue'
-
+import { sanitizeForHtmlId, handleDropdownKeyboardEvent } from '../../helpers/accessibility'
export default Vue.extend({
name: 'FtListDropdown',
props: {
@@ -31,5 +31,26 @@ export default Vue.extend({
listType: function () {
return this.$store.getters.getListType
}
+ },
+ methods: {
+ sanitizeForHtmlId,
+ handleIconKeyPress() {
+ const firstOption = document.getElementById('buttonOption0')
+ if (firstOption) {
+ firstOption.setAttribute('tabIndex', 1)
+ firstOption.focus()
+ }
+ },
+ handleDropdownClick: function(index, event) {
+ if (!handleDropdownKeyboardEvent(event, event?.target)) {
+ return
+ }
+
+ const unspacedTitle = CSS.escape(sanitizeForHtmlId(this.title))
+ const allOptions = document.querySelector(`#${unspacedTitle} + ul`)
+ allOptions.setAttribute('tabindex', '-1')
+ event.target.setAttribute('tabindex', '0')
+ this.$emit('click', this.labelValues[index])
+ }
}
})
diff --git a/src/renderer/components/ft-list-dropdown/ft-list-dropdown.vue b/src/renderer/components/ft-list-dropdown/ft-list-dropdown.vue
index 383880d41e7e5..814fccec74fc0 100644
--- a/src/renderer/components/ft-list-dropdown/ft-list-dropdown.vue
+++ b/src/renderer/components/ft-list-dropdown/ft-list-dropdown.vue
@@ -1,6 +1,14 @@