mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +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:
parent
29d724d95c
commit
2f4c463920
1 changed files with 4 additions and 0 deletions
|
@ -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 {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue