Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为 RegionPicker 添加键盘导航 & WAI-ARIA 支持 #303

Merged
merged 4 commits into from
May 2, 2018

Conversation

Justineo
Copy link
Member

@Justineo Justineo commented May 1, 2018

#234.

  • keyboard nav & WAI-ARIA support for RegionPicker
  • log10 in utils/math
  • focusBefore & focusAfter in utils/dom
  • focus({ visible }) for Radio & Checkbox

* `log10` in `utils/math`
* `focusBefore` & `focusAfter` in `utils/dom`
* `focus({ visible })` for `Radio` & `Checkbox`
if (contains(this.$el, relatedTarget)) {
setTimeout(() => {
focusBefore(target)
}, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果 delay 是 0 ,就不写?

this.toggleActive(this.focusNode, false)
}

this.focusPath = [...focusPath].slice(0, -1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接 focusPath.slice(0, -1)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是故意的,如果直接修改原数组,watcher 里拿不到修改前的长度了。我加个注释吧。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slice 返回新数组?

@Justineo Justineo merged commit e750248 into dev May 2, 2018
@Justineo Justineo deleted the keyboard-nav-region-picker branch May 2, 2018 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants