diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/dropdown')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt | 3 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/dropdown/Separator.kt | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt index 8a37cf6c..0a61a814 100644 --- a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt +++ b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt @@ -261,6 +261,7 @@ internal class DropDownButton( init { this.id = id + this.role = "button" setInternalEventListener<DropDownButton> { click = { e -> if (parent?.parent is ContextMenu) e.asDynamic().dropDownCM = true @@ -291,7 +292,7 @@ internal class DropDownButton( override fun getSnAttrs(): List<StringPair> { return super.getSnAttrs() + listOf( "data-toggle" to "dropdown", "aria-haspopup" to "true", - "aria-expanded" to "false", "role" to "button", "href" to "#" + "aria-expanded" to "false", "href" to "#" ) } } diff --git a/src/main/kotlin/pl/treksoft/kvision/dropdown/Separator.kt b/src/main/kotlin/pl/treksoft/kvision/dropdown/Separator.kt index e786b47a..f417ff84 100644 --- a/src/main/kotlin/pl/treksoft/kvision/dropdown/Separator.kt +++ b/src/main/kotlin/pl/treksoft/kvision/dropdown/Separator.kt @@ -3,7 +3,6 @@ */ package pl.treksoft.kvision.dropdown -import pl.treksoft.kvision.core.StringPair import pl.treksoft.kvision.html.ListTag import pl.treksoft.kvision.html.TAG import pl.treksoft.kvision.html.Tag @@ -16,10 +15,8 @@ import pl.treksoft.kvision.html.Tag */ open class Separator(classes: Set<String> = setOf()) : Tag(TAG.LI, classes = classes + "divider") { - override fun getSnAttrs(): List<StringPair> { - val pr = super.getSnAttrs().toMutableList() - pr.add("role" to "separator") - return pr + init { + role = "separator" } companion object { |