mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibWeb: Return true for is_focusable() elements with non-null tabindex
This change implements the requirements stated in the HTML spec at https://html.spec.whatwg.org/multipage/interaction.html#tabindex-value that UAs must allow HTML elements with non-null tabindex values to be considered as focusable areas.
This commit is contained in:
committed by
Sam Atkins
parent
173368bd5e
commit
56c7857053
@@ -92,7 +92,7 @@ void HTMLElement::set_dir(String const& dir)
|
||||
|
||||
bool HTMLElement::is_focusable() const
|
||||
{
|
||||
return is_editing_host();
|
||||
return is_editing_host() || get_attribute(HTML::AttributeNames::tabindex).has_value();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#dom-iscontenteditable
|
||||
|
||||
Reference in New Issue
Block a user