-
Notifications
You must be signed in to change notification settings - Fork 123
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
Conversation
* `log10` in `utils/math` * `focusBefore` & `focusAfter` in `utils/dom` * `focus({ visible })` for `Radio` & `Checkbox`
if (contains(this.$el, relatedTarget)) { | ||
setTimeout(() => { | ||
focusBefore(target) | ||
}, 0) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接 focusPath.slice(0, -1)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是故意的,如果直接修改原数组,watcher 里拿不到修改前的长度了。我加个注释吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slice 返回新数组?
#234.
RegionPicker
log10
inutils/math
focusBefore
&focusAfter
inutils/dom
focus({ visible })
forRadio
&Checkbox