[improvement] DropdownMenu: improve accessibility

This commit is contained in:
陈嘉涵
2019-05-25 17:01:35 +08:00
parent 1821889f01
commit 68537de73f
7 changed files with 35 additions and 25 deletions

View File

@@ -65,6 +65,8 @@ export default sfc({
render(h) {
const Titles = this.children.map((item, index) => (
<div
role="button"
tabindex={item.disabled ? -1 : 0}
class={bem('item', { disabled: item.disabled })}
onClick={() => {
if (!item.disabled) {