LibWeb: Do not allow focusing "Actually Disabled" elements

This commit is contained in:
Simek 2024-11-02 19:17:20 +01:00 committed by Andreas Kling
parent 21b705ee32
commit 09420406b8
Notes: github-actions[bot] 2024-11-05 09:40:25 +00:00
8 changed files with 34 additions and 4 deletions

View file

@ -155,7 +155,9 @@ public:
// ^EventTarget
// https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute:the-input-element
virtual bool is_focusable() const override { return m_type != TypeAttributeState::Hidden; }
// https://html.spec.whatwg.org/multipage/interaction.html#focusable-area
// https://html.spec.whatwg.org/multipage/semantics-other.html#concept-element-disabled
virtual bool is_focusable() const override;
// ^FormAssociatedElement
// https://html.spec.whatwg.org/multipage/forms.html#category-listed