Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KCalc
Commits
8a651d67
Commit
8a651d67
authored
Aug 10, 2022
by
Harald Sitter
🏳️🌈
Browse files
a11y: set display value + description
otherwise it's not accessible
parent
a9da5691
Pipeline
#220125
passed with stage
in 45 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
kcalcdisplay.cpp
View file @
8a651d67
/*
SPDX-FileCopyrightText: 2001-2013 Evan Teran <evan.teran@gmail.com>
SPDX-FileCopyrightText: 1996-2000 Bernd Johannes Wuebben <wuebben@kde.org>
SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
...
...
@@ -38,6 +39,7 @@ KCalcDisplay::KCalcDisplay(QWidget *parent)
,
history_index_
(
0
)
,
selection_timer_
(
new
QTimer
(
this
))
{
setAccessibleDescription
(
i18nc
(
"@label accessibility description of the calculation result display"
,
"Result Display"
));
setFocusPolicy
(
Qt
::
StrongFocus
);
setSizePolicy
(
QSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Fixed
));
...
...
@@ -593,6 +595,7 @@ void KCalcDisplay::setText(const QString &string)
}
update
();
setAccessibleName
(
text_
);
// "Labels should be represented by only QAccessibleInterface and return their text as name"
Q_EMIT
changedText
(
text_
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment