mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
LibWeb: Make HTML{Button,Select,TextArea}Element focusable
From the HTML spec: Modulo platform conventions, it is suggested that the following elements should be considered as focusable areas and be sequentially focusable: ... - button elements - select elements - textarea elements ... Also add a spec link to the existing HTMLAnchorElement::is_focusable(). Note that this still doesn't allow triggering keyboard-focused buttons, checkboxes, or radio buttons - we don't seem to run the expected activation behavior for any of them.
This commit is contained in:
parent
80506a161f
commit
de53eb825a
Notes:
sideshowbarker
2024-07-17 16:42:56 +09:00
Author: https://github.com/linusg
Commit: de53eb825a
Pull-request: https://github.com/SerenityOS/serenity/pull/13279
4 changed files with 14 additions and 0 deletions
|
@ -37,6 +37,10 @@ public:
|
|||
TypeAttributeState type_state() const;
|
||||
void set_type(String const&);
|
||||
|
||||
// ^EventTarget
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute:the-button-element
|
||||
virtual bool is_focusable() const override { return true; }
|
||||
|
||||
// ^FormAssociatedElement
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#category-listed
|
||||
virtual bool is_listed() const override { return true; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue