mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibWeb: Fix accessible-name computation for pseudo-element content
This change fixes handling for substep ii of the “F. Name From Content” step at https://w3c.github.io/accname/#step2F in the “Accessible Name and Description Computation” spec — to correctly include any ::before and ::after pseudo-element content in the computation of accessible names. Otherwise, without this change, accessible names unexpectedly don’t include that pseudo-element content.
This commit is contained in:
parent
3ba7c53668
commit
b1587cc60f
Notes:
github-actions[bot]
2024-11-11 21:58:09 +00:00
Author: https://github.com/sideshowbarker
Commit: b1587cc60f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2194
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ
3 changed files with 24 additions and 14 deletions
|
@ -254,6 +254,7 @@ void TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element, CSS::Se
|
|||
|
||||
element.set_pseudo_element_node({}, pseudo_element, pseudo_element_node);
|
||||
insert_node_into_inline_or_block_ancestor(*pseudo_element_node, pseudo_element_display, mode);
|
||||
pseudo_element_node->mutable_computed_values().set_content(pseudo_element_content);
|
||||
}
|
||||
|
||||
static bool is_ignorable_whitespace(Layout::Node const& node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue