mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: AnchorElement should be focusable with tabindex
This commit is contained in:
parent
3bc061d028
commit
8ca59e7c7e
Notes:
github-actions[bot]
2025-11-12 12:58:14 +00:00
Author: https://github.com/lpas
Commit: 8ca59e7c7e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6780
Reviewed-by: https://github.com/gmta ✅
2 changed files with 5 additions and 5 deletions
|
|
@ -31,7 +31,7 @@ public:
|
|||
|
||||
// ^EventTarget
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute:the-a-element
|
||||
virtual bool is_focusable() const override { return has_attribute(HTML::AttributeNames::href); }
|
||||
virtual bool is_focusable() const override { return Base::is_focusable() || has_attribute(HTML::AttributeNames::href); }
|
||||
|
||||
virtual bool is_html_anchor_element() const override { return true; }
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
|||
|
||||
Found 35 tests
|
||||
|
||||
31 Pass
|
||||
4 Fail
|
||||
33 Pass
|
||||
2 Fail
|
||||
Pass a should not be focusable by default.
|
||||
Pass a[href] should be focusable by default.
|
||||
Pass button should be focusable by default.
|
||||
|
|
@ -19,13 +19,13 @@ Pass iframe should be focusable by default.
|
|||
Pass #svg-a should not be focusable by default.
|
||||
Pass #svg-text should not be focusable by default.
|
||||
Pass img should not be focusable by default.
|
||||
Fail A with tabindex=0 should be focusable.
|
||||
Pass A with tabindex=0 should be focusable.
|
||||
Pass a with tabindex=0 should be focusable.
|
||||
Pass text with tabindex=0 should be focusable.
|
||||
Pass SUMMARY#summary-out-tabindex0 with tabindex=0 should be focusable.
|
||||
Pass SUMMARY#summary-second-tabindex0 with tabindex=0 should be focusable.
|
||||
Pass IMG with tabindex=0 should be focusable.
|
||||
Fail A with tabindex=-1 should be focusable.
|
||||
Pass A with tabindex=-1 should be focusable.
|
||||
Pass a with tabindex=-1 should be focusable.
|
||||
Pass text with tabindex=-1 should be focusable.
|
||||
Pass SUMMARY#summary-out-tabindex-negative with tabindex=-1 should be focusable.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue