summaryrefslogtreecommitdiff
path: root/vcl/osx/a11yrolehelper.mm
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-10-27 14:53:59 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2023-10-28 05:45:15 +0200
commitf44eae4912e8f2ba34d93a71a609473df976a2cb (patch)
treeb9b7147fbf4020bc27c322b2a4ab07e28745f464 /vcl/osx/a11yrolehelper.mm
parent33061be5a7538409839dcca3116b9fa72629013f (diff)
tdf#135586 a11y: Add a new BLOCK_QUOTE a11y role
A block quote role exists in all of WAI-ARIA 1.3 (role "blockquote", [1]), IAccessible2 (`IA2_ROLE_BLOCK_QUOTE`, [2]) and AT-SPI (`ROLE_BLOCK_QUOTE`, [3]). Take over the definition that is the same in WAI-ARIA and IAccessible2: > A section of content that is quoted from another source. The intended use for now is for a Writer paragraph using the "Block Quotation" paragraph style, similar to how the HEADING role is used for paragraphs using a corresponding paragraph style. For gtk3 (ATK) and winaccessibility (IAccessible2), map the new role to the equivalant roles. For macOS and the gtk4 as well as the Qt-based VCL plugins on Linux which currently don't have an equivalent role, fall back to the same role that the PARAGRAPH role is mapped to. This way, the behavior there will remain unchanged once the BLOCK_QUOTE role is used for Writer paragraphs with the corresponding style. In general, treat BLOCK_QUOTE like PARAGRAPH in code applying special handling for the PARAGRAPH role. [1] https://w3c.github.io/aria/#blockquote [2] https://github.com/LinuxA11y/IAccessible2/blob/3d8c7f0b833453f761ded6b12d8be431507bfe0b/api/AccessibleRole.idl#L318 [3] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/7cc4cee53ddbd22631fd110f0e5ce045dec2e411/xml/Accessible.xml#L615-616 Change-Id: I248c183a2e7ec5d6f0a89bf3cb4829bbd8588c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158573 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/osx/a11yrolehelper.mm')
-rw-r--r--vcl/osx/a11yrolehelper.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/osx/a11yrolehelper.mm b/vcl/osx/a11yrolehelper.mm
index e95036dbebd9..a1cf62f327cc 100644
--- a/vcl/osx/a11yrolehelper.mm
+++ b/vcl/osx/a11yrolehelper.mm
@@ -46,6 +46,7 @@ using namespace ::com::sun::star::uno;
MAP( AccessibleRole::UNKNOWN, NSAccessibilityUnknownRole );
MAP( AccessibleRole::ALERT, NSAccessibilityUnknownRole ); // FIXME
+ MAP( AccessibleRole::BLOCK_QUOTE, NSAccessibilityTextAreaRole );
MAP( AccessibleRole::COLUMN_HEADER, NSAccessibilityColumnRole );
MAP( AccessibleRole::CANVAS, NSAccessibilityUnknownRole ); // FIXME
MAP( AccessibleRole::CHECK_BOX, NSAccessibilityCheckBoxRole );
@@ -186,6 +187,7 @@ using namespace ::com::sun::star::uno;
MAP( AccessibleRole::UNKNOWN, NSAccessibilityUnknownSubrole );
MAP( AccessibleRole::ALERT, NSAccessibilitySystemDialogSubrole );
+ MAP( AccessibleRole::BLOCK_QUOTE, @"" );
MAP( AccessibleRole::COLUMN_HEADER, @"" );
MAP( AccessibleRole::CANVAS, @"" );
MAP( AccessibleRole::CHECK_BOX, @"" );