mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 05:55:13 +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:
parent
173368bd5e
commit
56c7857053
Notes:
github-actions[bot]
2025-01-09 14:09:55 +00:00
Author: https://github.com/sideshowbarker Commit: https://github.com/LadybirdBrowser/ladybird/commit/56c78570534 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2972 Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ void HTMLElement::set_dir(String const& dir)
|
||||||
|
|
||||||
bool HTMLElement::is_focusable() const
|
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
|
// https://html.spec.whatwg.org/multipage/interaction.html#dom-iscontenteditable
|
||||||
|
|
Loading…
Add table
Reference in a new issue