Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report aria-label and aria-description even when parent has no visible children #16471

Merged
merged 8 commits into from
May 8, 2024
6 changes: 4 additions & 2 deletions nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1262,11 +1262,13 @@ VBufStorage_fieldNode_t* GeckoVBufBackend_t::fillVBuf(
parentNode->isBlock=false;
}

if ((isInteractive || role == ROLE_SYSTEM_SEPARATOR) && parentNode->getLength() == 0) {
if ((isInteractive || role == ROLE_SYSTEM_SEPARATOR || name || description.has_value()) && parentNode->getLength() == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should name be changed to name.has_value() here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly, as name is a BSTR, not an optional<wstring>. I have checked that it's non-null and non-empty in my updated code though.

// If the node is interactive or otherwise relevant even when empty
// and it still has no content, render a space so the user can access the node.
previousNode = buffer->addTextFieldNode(parentNode, previousNode, EMPTY_TEXT_NODE);
if(previousNode&&!locale.empty()) previousNode->addAttribute(L"language",locale);
if (previousNode && !locale.empty()) {
previousNode->addAttribute(L"language", locale);
}
}
}

Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Changes

* The fallback braille input table is now equal to the fallback output table, which is Unified English Braille Code grade 1. (#9863, @JulienCochuyt, @LeonarddeR)
* NVDA will now report figures with no accessible children, but with a label or description. (#14514)
* When reading by line in browse mode, "caption" is no longer reported on each line of a long figure or table caption. (#14874)

### Bug Fixes
Expand Down