mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-18 22:19:50 +00:00
LibWeb/HTML: Check all radio buttons in group for required attribute
This fixes a bug in the algorithm for determining if radio buttons are missing their value. Previously it was only checked if the button itself is required. Now the algorithm checks if the radio button group contains a required radio button in order to determine if the value is required.
This commit is contained in:
parent
f7442ae907
commit
c01dc5900a
Notes:
github-actions[bot]
2025-08-17 20:28:15 +00:00
Author: https://github.com/skyz1
Commit: c01dc5900a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5883
Reviewed-by: https://github.com/gmta ✅
2 changed files with 5 additions and 5 deletions
|
@ -7,6 +7,7 @@
|
|||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
* Copyright (c) 2024, Fernando Kiotheka <fer@k6a.dev>
|
||||
* Copyright (c) 2025, Felipe Muñoz Mazur <felipe.munoz.mazur@protonmail.com>
|
||||
* Copyright (c) 2025, Glenn Skrzypczak <glenn.skrzypczak@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -3323,7 +3324,7 @@ bool HTMLInputElement::suffering_from_being_missing() const
|
|||
if (is_in_same_radio_button_group(*this, element)) {
|
||||
if (element.checked())
|
||||
has_checkedness_false_for_all_elements_in_group = false;
|
||||
if (has_attribute(HTML::AttributeNames::required))
|
||||
if (element.has_attribute(HTML::AttributeNames::required))
|
||||
has_required_element_in_group = true;
|
||||
}
|
||||
return TraversalDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue