forked from servo/servo
-
Notifications
You must be signed in to change notification settings - Fork 0
Focus student project
Josh Matthews edited this page Jan 7, 2016
·
9 revisions
Background information: Keyboard focus is an important concept for many web applications. Servo currently supports only the bare minimum required to implement text input in form controls on web pages; this project will greatly improve the usability of sites containing forms for users who use the keyboard in order to quickly navigate through pages.
Initial step: build Servo, then mail the mozilla.dev.servo mailing list introducing your group.
Subsequent steps:
- Create a sequential focus ordering list vector that is stored in the Document object. When new elements are added to the document (see
bind_to_tree
in element.rs), they should be added to this list in tree order if theirSEQUENTIALLY_FOCUSABLE
flag is set. (See #5858 for details on this flag, which is also called the "tabindex focus flag.") - Add a
handle_event
implementation (of theVirtualMethods
trait) for theDocument
object that processestab
andshift + tab
key events. This should cause the document focus to transition to the next (or previous) element present in the sequential list, and wrap around when the list is exhausted. - Process the
tabindex
attribute according to the spec, such that the sequential focus ordering list is ordered correctly in the presence oftabindex
. Use existing implementations of methods likeparse_plain_attribute
andattribute_mutated
for inspiration. - Process the
autofocus
attribute on HTMLInputElement according to the spec.
TODO: implement click-based positioning too?