cui/uiconfig/ui/colorpage.ui | 69 +++++++++++------------- solenv/sanitizers/ui/modules/swriter.suppr | 9 ++- sw/source/ui/fldui/fldvar.cxx | 4 - sw/source/ui/frmdlg/column.cxx | 6 +- sw/uiconfig/swriter/ui/columnpage.ui | 13 ++-- sw/uiconfig/swriter/ui/fldrefpage.ui | 82 ++++++++--------------------- sw/uiconfig/swriter/ui/fldvarpage.ui | 5 + sw/uiconfig/swriter/ui/indentpage.ui | 4 - 8 files changed, 79 insertions(+), 113 deletions(-)
New commits: commit f8469abd97df5baec2567e2faa507ea6e8a26457 Author: Parth Raiyani <[email protected]> AuthorDate: Wed Jan 28 15:19:25 2026 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Feb 26 20:50:59 2026 +0100 a11y: enhance accessibility in fldrefpage.ui and fldvarpage.ui - restructure filter GtkEntry for better UI and accessibility - add mnemonic-widget to correctly reference GtkLabel with relevant object - rename conflicting label ids - make the frame label visible Change-Id: I3dbb8e0808906ae2c8701f385abdd8644d393333 Signed-off-by: Parth Raiyani <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198305 Tested-by: Jenkins CollaboraOffice <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200473 diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 8885c08c04f1..230cca97a592 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -45,9 +45,9 @@ SwFieldVarPage::SwFieldVarPage(weld::Container* pPage, weld::DialogController* p , m_xTypeLB(m_xBuilder->weld_tree_view(u"type"_ustr)) , m_xSelection(m_xBuilder->weld_widget(u"selectframe"_ustr)) , m_xSelectionLB(m_xBuilder->weld_tree_view(u"select"_ustr)) - , m_xNameFT(m_xBuilder->weld_label(u"nameft"_ustr)) + , m_xNameFT(m_xBuilder->weld_label(u"fldvarnameft"_ustr)) , m_xNameED(m_xBuilder->weld_entry(u"name"_ustr)) - , m_xValueFT(m_xBuilder->weld_label(u"valueft"_ustr)) + , m_xValueFT(m_xBuilder->weld_label(u"fldvarvalueft"_ustr)) , m_xValueED(new ConditionEdit<weld::TextView>(m_xBuilder->weld_text_view(u"value"_ustr))) , m_xFormat(m_xBuilder->weld_widget(u"formatframe"_ustr)) , m_xNumFormatLB(new SwNumFormatTreeView(m_xBuilder->weld_tree_view(u"numformat"_ustr))) diff --git a/sw/uiconfig/swriter/ui/fldrefpage.ui b/sw/uiconfig/swriter/ui/fldrefpage.ui index 4ebd892cafd5..7d9257ac003e 100644 --- a/sw/uiconfig/swriter/ui/fldrefpage.ui +++ b/sw/uiconfig/swriter/ui/fldrefpage.ui @@ -249,61 +249,6 @@ <property name="vexpand">True</property> <property name="orientation">vertical</property> <property name="spacing">6</property> - <child> - <!-- n-columns=1 n-rows=2 --> - <object class="GtkGrid" id="grid3"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="row-spacing">6</property> - <child> - <object class="GtkBox" id="box3"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="margin-start">5</property> - <property name="margin-end">5</property> - <child> - <object class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="margin-end">5</property> - <property name="label" translatable="yes" context="fldrefpage|label4">Selection</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> - </packing> - </child> - <child> - <object class="GtkEntry" id="filter"> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="hexpand">True</property> - <property name="activates-default">True</property> - <property name="truncate-multiline">True</property> - <property name="placeholder-text" translatable="yes" context="fldrefpage|filter">Filter Selection</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> <child> <object class="GtkFrame" id="selectframe"> <property name="visible">True</property> @@ -319,6 +264,21 @@ <property name="margin-top">6</property> <property name="hexpand">True</property> <property name="orientation">vertical</property> + <child> + <object class="GtkEntry" id="filter"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> + <property name="placeholder-text" translatable="yes" context="fldrefpage|filter">Filter Selection</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> @@ -361,7 +321,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">0</property> + <property name="position">1</property> </packing> </child> <child> @@ -406,7 +366,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> </object> @@ -414,6 +374,7 @@ <child type="label"> <object class="GtkLabel" id="label2"> <property name="can-focus">False</property> + <property name="visible">True</property> <property name="label" translatable="yes" context="fldrefpage|label2">S_election</property> <property name="use-underline">True</property> <property name="xalign">0</property> @@ -426,9 +387,12 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">1</property> + <property name="position">0</property> </packing> </child> + <child> + <placeholder/> + </child> <child> <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid" id="grid1"> @@ -438,7 +402,7 @@ <property name="row-spacing">6</property> <property name="column-spacing">12</property> <child> - <object class="GtkLabel" id="valueft"> + <object class="GtkLabel" id="fldrefvalueft"> <property name="visible">True</property> <property name="sensitive">False</property> <property name="can-focus">False</property> diff --git a/sw/uiconfig/swriter/ui/fldvarpage.ui b/sw/uiconfig/swriter/ui/fldvarpage.ui index 1e4473e2de8f..1c592565a25d 100644 --- a/sw/uiconfig/swriter/ui/fldvarpage.ui +++ b/sw/uiconfig/swriter/ui/fldvarpage.ui @@ -65,7 +65,7 @@ <property name="row-spacing">6</property> <property name="column-spacing">6</property> <child> - <object class="GtkLabel" id="nameft"> + <object class="GtkLabel" id="fldvarnameft"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="halign">start</property> @@ -98,7 +98,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="valueft"> + <object class="GtkLabel" id="fldvarvalueft"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="halign">start</property> @@ -491,6 +491,7 @@ <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="fldvarpage|label5">_Up to level:</property> + <property name="mnemonic-widget">level</property> <property name="use-underline">True</property> <property name="xalign">0</property> </object> commit 0f3c1c6cbb19d3f93b76120563e9e5f7142ee938 Author: Parth Raiyani <[email protected]> AuthorDate: Wed Jan 28 16:27:14 2026 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Feb 26 20:50:52 2026 +0100 a11y: fix accessibility issues in colorpage.ui and indentpage.ui - rename conflicting label ids to ensure we have unique ids across dialog - add labelled-by relation for GtkSpinButton - add relevant suppression in swriter.suppr Change-Id: I72b444a24a7094bec3fab434b900603f2192b5e1 Signed-off-by: Parth Raiyani <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198304 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200472 diff --git a/solenv/sanitizers/ui/modules/swriter.suppr b/solenv/sanitizers/ui/modules/swriter.suppr index 88bfb3ab577f..7b34f1e55c35 100644 --- a/solenv/sanitizers/ui/modules/swriter.suppr +++ b/solenv/sanitizers/ui/modules/swriter.suppr @@ -18,9 +18,12 @@ sw/uiconfig/swriter/ui/cardmediumpage.ui://GtkLabel[@id='formatinfo'] orphan-lab sw/uiconfig/swriter/ui/cardmediumpage.ui://GtkComboBoxText[@id='hiddentype'] no-labelled-by sw/uiconfig/swriter/ui/ccdialog.ui://GtkLabel[@id='label4'] orphan-label sw/uiconfig/swriter/ui/checkbox.ui://GtkCheckButton[@id='checkbutton'] button-no-label -sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width3mf'] labelled-by-and-mnemonic -sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width2mf'] labelled-by-and-mnemonic -sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width1mf'] labelled-by-and-mnemonic +sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width3mf'] multiple-labelled-by +sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width2mf'] multiple-labelled-by +sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width1mf'] multiple-labelled-by +sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width3mf'] missing-label-for +sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width2mf'] missing-label-for +sw/uiconfig/swriter/ui/columnpage.ui://GtkSpinButton[@id='width1mf'] missing-label-for sw/uiconfig/swriter/ui/conditionpage.ui://GtkComboBoxText[@id='filter'] no-labelled-by sw/uiconfig/swriter/ui/converttexttable.ui://GtkLabel[@id='label4'] orphan-label sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui://GtkButton[@id='down'] button-no-label diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index bb2443ee9ceb..9eef4088a4a4 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -379,9 +379,9 @@ SwColumnPage::SwColumnPage(weld::Container* pPage, weld::DialogController* pCont , m_xCLNrEdt(m_xBuilder->weld_spin_button(u"colsnf"_ustr)) , m_xBalanceColsCB(m_xBuilder->weld_check_button(u"balance"_ustr)) , m_xBtnBack(m_xBuilder->weld_button(u"back"_ustr)) - , m_xLbl1(m_xBuilder->weld_label(u"1"_ustr)) - , m_xLbl2(m_xBuilder->weld_label(u"2"_ustr)) - , m_xLbl3(m_xBuilder->weld_label(u"3"_ustr)) + , m_xLbl1(m_xBuilder->weld_label(u"column1"_ustr)) + , m_xLbl2(m_xBuilder->weld_label(u"column2"_ustr)) + , m_xLbl3(m_xBuilder->weld_label(u"column3"_ustr)) , m_xBtnNext(m_xBuilder->weld_button(u"next"_ustr)) , m_xAutoWidthBox(m_xBuilder->weld_check_button(u"autowidth"_ustr)) , m_xLineTypeLbl(m_xBuilder->weld_label(u"linestyleft"_ustr)) diff --git a/sw/uiconfig/swriter/ui/columnpage.ui b/sw/uiconfig/swriter/ui/columnpage.ui index dc4e0e88bb4a..482252f1c4b2 100644 --- a/sw/uiconfig/swriter/ui/columnpage.ui +++ b/sw/uiconfig/swriter/ui/columnpage.ui @@ -135,7 +135,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="1"> + <object class="GtkLabel" id="column1"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="hexpand">True</property> @@ -152,7 +152,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="2"> + <object class="GtkLabel" id="column2"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="hexpand">True</property> @@ -169,7 +169,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="3"> + <object class="GtkLabel" id="column3"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="hexpand">True</property> @@ -214,6 +214,7 @@ <property name="digits">2</property> <accessibility> <relation type="labelled-by" target="widthft"/> + <relation type="labelled-by" target="column3"/> </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="width3mf-atkobject"> @@ -238,6 +239,7 @@ <property name="digits">2</property> <accessibility> <relation type="labelled-by" target="widthft"/> + <relation type="labelled-by" target="column2"/> </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="width2mf-atkobject"> @@ -262,6 +264,7 @@ <property name="digits">2</property> <accessibility> <relation type="labelled-by" target="widthft"/> + <relation type="labelled-by" target="column1"/> </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="width1mf-atkobject"> @@ -683,7 +686,7 @@ <property name="valign">center</property> <property name="column-spacing">12</property> <child> - <object class="GtkLabel" id="label3"> + <object class="GtkLabel" id="columnlabel3"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="columnpage|label3">Columns:</property> @@ -962,7 +965,7 @@ <widget name="lineheightft"/> <widget name="lineposft"/> <widget name="linecolorft"/> - <widget name="label3"/> + <widget name="columnlabel3"/> <widget name="applytoft"/> <widget name="textdirectionft"/> </widgets> diff --git a/sw/uiconfig/swriter/ui/indentpage.ui b/sw/uiconfig/swriter/ui/indentpage.ui index 8ed62ce379af..e45350f1768b 100644 --- a/sw/uiconfig/swriter/ui/indentpage.ui +++ b/sw/uiconfig/swriter/ui/indentpage.ui @@ -49,7 +49,7 @@ <property name="margin-start">12</property> <property name="margin-top">6</property> <child> - <object class="GtkLabel" id="label1"> + <object class="GtkLabel" id="indentlabel1"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes" context="indentpage|label1">_Before section</property> @@ -63,7 +63,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label3"> + <object class="GtkLabel" id="indentlabel3"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes" context="indentpage|label3">_After section</property> commit 82ade127ab8f8322d801a8ba1bd0e71686cd6545 Author: Parth Raiyani <[email protected]> AuthorDate: Wed Jan 28 12:29:58 2026 +0530 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Feb 26 20:50:44 2026 +0100 a11y: fix accessibility issues in colorpage.ui - rename conflicting label ids to ensure we have unique ids across dialog - remove unwanted parent GtkScrolledWindow from GtkIconView - fix mnemonic-widget property of GtkLabel to reference GtkIconView object - add static role for relevant GtkLabels - remove unused object ids Change-Id: I27908427d0aa7fbc3d42d10b54a9a6fe5d752dd7 Signed-off-by: Parth Raiyani <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198303 Tested-by: Jenkins CollaboraOffice <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200471 diff --git a/cui/uiconfig/ui/colorpage.ui b/cui/uiconfig/ui/colorpage.ui index b75e55f1bcbd..769fc16b5a48 100644 --- a/cui/uiconfig/ui/colorpage.ui +++ b/cui/uiconfig/ui/colorpage.ui @@ -150,13 +150,18 @@ <property name="orientation">vertical</property> <property name="spacing">3</property> <child> - <object class="GtkLabel" id="label20"> + <object class="GtkLabel" id="colorlabel20"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label20">Recent Colors</property> <property name="use-underline">True</property> - <property name="mnemonic-widget">iconview_recent_colors_win</property> + <property name="mnemonic-widget">iconview_recent_colors</property> <property name="xalign">0</property> + <child internal-child="accessible"> + <object class="AtkObject" id="colorlabel20-atkobject"> + <property name="AtkObject::accessible-role">static</property> + </object> + </child> </object> <packing> <property name="expand">False</property> @@ -165,27 +170,17 @@ </packing> </child> <child> - <object class="GtkScrolledWindow" id="iconview_recent_colors_win"> + <object class="GtkIconView" id="iconview_recent_colors"> <property name="visible">True</property> <property name="can-focus">True</property> - <property name="hscrollbar-policy">never</property> - <property name="vscrollbar-policy">never</property> - <property name="shadow-type">in</property> - <property name="height-request">10</property> - <child> - <object class="GtkIconView" id="iconview_recent_colors"> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="model">recent_colors_liststore</property> - <property name="pixbuf-column">0</property> - <property name="selection-mode">single</property> - <property name="item-orientation">horizontal</property> - <property name="columns">12</property> - <property name="row-spacing">1</property> - <property name="column-spacing">1</property> - <property name="item-padding">3</property> - </object> - </child> + <property name="model">recent_colors_liststore</property> + <property name="pixbuf-column">0</property> + <property name="selection-mode">single</property> + <property name="item-orientation">horizontal</property> + <property name="columns">12</property> + <property name="row-spacing">1</property> + <property name="column-spacing">1</property> + <property name="item-padding">3</property> </object> <packing> <property name="expand">False</property> @@ -272,7 +267,7 @@ <property name="margin-bottom">3</property> <property name="label" translatable="yes" context="colorpage|label22">Custom Palette</property> <property name="use-underline">True</property> - <property name="mnemonic-widget">iconview_colors_win</property> + <property name="mnemonic-widget">iconview_colors</property> <property name="xalign">0</property> </object> <packing> @@ -294,7 +289,7 @@ <property name="valign">start</property> <property name="orientation">vertical</property> <child> - <object class="GtkScrolledWindow" id="iconview_colors_win"> + <object class="GtkScrolledWindow"> <property name="visible">True</property> <property name="can-focus">True</property> <property name="hscrollbar-policy">never</property> @@ -421,7 +416,7 @@ <property name="row-spacing">6</property> <property name="column-spacing">6</property> <child> - <object class="GtkLabel" id="label7"> + <object class="GtkLabel" id="colorlabel7"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label7">B</property> @@ -434,7 +429,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label8"> + <object class="GtkLabel" id="colorlabel8"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label8">G</property> @@ -447,7 +442,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label9"> + <object class="GtkLabel" id="colorlabel9"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label9">R</property> @@ -541,7 +536,7 @@ <property name="row-spacing">6</property> <property name="column-spacing">6</property> <child> - <object class="GtkLabel" id="label10"> + <object class="GtkLabel" id="colorlabel10"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label10">_C</property> @@ -554,7 +549,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label16"> + <object class="GtkLabel" id="colorlabel16"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label16">_K</property> @@ -567,7 +562,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label17"> + <object class="GtkLabel" id="colorlabel17"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label17">_Y</property> @@ -632,7 +627,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label15"> + <object class="GtkLabel" id="colorlabel15"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label15">_M</property> @@ -772,7 +767,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label4"> + <object class="GtkLabel" id="colorlabel4"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label4">_B</property> @@ -785,7 +780,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label3"> + <object class="GtkLabel" id="colorlabel3"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label3">_G</property> @@ -798,7 +793,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label2"> + <object class="GtkLabel" id="colorlabel2"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label2">_R</property> @@ -869,7 +864,7 @@ <property name="row-spacing">6</property> <property name="column-spacing">6</property> <child> - <object class="GtkLabel" id="label11"> + <object class="GtkLabel" id="colorlabel11"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label11">_C</property> @@ -882,7 +877,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label12"> + <object class="GtkLabel" id="colorlabel12"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label12">_M</property> @@ -895,7 +890,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label13"> + <object class="GtkLabel" id="colorlabel13"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label13">_K</property> @@ -934,7 +929,7 @@ </packing> </child> <child> - <object class="GtkLabel" id="label14"> + <object class="GtkLabel" id="colorlabel14"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="colorpage|label14">_Y</property>
