summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-10-13 16:11:46 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2023-11-15 12:06:23 +0100
commitd2bf45c6ed3264babc12061e635ab620a1322d2f (patch)
treee931f20a11fce0bd1e8e386efb707123e164fde9 /tests/auto/other
parent360152bdcd0e4045b558e2bf598eabbf8a16abe8 (diff)
a11y: Report strikethrough via text attribute
Let `QAccessibleTextWidget::attributes` report whether strikeout is applied to text via the "text-line-through-type" IAccessible2 text attribute [1]. Use a value of "single" when strikeout is applied, and "none" otherwise. A previous change already implemented bridging that to the corresponding AT-SPI "strikethrough" attribute. Update the existing test tst_QAccessibility::textAttributes_data to take into account that this attribute is reported as well now. [1] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes Fixes: QTBUG-118106 Change-Id: I0416f00b1c11709d9cd0ca0ee38cc6df6caa6dcf Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 7c78c9ab95..99136979d6 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -665,7 +665,7 @@ void tst_QAccessibility::textAttributes_data()
defaultComplexFont.setStyle(QFont::StyleItalic);
defaultComplexFont.setUnderline(true);
- static QStringList defaults = QString("font-style:normal;font-weight:normal;text-align:left;text-position:baseline;font-size:13pt").split(';');
+ static QStringList defaults = QString("font-style:normal;font-weight:normal;text-align:left;text-position:baseline;font-size:13pt;text-line-through-type:none").split(';');
static QStringList bold = defaults;
bold[1] = QString::fromLatin1("font-weight:bold");
@@ -701,7 +701,7 @@ void tst_QAccessibility::textAttributes_data()
defaultFontDifferentBoldItalic[1] = QString::fromLatin1("font-weight:bold");
static QStringList defaultFontDifferentMonospace = defaultFontDifferent;
- defaultFontDifferentMonospace[7] = (QLatin1String("font-family:\"monospace\""));
+ defaultFontDifferentMonospace[8] = (QLatin1String("font-family:\"monospace\""));
static QStringList defaultFontDifferentFont8pt = defaultFontDifferent;
defaultFontDifferentFont8pt[4] = (QLatin1String("font-size:8pt"));