mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibWebView: Display Accessible Name and Description
The accessibility tab now displays elements' names and descriptions along with the role.
This commit is contained in:
@@ -93,8 +93,12 @@ GUI::Variant AccessibilityTreeModel::data(GUI::ModelIndex const& index, GUI::Mod
|
||||
if (type != "element")
|
||||
return node_role;
|
||||
|
||||
auto name = node.get_deprecated_string("name"sv).value();
|
||||
auto description = node.get_deprecated_string("description"sv).value();
|
||||
|
||||
StringBuilder builder;
|
||||
builder.append(node_role.to_lowercase());
|
||||
builder.appendff(" name: \"{}\", description: \"{}\"", name, description);
|
||||
return builder.to_deprecated_string();
|
||||
}
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user