-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Report aria-label and aria-description even when parent has no visible children #16471
Conversation
is this ready for review? |
Could you move the changes to the new changes.md for this PR please? |
Moved changelog entry from T2T to Markdown
…e children (nvaccess#16471) Fixes nvaccess#14514 Summary of the issue: HTML figure elements with no accessible children (EG, all children set to aria-hidden=true) but with an aria-label or aria-description are not reported by NVDA. Description of user facing changes Elements with no accessible children but which have a label or description are now reported in browse mode. Note this only applies to elements which are still rendered; if all children are set to display: none, for example, NVDA still does not report the parent element. Description of development approach Render a single space in elements with no content but a label or description se
I'm afraid this pr has unexpected side effects. Se #16554 |
@@ -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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
…16585) Fixes #16554 Summary of the issue: #16471 introduced a regression whereby many blank lines were reported in browse mode. Description of user facing changes Extraneous blank lines are no longer reported in browse mode. Description of development approach Updated checks in gecko_ia2.cpp: Check that the length of name is non-zero (SysStringLen returns 0 if the BSTR passed is null) Added check that description's value is not the empty string, as checking that it has a value is necessary but not sufficient.
Link to issue number:
Fixes #14514
Summary of the issue:
HTML
figure
elements with no accessible children (EG, all children set toaria-hidden=true
) but with anaria-label
oraria-description
are not reported by NVDA.Description of user facing changes
Elements with no accessible children but which have a label or description are now reported in browse mode. Note this only applies to elements which are still rendered; if all children are set to
display: none
, for example, NVDA still does not report the parent element.Description of development approach
Render a single space in elements with no content but a label or description set.
Testing strategy:
Manually tested in Firefox and Edge, using the example markup provided by the OP.
Known issues with pull request:
N/A
Code Review Checklist: