mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibWeb/HTML: Implement report_validity
This implements the previously stubbed out `report_validity` method. The specification is not very clear on how to exactly report the validity. For now, we bring the first visible invalid control into view and focus it. In the future, however, it would make sense to support more complex scenarios and be more aligned with the other implementations.
This commit is contained in:
committed by
Shannon Booth
parent
296d9d74d8
commit
5c578b6057
Notes:
github-actions[bot]
2025-05-13 21:40:10 +00:00
Author: https://github.com/skyz1 Commit: https://github.com/LadybirdBrowser/ladybird/commit/5c578b60571 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4578 Reviewed-by: https://github.com/Psychpsyo Reviewed-by: https://github.com/shannonbooth ✅
@@ -711,6 +711,12 @@ bool HTMLSelectElement::check_validity()
|
||||
return check_validity_steps();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-reportvalidity
|
||||
bool HTMLSelectElement::report_validity()
|
||||
{
|
||||
return report_validity_steps();
|
||||
}
|
||||
|
||||
bool HTMLSelectElement::is_focusable() const
|
||||
{
|
||||
return enabled();
|
||||
|
||||
Reference in New Issue
Block a user