mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Space-separate parts of multi-label accessible names
This change ensures that when an accessible name is computed from multiple labels, the parts computed from each label are separated by spaces. Otherwise, without this change, the parts are run together in the accessible name, with no space in between.
This commit is contained in:
parent
3bfb0534be
commit
062e33438e
Notes:
github-actions[bot]
2024-12-26 20:45:13 +00:00
Author: https://github.com/sideshowbarker
Commit: 062e33438e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3045
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 11 additions and 3 deletions
|
@ -2425,6 +2425,8 @@ ErrorOr<String> Node::name_or_description(NameOrDescription target, Document con
|
|||
if (labels != nullptr && labels->length() > 0) {
|
||||
StringBuilder builder;
|
||||
for (u32 i = 0; i < labels->length(); i++) {
|
||||
if (!builder.is_empty())
|
||||
builder.append(" "sv);
|
||||
auto nodes = labels->item(i)->children_as_vector();
|
||||
for (auto const& node : nodes) {
|
||||
// AD-HOC: https://wpt.fyi/results/accname/name/comp_host_language_label.html has “encapsulation”
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue