sc/source/ui/sidebar/CellBorderStyleControl.cxx |   16 ++++++++++++++++
 solenv/sanitizers/ui/modules/scalc.false        |   19 +++++++++++++++++++
 solenv/sanitizers/ui/modules/scalc.suppr        |   19 -------------------
 3 files changed, 35 insertions(+), 19 deletions(-)

New commits:
commit 947b67ff63a58e858537cdbbd4ffea0a96d33bfe
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Jun 21 09:00:41 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Jun 21 15:50:52 2024 +0200

    tdf#161648 sc a11y: Set a11y names for items in border style control
    
    Set accessible names for the items in the "Borders"
    control in the Calc Sidebar, "Properties" deck, section
    "Cell Appearance". Use the same text as is used for the tooltip.
    
    With this in place, Orca now announces what each item
    is about when using the gtk3 VCL plugin, instead of just saying
    "Button".
    
    Move the gla11y suppressions to the .false file, as they
    have been dealt with now, see doc at [1].
    
    [1] https://wiki.documentfoundation.org/Development/Accessibility
    
    Change-Id: Id1856e4b116acad9bf6d14132bc6d9c91a01ae06
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169321
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169331

diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx 
b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
index f8e792ee183b..1ffbc213fb19 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
@@ -66,27 +66,43 @@ void CellBorderStylePopup::Initialize()
 {
     mxTBBorder1->connect_clicked ( LINK(this, CellBorderStylePopup, 
TB1SelectHdl) );
     mxTBBorder1->set_item_tooltip_text(0, 
SvxResId(RID_SVXSTR_TABLE_PRESET_NONE));
+    mxTBBorder1->set_item_accessible_name(0, 
SvxResId(RID_SVXSTR_TABLE_PRESET_NONE));
     mxTBBorder1->set_item_tooltip_text(1, 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERALL));
+    mxTBBorder1->set_item_accessible_name(1, 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTERALL));
     mxTBBorder1->set_item_tooltip_text(2, 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTER));
+    mxTBBorder1->set_item_accessible_name(2, 
SvxResId(RID_SVXSTR_TABLE_PRESET_OUTER));
     mxTBBorder1->set_item_tooltip_text(3, 
SvxResId(RID_SVXSTR_TABLE_PRESET_THICK));
+    mxTBBorder1->set_item_accessible_name(3, 
SvxResId(RID_SVXSTR_TABLE_PRESET_THICK));
 
     mxTBBorder2->connect_clicked ( LINK(this, CellBorderStylePopup, 
TB2and3SelectHdl) );
     mxTBBorder2->set_item_tooltip_text(0, 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYLEFT));
+    mxTBBorder2->set_item_accessible_name(0, 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYLEFT));
     mxTBBorder2->set_item_tooltip_text(1, 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYRIGHT));
+    mxTBBorder2->set_item_accessible_name(1, 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYRIGHT));
     mxTBBorder2->set_item_tooltip_text(2, 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYTOP));
+    mxTBBorder2->set_item_accessible_name(2, 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYTOP));
     mxTBBorder2->set_item_tooltip_text(3, 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYBOTTOM));
+    mxTBBorder2->set_item_accessible_name(3, 
SvxResId(RID_SVXSTR_PARA_PRESET_ONLYBOTTOM));
 
     mxTBBorder3->connect_clicked ( LINK(this, CellBorderStylePopup, 
TB2and3SelectHdl) );
     mxTBBorder3->set_item_tooltip_text(0, 
SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALUP));
+    mxTBBorder3->set_item_accessible_name(0, 
SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALUP));
     mxTBBorder3->set_item_tooltip_text(1, 
SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALDOWN));
+    mxTBBorder3->set_item_accessible_name(1, 
SvxResId(RID_SVXSTR_PARA_PRESET_DIAGONALDOWN));
     mxTBBorder3->set_item_tooltip_text(2, 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOM));
+    mxTBBorder3->set_item_accessible_name(2, 
SvxResId(RID_SVXSTR_PARA_PRESET_TOPBOTTOM));
     mxTBBorder3->set_item_tooltip_text(3, 
SvxResId(RID_SVXSTR_PARA_PRESET_LEFTRIGHT));
+    mxTBBorder3->set_item_accessible_name(3, 
SvxResId(RID_SVXSTR_PARA_PRESET_LEFTRIGHT));
 
     mxTBBorder4->connect_clicked ( LINK(this, CellBorderStylePopup, 
TB4SelectHdl) );
     mxTBBorder4->set_item_tooltip_text(0, 
SvxResId(RID_SVXSTR_TABLE_PRESET_THICKBOTTOM));
+    mxTBBorder4->set_item_accessible_name(0, 
SvxResId(RID_SVXSTR_TABLE_PRESET_THICKBOTTOM));
     mxTBBorder4->set_item_tooltip_text(1, 
SvxResId(RID_SVXSTR_TABLE_PRESET_DOUBLEBOTTOM));
+    mxTBBorder4->set_item_accessible_name(1, 
SvxResId(RID_SVXSTR_TABLE_PRESET_DOUBLEBOTTOM));
     mxTBBorder4->set_item_tooltip_text(2, 
SvxResId(RID_SVXSTR_TABLE_PRESET_TOPTHICKBOTTOM));
+    mxTBBorder4->set_item_accessible_name(2, 
SvxResId(RID_SVXSTR_TABLE_PRESET_TOPTHICKBOTTOM));
     mxTBBorder4->set_item_tooltip_text(3, 
SvxResId(RID_SVXSTR_TABLE_PRESET_TOPDOUBLEBOTTOM));
+    mxTBBorder4->set_item_accessible_name(3, 
SvxResId(RID_SVXSTR_TABLE_PRESET_TOPDOUBLEBOTTOM));
 }
 
 IMPL_LINK(CellBorderStylePopup, TB1SelectHdl, const OUString&, rId, void)
diff --git a/solenv/sanitizers/ui/modules/scalc.false 
b/solenv/sanitizers/ui/modules/scalc.false
index e798fa3e68e5..7284f732888e 100644
--- a/solenv/sanitizers/ui/modules/scalc.false
+++ b/solenv/sanitizers/ui/modules/scalc.false
@@ -18,6 +18,25 @@ 
sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui://GtkButton[@id='input-range
 
sc/uiconfig/scalc/ui/descriptivestatisticsdialog.ui://GtkButton[@id='output-range-button']
 button-no-label
 
sc/uiconfig/scalc/ui/exponentialsmoothingdialog.ui://GtkButton[@id='input-range-button']
 button-no-label
 
sc/uiconfig/scalc/ui/exponentialsmoothingdialog.ui://GtkButton[@id='output-range-button']
 button-no-label
+
+// accessible names for these are set in code, see 
CellBorderStylePopup::Initialize
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='none'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='all'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='outside'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='thickbox'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='thickbottom'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='doublebottom']
 button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='topthickbottom']
 button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='topdoublebottom']
 button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='left'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='right'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='top'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='bottom'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='diagup'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='diagdown'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='topbottom'] 
button-no-label
+sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='leftright'] 
button-no-label
+
 
sc/uiconfig/scalc/ui/fourieranalysisdialog.ui://GtkButton[@id='input-range-button']
 button-no-label
 
sc/uiconfig/scalc/ui/fourieranalysisdialog.ui://GtkButton[@id='output-range-button']
 button-no-label
 sc/uiconfig/scalc/ui/goalseekdlg.ui://GtkButton[@id='formulabutton'] 
button-no-label
diff --git a/solenv/sanitizers/ui/modules/scalc.suppr 
b/solenv/sanitizers/ui/modules/scalc.suppr
index e2e164de3b01..bdc95e795200 100644
--- a/solenv/sanitizers/ui/modules/scalc.suppr
+++ b/solenv/sanitizers/ui/modules/scalc.suppr
@@ -45,25 +45,6 @@ 
sc/uiconfig/scalc/ui/definedatabaserangedialog.ui://GtkLabel[@id='invalid'] orph
 sc/uiconfig/scalc/ui/definename.ui://GtkLabel[@id='label'] orphan-label
 sc/uiconfig/scalc/ui/doubledialog.ui://GtkEntry[@id='value'] no-labelled-by
 sc/uiconfig/scalc/ui/externaldata.ui://GtkLabel[@id='secondsft'] orphan-label
-
-// Tooltip values now controlled in svx/strings.hrc instead of 
sc/uiconfig/scalc/ui/floatingborderstyle.ui
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='none'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='all'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='outside'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='thickbox'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='thickbottom'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='doublebottom']
 button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='topthickbottom']
 button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='topdoublebottom']
 button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='left'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='right'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='top'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='bottom'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='diagup'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='diagdown'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='topbottom'] 
button-no-label
-sc/uiconfig/scalc/ui/floatingborderstyle.ui://GtkToolButton[@id='leftright'] 
button-no-label
-
 sc/uiconfig/scalc/ui/fourieranalysisdialog.ui://GtkLabel[@id='error-message'] 
orphan-label
 sc/uiconfig/scalc/ui/groupbynumber.ui://GtkEntry[@id='edit_by'] no-labelled-by
 sc/uiconfig/scalc/ui/headerfootercontent.ui://GtkLabel[@id='labelFT_H_CUSTOM'] 
orphan-label

Reply via email to