-
Notifications
You must be signed in to change notification settings - Fork 228
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
A11y: Combine client info into a group #2638
Conversation
Thanks! Is it that easy? |
Yes!!!
|
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.
Thanks -- that sounds great! One inline question (see above).
@@ -862,6 +862,8 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) | |||
plblLabel->setToolTip ( strToolTip ); | |||
plblLabel->setAccessibleName ( strAliasAccessible ); | |||
plblLabel->setAccessibleDescription ( tr ( "Alias" ) ); | |||
dynamic_cast<QWidget*> ( plblLabel->parent() ) |
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.
Just trying to understand why the cast is needed:
- This is in
CChannelFader
which is aQObject
. Therefore,parent()
returns aQObject
as well. - Doing the dynamic_cast is safe and right to do because we know that
CChannelFader
is only used as a child inCAudioMixerBoard
, which is aQWidget
.
Is that correct? If so, would it make sense to add a short code comment about that?
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.
Most UI things are widgets. But if parent (i.e. the form it's stuck to) is only declared as a QObject, you'll get told off by the compiler trying to use methods QObject doesn't have -- even though the QObject you're talking about does have them. Hence the cast. So long as it's viable (I've not checked).
In order to ->setAccessibleDescription, you need to cast to QWidget.
|
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.
Unfortunately, I couldn't verify this PR. How can I see it in action?
You can check with a screen reader. VoiceOver on Mac, and NVDA with
object navigation on Windows.
VoiceOver has a mini tutorial how to use it if you press command+f5 on
your Mac.
|
Ok. Thanks. Could hear it now. The integrated one of Win 11 didn't find it |
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.
This PR needs to be rebased to resolve the conflicts
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.
It is a shame about that cast - I'd have though the parent widget might be known somewhere. It probably is....
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.
Thanks!
Short description of changes
Combine all the client info, so screen reader users don't have to track down multiple places.
CHANGELOG: Accessibility: Combine all the client info, so screen reader users don't have to track down multiple places.
Context: Fixes an issue?
Does this change need documentation? What needs to be documented and how?
Status of this Pull Request
What is missing until this pull request can be merged?
Checklist